-
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
Should we set '"types": []' for 'tsc init'? #39354
Comments
Yes |
Hmm, also yes |
+1 from me. It was my first step in several TS projects to define "types" fields in every tsconfig.json with explicit type imports to prevent pollution of the code with unneded types from node_modules (e.g., I want @types/node in the grunt scripts, but not in the web scripts, and so on). |
I'm also +1, as setting specific "types" :[] entry (and lib) is the first thing after tsc --init for me |
From discussion in the design meeting: we would like to do this, but only after we've come up with a basic
Same for jest, when using describe or expect. |
Maybe add new error + autofix for this kind of things? |
Very few people understand the automatic
@types
inclusion behavior, it often causes packages to conflict, and it is often a program construction performance foot-gun.Maybe we should output a field like this in
compilerOptions
.What do others here think?
The text was updated successfully, but these errors were encountered: