Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.
This repository was 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

@nponeccop

Description

@nponeccop

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions