-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
language server ignores multiple tsconfig files #49210
Comments
DetachHead
changed the title
language server doesn't resolve globally declared types when using
language server ignores some compiler options in tsconfig when it it has a name other than May 23, 2022
types
property in tsconfig when it has a name other than tsconfig.json
tsconfig.json
DetachHead
changed the title
language server ignores some compiler options in tsconfig when it it has a name other than
language server ignores some compiler options in tsconfig when it has a name other than May 23, 2022
tsconfig.json
tsconfig.json
DetachHead
changed the title
language server ignores some compiler options in tsconfig when it has a name other than
language server ignores multiple tsconfig files
May 23, 2022
tsconfig.json
See #33094. |
lobsterkatie
added a commit
to getsentry/sentry-javascript
that referenced
this issue
Jun 2, 2022
It is well-documented (see 1-6 below) that VSCode doesn't support setups like ours, where multiple tsconfig files coexist in a single directory. Strangely, though, it is only recently that this has become a problem, with VSCode at random intervals forgetting that it's ever heard of `expect` or `describe` (because it's not seeing `tsconfig.test.json`, but taking a while to realize it). There is an open issue[7] tracking the addition of support for this, but it's been open for a long time, with little movement. In the meantime, this solves the problem by adding placeholder `test/tsconfig.json` files to each package, each pointing to its corresponding `tsconfig.test.ts` file. I went with this approach over simply moving and renaming the existing test tsconfigs because this allows us to stay consistent in having all flavors of tsconfig for a package live at the package root level, and provides an easy way to reverse this workaround, should VSCode ever fix the underlying problem. [1] angular/angular-cli#5175 [2] microsoft/TypeScript#49210 [3] microsoft/vscode#107750 [4] microsoft/vscode#12463 [5] sillsdev/bible-karaoke#175 [6] microsoft/TypeScript#8435 [7] microsoft/TypeScript#33094
lobsterkatie
added a commit
to getsentry/sentry-javascript
that referenced
this issue
Jun 3, 2022
It is well-documented (see 1-6 below) that VSCode doesn't support setups like ours, where multiple tsconfig files coexist in a single directory. Strangely, though, it is only recently that this has become a problem, with VSCode at random intervals forgetting that it's ever heard of `expect` or `describe` (because it's not seeing `tsconfig.test.json`, but taking a while to realize it). There is an open issue[7] tracking the addition of support for this, but it's been open for a long time, with little movement. In the meantime, this solves the problem by adding placeholder `test/tsconfig.json` files to each package, each pointing to its corresponding `tsconfig.test.ts` file. I went with this approach over simply moving and renaming the existing test tsconfigs because this allows us to stay consistent in having all flavors of tsconfig for a package live at the package root level, and provides an easy way to reverse this workaround, should VSCode ever fix the underlying problem. [1] angular/angular-cli#5175 [2] microsoft/TypeScript#49210 [3] microsoft/vscode#107750 [4] microsoft/vscode#12463 [5] sillsdev/bible-karaoke#175 [6] microsoft/TypeScript#8435 [7] microsoft/TypeScript#33094
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
if a project has multiple tsconfig files (eg
tsconfig.json
andtsconfig.other.json
) then the language server seems to ignore the one that isn't namedtsconfig.json
🔎 Search Terms
language server multiple tsconfig
🕗 Version & Regression Information
4.8.0-dev.20220522
⏯
Playgroundgithub Linkhttps://github.com/DetachHead/typescript-nodejs-project/tree/global-types-issue
💻 Code
main config
other config
🙁 Actual behavior
the following error in
other.ts
:🙂 Expected behavior
no error when accessing the globally defined
pm
object in either fileThe text was updated successfully, but these errors were encountered: