Skip to content

tsserverlibrary.d.ts throws error TS2304: Cannot find name 'Comparison' #16782

Closed
@Quramy

Description

@Quramy

TypeScript Version: 2.4.1

Code

import * as ts from "typescript/lib/tsserverlibrary";
let factory: ts.server.PluginModuleFactory;

Compiling the above code, a compilation error, error TS2304: Cannot find name 'Comparison', occurs.

And my tsconfig.json is the following :
(It's just generated one by tsc --init)

{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "strict": true
  }
}

Expected behavior:

No compilation error.

Actual behavior:

tsc throws the following error:

node_modules/typescript/lib/tsserverlibrary.d.ts(3845,181): error TS2304: Cannot find name 'Comparison'.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions