Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Libraries aren't automatically included when a high target is selected #608

Open
nponeccop opened this issue May 30, 2019 · 0 comments
Open

Comments

@nponeccop
Copy link

Expected behavior:

Whenever a tsconfig.json works with tsc, it works with langserver as well. E.g. it doesn't show errors on files which build with tsc just fine.

Actual behavior:

If I have a modern target in tsconfig.json, tsc includes the relevant libs automatically while langserver doesn't and shows an error because it doesn't recognize Map and Promise.

Detailed description:

I have the following tsconfig.json:

{
  "compilerOptions": {
    "target": "es2019",
    "module": "commonjs",
    "lib": ["es2015"],
    "strict": true,
    "esModuleInterop": true
  }
}

Which works both with tsc -p . and langserver.

However, when I delete the lib line, the langserver stops recognizing the library features such as Promise and Map.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant