-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Deprecate skipLibCheck
and introduce skipDeclarationErrors
#56324
Comments
Leaving aside the name of the option (which I agree could be better), the documented behavior above seems pretty clear to me - it doesn't typecheck the IMO the option wouldn't be very useful if it meant any type coming from a |
Fundamentally, this feature doesn't make sense unless you read the docs (which, yes, probably could be clarified further). No 20-character description of it is going to capture all the nuance and renaming it will just introduce further questions of why they're different, why I have to update my config file for literally no reason, etc. |
The suggestion comes from a holistic standpoint for the options. Something that comes from the path many tools take to long-term improve. It is not uncommon at all for renames to create a longer-term wins. I wish the mindset was the same here. As a great example, VS Code does this quite often for its settings.
That is true for a transition period, but not long-term.
It is not clear to everyone. It is obvious from the above blog post and many SO questions. In fact, it is wrong, as shown in the original post. You are talking about semantics on what "skip type checking" means. |
No, type checking of that file is skipped, which is exactly what the documentation says it will do. I’m not sure how you got from that to “all processing of the contents of this file is skipped” - it wouldn’t be useful if you couldn’t still use those types in files that are checked, in fact that would be even more confusing - i.e. “Why are some of my type annotations being ignored?” |
I'd consider a rename in the case that the new name was unambiguously better, but this just isn't. |
This issue has been marked as "Declined" and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
I understand. The suggested name is not the best, but the current one is not great either and I would have hoped something better could come out of the discussion, but maybe not.
I am not sure how to convey the gist of this discussion better. It is not clear. "But it is clear to me" does not mean everyone. We could argue people are dumb, not reading it verbatim etc. "Skip type checking of declaration files." will be read by some as "oh, it will skip the file". There is cause for confusion, with all rights, for this, no matter how correct one thinks that sentence is. This could be improved easily, removing this ambiguity, something like this, using your own wording (this should be improved, it is not perfect):
This entire discussion is a bit frustrating in a sense. When it comes to writing technical documentation, one of the biggest mistake users do that has knowledge about the project at hand is to take for granted people "are not reading the documentation properly". When as the above discussion shows, as well as https://www.testim.io/blog/typescript-skiplibcheck/ and hundreds more Google results about this, shows it is not clear. This is not at fault of users reading the docs, it is the docs. I wish at least the issue at hand could have been accepted as a way to accept a PR to try to improve the doc, which I would be willing to try given the feedback in here. |
Doc PRs are fine, no objection there |
🔍 Search Terms
skipLibCheck
skipLibCheck exclude
skipLibCheck skipDeclarationErrors
#30511 is relevant here.
✅ Viability Checklist
⭐ Suggestion
skipLibCheck
should be deprecated and a newskipDeclarationErrors
should takes it place, taking precedence if configured.skipLibCheck
is confusing for two reasons (taken from here):d.ts
files that are part of the project will be affected too.d.ts
files aren’t really skipped entirely. As shown in the demo project, valid types coming fromd.ts
files are never skipped.When doing this, https://www.typescriptlang.org/tsconfig#skipLibCheck (or the new https://www.typescriptlang.org/tsconfig#skipDeclarationErrors) should be updated to highlight the impoprtant findings listed on https://www.testim.io/blog/typescript-skiplibcheck/.
📃 Motivating Example
Coming from a developer experience (DX) perspective, I have found one of the hardest things about TypeScript is its configuration options and its documentation. There is a lot to be said, but in general having setup tens and tens of linters, formatters and similar in various languages, TypeScript has been one of the hardest to understand.
There are two big reasons for this:
skipLibCheck
which throws you off.In general there is a lot of good documentation for TypeScript on https://www.typescriptlang.org/docs/. However, it often feels like the config options to setup a project has fallen behind. This is apparent of the hundreds/thousands of SO questions.
💻 Use Cases
The text was updated successfully, but these errors were encountered: