-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugtypescriptTypescript support issuesTypescript support issues
Description
- VSCode Version: 1.13.1
- MacOS Version: 10.12.5
Project has next files:
/server.ts
/tsconfig.json
/client/client.ts
/client/tsconfig.json
// server.ts
typeof window;
typeof global;
// tsconfig.json
{
"compilerOptions": {
"lib": ["es2015"],
"types": ["node"]
}
}
// client/client.ts
typeof window;
typeof global;
// client/tsconfig.json
{
"compilerOptions": {
"lib": ["dom"],
"types": []
}
}
Steps to reproduce
Case 1
- Open project in
VScode
with any closed tabscode .
. - Open
client/client.ts.ts
inVScode
. There is right error[ts] Cannot find name 'global'
- Open
server.ts
. Right erorr[ts] Cannot find name 'window'
; - Close
client.ts
. Openclient.ts
. - Focus
server.ts
. There are no errors. All types have found. - Close
server.ts
. Openserver.ts
. Right erorr[ts] Cannot find name 'window'
.
Case 2
- Open project in
VScode
with any closed tabscode .
. - Open
server.ts
. Right erorr[ts] Cannot find name 'window'
; - Open
client.ts
. Wrong erorr[ts] Cannot find name 'window'
;
I've created repo for reproducing bug: https://github.com/mctep/vs-code-tsconfig-bug
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugtypescriptTypescript support issuesTypescript support issues