Closed
Description
Hi, I noticed recently that when I do a full build (npx tsc --build . --force
) I'm getting a bunch of errors like the following:
node_modules/@typescript/lib-dom/index.d.ts:2519:11 - error TS2430: Interface 'AudioParamMap' incorrectly extends interface 'ReadonlyMap<string, AudioParam>'.
Types of property 'forEach' are incompatible.
Type '(callbackfn: (value: AudioParam, key: string, parent: AudioParamMap) => void, thisArg?: any) => void' is not assignable to type '<This = undefined>(callbackfn: (this: This, value: AudioParam, key: string, map: this) => void, thisArg?: This | undefined) => void'.
Types of parameters 'callbackfn' and 'callbackfn' are incompatible.
Types of parameters 'map' and 'parent' are incompatible.
Type 'AudioParamMap' is not assignable to type 'this'.
'AudioParamMap' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'AudioParamMap'.
2519 interface AudioParamMap {
I think probably something changed in the stock typescript libs, but I'm having difficulty tracking down the source of these changes. I don't actually use these interfaces and subsequent builds (without --force
) don't repeat the errors, but I'm not sure what the net result is as I don't actually use the emitted code (I use @babel/preset-typescript
instead).
Could you have a look? This is with TypeScript v5.0.4 and skipLibCheck: false
(I use skipLibCheck: true
for the main project but I have some type declaration-only projects that I check more strictly).