Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.83.0
- OS Version: MacOS Monterey 12.4 (but also shown in vscode on other MacOS versions)
Steps to Reproduce:
- Clone https://github.com/cleric-sh/repro/tree/phantom-ts7022-error-in-vscode
- Ensure switched to branch
phantom-ts7022-error-in-vscode
npm i
npm compile --> observe no compiler errors
- Open index.ts
- Make a change to the file (e.g. add a space) to trigger LSP to re-analyse the file.
- Restart the TS Language Server and error disappears. Make a change, and error re-appears.
- Error should appear on
value on line 26.
I've noted that the error is:
- Only shown when func param 'arg' type is declared. Removing the declaration resolves the error.
- Only shown in vscode. tsc compiles without errors.
- Only shown on second pass, after a change has been made to the file. Initial type check on load shows no errors.
- Only shown when noImplicitAny: true
Also, in a more complex file, declaring this function after doAnotherThing prevents the error being displayed.
All these points combined lead me to believe this is an error either in VS Code or the Typescript Language Server.
I've also created an issue in the TS Language Server repository: typescript-language-server/typescript-language-server#766
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
phantom-ts7022-error-in-vscodenpm inpm compile--> observe no compiler errorsvalueon line 26.I've noted that the error is:
Also, in a more complex file, declaring this function after
doAnotherThingprevents the error being displayed.All these points combined lead me to believe this is an error either in VS Code or the Typescript Language Server.
I've also created an issue in the TS Language Server repository: typescript-language-server/typescript-language-server#766