You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there is no way to configure the default compilerOptions for inferred projects outside of the server host. Being able to configure should options would be give a better DX when not using the default compiler options such as experimentalDecorators, strictNullChecks etc... together with stricter file inclusions, ie favoring explicitly listing the entry-point files using files instead of include with globbing.
Previously when not using TypeScript solution style tsconfig this could be achieved by adding a tsconfig.json in the root of the project which will include all files and set these options example.
This trickery cannot be used when using a solution style tsconfig, because the root tsconfig will not contain any files due to files: [] setting.
Examples
Ideally, compiler options for inferred projects are configured in a TypeScript configuration file. When using solution style tsconfig, such configuration can be set here.
alan-agius4
changed the title
Configure default compiler options for TS Server Inferred Project
Provide way to configure default compiler options for TS Server Inferred Project
Jul 21, 2020
VS Code has two settings for implicit javascript projects: javascript.implicitProjectConfig.checkJs and javascript.implicitProjectConfig.experimentalDecorators
I'd be up for adding VS Code support for additional options. These settings are especially useful for JS users who don't know about jsconfig (or don't want to check one in)
This would be really useful in our monorepo, where open files that don't have an explicit project will likely end up causing all files to be processed and tsserver memory usage to explode to 40GB. For us in general, if a file is not explicitly part of a TS project, it's usually just in a transient state where we haven't created the tsconfig file yet, which we autogenerate.
Search Terms
Inferred Project
TS Server
Suggestion
Add an option to configure the default
compilerOptions
for inferred projects outside of the host.Related to: https://docs.google.com/document/d/1eB6cGCG_2ircfS5GzpDC9dBgikeYYcMxghVH5sDESHw/edit#heading=h.telvo0tzo7t0 and #39632
Checklist
Use Cases
Currently, there is no way to configure the default
compilerOptions
for inferred projects outside of the server host. Being able to configure should options would be give a better DX when not using the default compiler options such asexperimentalDecorators
,strictNullChecks
etc... together with stricter file inclusions, ie favoring explicitly listing the entry-point files usingfiles
instead ofinclude
with globbing.Previously when not using TypeScript solution style tsconfig this could be achieved by adding a
tsconfig.json
in the root of the project which will include all files and set these options example.This trickery cannot be used when using a solution style tsconfig, because the root tsconfig will not contain any files due to
files: []
setting.Examples
Ideally, compiler options for inferred projects are configured in a TypeScript configuration file. When using solution style tsconfig, such configuration can be set here.
My suggestion meets these guidelines:
//cc @kyliau
The text was updated successfully, but these errors were encountered: