Skip to content

Commit

Permalink
chore: v2.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
uhyo committed May 19, 2023
1 parent 683f378 commit 9532aaf
Show file tree
Hide file tree
Showing 3 changed files with 116 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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!
Expand Down
112 changes: 111 additions & 1 deletion docs/diff/dom.generated.d.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<This = undefined>(
+ 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<ArrayBuffer>;
blob(): Promise<Blob>;
Expand All @@ -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<This = undefined>(
+ callbackfn: (this: This, value: number, key: string, parent: this) => void,
+ thisArg?: This
): void;
}

declare var EventCounts: {
@@ -6328,11 +6333,16 @@
readonly ready: Promise<FontFaceSet>;
readonly status: FontFaceSetLoadStatus;
check(font: string, text?: string): boolean;
load(font: string, text?: string): Promise<FontFace[]>;
- forEach(
- callbackfn: (value: FontFace, key: FontFace, parent: FontFaceSet) => void,
- thisArg?: any
+ forEach<This = undefined>(
+ callbackfn: (
+ this: This,
+ value: FontFace,
+ key: FontFace,
+ parent: this
+ ) => void,
+ thisArg?: This
): void;
addEventListener<K extends keyof FontFaceSetEventMap>(
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<This = undefined>(
+ 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<This = undefined>(
+ 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<This = undefined>(
+ callbackfn: (this: This, value: unknown, key: string, parent: this) => void,
+ thisArg?: This
): void;
}

declare var RTCStatsReport: {

```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down

0 comments on commit 9532aaf

Please sign in to comment.