https://github.com/uid11/jsdocparsingmode-error-example
jsDocParsingMode error example
https://github.com/uid11/jsdocparsingmode-error-example
Last synced: about 2 months ago
JSON representation
jsDocParsingMode error example
- Host: GitHub
- URL: https://github.com/uid11/jsdocparsingmode-error-example
- Owner: uid11
- Created: 2023-11-21T03:19:34.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-22T11:46:05.000Z (over 2 years ago)
- Last Synced: 2025-02-23T02:20:03.024Z (over 1 year ago)
- Language: TypeScript
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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: https://github.com/microsoft/TypeScript/issues/56478.
# How to reproduce the error
Clone the repository locally.
```sh
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
```