Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 993 Bytes

README.md

File metadata and controls

31 lines (20 loc) · 993 Bytes

jsDocParsingMode + exactOptionalPropertyTypes error

It seems that in the TypeScript 5.3.2 the exactOptionalPropertyTypes: true option leads to an error in the jsDocParsingMode field type in the node_modules/typescript/lib/typescript.d.ts file.

TypeScript issue: microsoft/TypeScript#56478.

How to reproduce the error

Clone the repository locally.

npm install

npm run tsc

Error text:

node_modules/typescript/lib/typescript.d.ts:3287:24 - error TS2420: Class 'Project' incorrectly implements interface 'LanguageServiceHost'.
  Types of property 'jsDocParsingMode' are incompatible.
    Type 'JSDocParsingMode | undefined' is not assignable to type 'JSDocParsingMode'.
      Type 'undefined' is not assignable to type 'JSDocParsingMode'.

3287         abstract class Project implements LanguageServiceHost, ModuleResolutionHost {
                            ~~~~~~~


Found 1 error in node_modules/typescript/lib/typescript.d.ts:3287