You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When upgrading to package 4.2.2 from 4.1.1
I'm getting the following errors during compile time:
I tried commenting out any references to the module but it keeps appearing.
node_modules/typescript/lib/lib.es2015.iterable.d.ts:60:5 - error TS2411: Property '[Symbol.iterator]' of type '() => IterableIterator<TValue>' is not assignable to 'symbol' index type 'CommentToken'.
[Symbol.iterator](): IterableIterator<T>;
node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:99:5 - error TS2411: Property '[Symbol.unscopables]' of type '() => { copyWithin: boolean; entries: boolean; fill: boolean; find: boolean; findIndex: boolean; keys: boolean; values: boolean; }' is not assignable to 'symbol' index type 'CommentToken'.
[Symbol.unscopables](): {
copyWithin: boolean;
...
values: boolean;
};
The text was updated successfully, but these errors were encountered:
Edit:
I just noticed this error confusingly only occurs if you're compiling .ts-code using the --build command line switch, so opening an issue @ TypeScript might be a good idea.
Edit 2: Did so: microsoft/TypeScript#49739
As far as I can tell, this version of comment-json is not usable in TypeScript as described by you.
I'll go write a PR fixing this issue, however there is a workaround you might want to use until my PR is merged:
Install working comment-json type declarations by adding this to the devDependencies:
"@types/comment-json": "npm:comment-json@4.1.1"
Tweak your tsconfig.json for making TypeScript load the working types by adding this to the compilerOptions:
This will make typescript load the type declarations from comment-json@4.1.1 instead of the version currently installed.
Actually, you could use any package name other than @types/comment-json as an alias for comment-json@4.1.1 but I think @types/comment-json speaks for itself better than anything else could do.
manuth
added a commit
to manuth/node-comment-json
that referenced
this issue
Jun 29, 2022
When upgrading to package 4.2.2 from 4.1.1
I'm getting the following errors during compile time:
I tried commenting out any references to the module but it keeps appearing.
The text was updated successfully, but these errors were encountered: