Skip to content

Multiple tsconfig.json bug #29316

@mctep

Description

@mctep
  • 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

  1. Open project in VScode with any closed tabs code ..
  2. Open client/client.ts.ts in VScode. There is right error [ts] Cannot find name 'global'
  3. Open server.ts. Right erorr [ts] Cannot find name 'window';
  4. Close client.ts. Open client.ts.
  5. Focus server.ts. There are no errors. All types have found.
  6. Close server.ts. Open server.ts. Right erorr [ts] Cannot find name 'window'.

Case 2

  1. Open project in VScode with any closed tabs code ..
  2. Open server.ts. Right erorr [ts] Cannot find name 'window';
  3. 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 bugtypescriptTypescript support issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions