Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propose a solution #1

Open
tholewebgods opened this issue Jun 16, 2021 · 0 comments
Open

Propose a solution #1

tholewebgods opened this issue Jun 16, 2021 · 0 comments

Comments

@tholewebgods
Copy link
Owner

tholewebgods commented Jun 16, 2021

Formulating a proposed solution to microsoft/TypeScript#44597 ...


I see that modifications to this can be a breaking change.

However, as it is currently implemented, it is not intuitive.

Besides a format that would be preferred (because it's shorter) and breaking, I see at least one way to add this functionality in a non-breaking way.

Example:

// extending from:
types: {
   "svelte": true,
   "wewanttogetridofthis": 1
}

// root
types: {
   "node": true,
   "jest": 1, // example to write it shorter
   "wewanttogetridofthis": false // remove the dependency by making it falsy
}

It could be implemented in a way that the to-be-extended-from config can use arrays (equal to { dep1: true, dep2: true }) and the root, the referencing config uses the object notation.

Just as an inspiration.

Another, of course breaking, format change would be to introduce a "!" prefix to module names, allowing the referencing config to cancel a module name by adding !wewanttogetridofthis to the array. (Just for completeness.)

If you insist on not touching the compiler config system, could you/we at least add a note to the documentation at:

?


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant