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
The issue is we are not adding file watchers on failed lookups, i.e. if you are looking at a file a\b\c\d.ts we will look for a\b\c\tsconfig.json, a\b\tsconfig.json, a\tsconfig.json and tsconfig.json. if non was found the file is deemed as a loose file. now to make this scenario work,. we need to add a directory watcher on each directory in the lookup chain, and ensure that if a tsconfig.json ever showed up the context is recomputed.
I have chatted with @jrieken and @egamma about this, and we need a new command to force the server to reload all projects. The host would fire this whenever a tsconfig file is added.
TS workspace
create a file foo.ts
export function foo(): number {
return 10;
}
Observe: the tsserver complains about missing module option
Add a tsconfig.json to it:
{
"compilerOptions": {
"sourceMap": true,
"module": "commonjs"
}
}
Switch back to foo.ts and observe that the error is still visible.
You need to restart tsserver so that the server recognizes the tsconfig.json file.
The text was updated successfully, but these errors were encountered: