diff --git a/CHANGELOG.md b/CHANGELOG.md index 2dacba0..7586593 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v2.3.1 + +- Fix type errors when including `dom.iterable` lib to the project (https://github.com/uhyo/better-typescript-lib/issues/30) + ## v2.3.0 This version newly includes improvements for DOM types (`fetch`). Thank you @aaditmshah! diff --git a/docs/diff/dom.generated.d.ts.md b/docs/diff/dom.generated.d.ts.md index 915ee96..9ac44a7 100644 --- a/docs/diff/dom.generated.d.ts.md +++ b/docs/diff/dom.generated.d.ts.md @@ -5,7 +5,27 @@ Index: dom.generated.d.ts =================================================================== --- dom.generated.d.ts +++ dom.generated.d.ts -@@ -2821,9 +2821,9 @@ +@@ -2515,11 +2515,16 @@ + new (): AudioParam; + }; + + interface AudioParamMap { +- forEach( +- callbackfn: (value: AudioParam, key: string, parent: AudioParamMap) => void, +- thisArg?: any ++ forEach( ++ callbackfn: ( ++ this: This, ++ value: AudioParam, ++ key: string, ++ parent: this ++ ) => void, ++ thisArg?: This + ): void; + } + + declare var AudioParamMap: { +@@ -2821,9 +2826,9 @@ readonly bodyUsed: boolean; arrayBuffer(): Promise; blob(): Promise; @@ -16,5 +36,95 @@ Index: dom.generated.d.ts } interface BroadcastChannelEventMap { +@@ -5948,11 +5953,11 @@ + readonly BUBBLING_PHASE: 3; + }; + + interface EventCounts { +- forEach( +- callbackfn: (value: number, key: string, parent: EventCounts) => void, +- thisArg?: any ++ forEach( ++ callbackfn: (this: This, value: number, key: string, parent: this) => void, ++ thisArg?: This + ): void; + } + + declare var EventCounts: { +@@ -6328,11 +6333,16 @@ + readonly ready: Promise; + readonly status: FontFaceSetLoadStatus; + check(font: string, text?: string): boolean; + load(font: string, text?: string): Promise; +- forEach( +- callbackfn: (value: FontFace, key: FontFace, parent: FontFaceSet) => void, +- thisArg?: any ++ forEach( ++ callbackfn: ( ++ this: This, ++ value: FontFace, ++ key: FontFace, ++ parent: this ++ ) => void, ++ thisArg?: This + ): void; + addEventListener( + type: K, + listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any, +@@ -11689,11 +11699,16 @@ + }; + + /** Available only in secure contexts. */ + interface MIDIInputMap { +- forEach( +- callbackfn: (value: MIDIInput, key: string, parent: MIDIInputMap) => void, +- thisArg?: any ++ forEach( ++ callbackfn: ( ++ this: This, ++ value: MIDIInput, ++ key: string, ++ parent: this ++ ) => void, ++ thisArg?: This + ): void; + } + + declare var MIDIInputMap: { +@@ -11742,11 +11757,16 @@ + }; + + /** Available only in secure contexts. */ + interface MIDIOutputMap { +- forEach( +- callbackfn: (value: MIDIOutput, key: string, parent: MIDIOutputMap) => void, +- thisArg?: any ++ forEach( ++ callbackfn: ( ++ this: This, ++ value: MIDIOutput, ++ key: string, ++ parent: this ++ ) => void, ++ thisArg?: This + ): void; + } + + declare var MIDIOutputMap: { +@@ -14680,11 +14700,11 @@ + new (descriptionInitDict: RTCSessionDescriptionInit): RTCSessionDescription; + }; + + interface RTCStatsReport { +- forEach( +- callbackfn: (value: any, key: string, parent: RTCStatsReport) => void, +- thisArg?: any ++ forEach( ++ callbackfn: (this: This, value: unknown, key: string, parent: this) => void, ++ thisArg?: This + ): void; + } + + declare var RTCStatsReport: { ``` diff --git a/package.json b/package.json index 13eafb4..c8beafd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "better-typescript-lib", "private": true, - "version": "2.3.0", + "version": "2.3.1", "description": "Better TypeScript standard library", "main": "index.js", "devDependencies": {