Skip to content

feat: upgrade to TS 5.5 #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion TypeScript
Submodule TypeScript updated 20274 files
39 changes: 27 additions & 12 deletions docs/diff/dom.generated.d.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Index: dom.generated.d.ts
===================================================================
--- dom.generated.d.ts
+++ dom.generated.d.ts
@@ -2944,11 +2944,16 @@
@@ -2969,11 +2969,16 @@
};

/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioParamMap) */
Expand All @@ -25,7 +25,7 @@ Index: dom.generated.d.ts
}

declare var AudioParamMap: {
@@ -3369,9 +3374,9 @@
@@ -3394,9 +3399,9 @@
blob(): Promise<Blob>;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */
formData(): Promise<FormData>;
Expand All @@ -36,7 +36,22 @@ Index: dom.generated.d.ts
text(): Promise<string>;
}

@@ -8872,11 +8877,11 @@
@@ -6530,11 +6535,11 @@
};

/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomStateSet) */
interface CustomStateSet {
- forEach(
- callbackfn: (value: string, key: string, parent: CustomStateSet) => void,
- thisArg?: any,
+ forEach<This = undefined>(
+ callbackfn: (this: This, value: string, key: string, parent: this) => void,
+ thisArg?: This,
): void;
}

declare var CustomStateSet: {
@@ -8960,11 +8965,11 @@
};

/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventCounts) */
Expand All @@ -51,7 +66,7 @@ Index: dom.generated.d.ts
}

declare var EventCounts: {
@@ -9420,11 +9425,16 @@
@@ -9508,11 +9513,16 @@
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/check) */
check(font: string, text?: string): boolean;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/load) */
Expand All @@ -71,7 +86,7 @@ Index: dom.generated.d.ts
addEventListener<K extends keyof FontFaceSetEventMap>(
type: K,
listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any,
@@ -15711,15 +15721,16 @@
@@ -15863,15 +15873,16 @@
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Highlight/priority) */
priority: number;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Highlight/type) */
Expand All @@ -91,7 +106,7 @@ Index: dom.generated.d.ts
}

declare var Highlight: {
@@ -15728,15 +15739,16 @@
@@ -15880,15 +15891,16 @@
};

/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HighlightRegistry) */
Expand All @@ -111,7 +126,7 @@ Index: dom.generated.d.ts
}

declare var HighlightRegistry: {
@@ -17139,11 +17151,16 @@
@@ -17314,11 +17326,16 @@
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIInputMap)
*/
Expand All @@ -131,7 +146,7 @@ Index: dom.generated.d.ts
}

declare var MIDIInputMap: {
@@ -17206,11 +17223,16 @@
@@ -17381,11 +17398,16 @@
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIOutputMap)
*/
Expand All @@ -151,7 +166,7 @@ Index: dom.generated.d.ts
}

declare var MIDIOutputMap: {
@@ -19085,9 +19107,9 @@
@@ -19260,9 +19282,9 @@
new (): NodeList;
};

Expand All @@ -162,7 +177,7 @@ Index: dom.generated.d.ts
* Performs the specified action for each node in an list.
* @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the list.
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
@@ -21527,11 +21549,11 @@
@@ -21702,11 +21724,11 @@
};

/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCStatsReport) */
Expand All @@ -177,7 +192,7 @@ Index: dom.generated.d.ts
}

declare var RTCStatsReport: {
@@ -34291,13 +34313,16 @@
@@ -34477,13 +34499,16 @@
handler: TimerHandler,
timeout?: number,
...arguments: any[]
Expand All @@ -196,7 +211,7 @@ Index: dom.generated.d.ts
declare var sessionStorage: Storage;
declare function addEventListener<K extends keyof WindowEventMap>(
type: K,
@@ -34956,4 +34981,125 @@
@@ -35141,4 +35166,125 @@
| "blob"
| "document"
| "json"
Expand Down
16 changes: 8 additions & 8 deletions docs/diff/es2015.core.d.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Index: es2015.core.d.ts

/**
* Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
@@ -54,23 +64,23 @@
@@ -59,23 +69,23 @@
}

interface ArrayConstructor {
Expand Down Expand Up @@ -85,7 +85,7 @@ Index: es2015.core.d.ts

/**
* Returns a new array from a set of elements.
@@ -273,49 +283,20 @@
@@ -278,49 +288,20 @@
/**
* Copy the values of all of the enumerable own properties from one or more source objects to a
* target object. Returns the target object.
Expand Down Expand Up @@ -140,7 +140,7 @@ Index: es2015.core.d.ts
/**
* Returns the names of the enumerable string properties and methods of an object.
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
@@ -326,16 +307,23 @@
@@ -331,16 +312,23 @@
* Returns true if the values are the same value, false otherwise.
* @param value1 The first value.
* @param value2 The second value.
Expand All @@ -166,7 +166,7 @@ Index: es2015.core.d.ts

interface ReadonlyArray<T> {
/**
@@ -346,15 +334,25 @@
@@ -351,15 +339,25 @@
* immediately returns that element value. Otherwise, find returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
Expand Down Expand Up @@ -198,7 +198,7 @@ Index: es2015.core.d.ts

/**
* Returns the index of the first element in the array where predicate is true, and -1
@@ -364,11 +362,11 @@
@@ -369,11 +367,11 @@
* findIndex immediately returns that element index. Otherwise, findIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
Expand All @@ -210,10 +210,10 @@ Index: es2015.core.d.ts
+ predicate: (this: This, value: T, index: number, obj: this) => boolean,
+ thisArg?: This,
): number;
}

interface RegExp {
@@ -428,26 +426,17 @@
toLocaleString(
locales: string | string[],
@@ -438,26 +436,17 @@
* same as the corresponding elements of this object (converted to a String) starting at
* endPosition – length(this). Otherwise returns false.
*/
Expand Down
20 changes: 10 additions & 10 deletions docs/diff/es2020.bigint.d.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ Index: es2020.bigint.d.ts

/**
* Sorts the array.
@@ -545,20 +558,23 @@
@@ -548,20 +561,23 @@
* Returns a new array from a set of elements.
* @param items A set of elements to include in the new array object.
*/
Expand Down Expand Up @@ -297,7 +297,7 @@ Index: es2020.bigint.d.ts
}

declare var BigInt64Array: BigInt64ArrayConstructor;
@@ -592,20 +608,24 @@
@@ -595,20 +611,24 @@
copyWithin(target: number, start: number, end?: number): this;

/** Yields index, value pairs for every entry in the array. */
Expand Down Expand Up @@ -326,7 +326,7 @@ Index: es2020.bigint.d.ts

/**
* Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
@@ -615,21 +635,24 @@
@@ -618,21 +638,24 @@
* @param end index to stop filling the array at. If end is negative, it is treated as
* length+end.
*/
Expand Down Expand Up @@ -356,7 +356,7 @@ Index: es2020.bigint.d.ts
* Returns the value of the first element in the array where predicate is true, and undefined
* otherwise.
* @param predicate find calls predicate once for each element of the array, in ascending
@@ -637,13 +660,17 @@
@@ -640,13 +663,17 @@
* immediately returns that element value. Otherwise, find returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
Expand All @@ -378,7 +378,7 @@ Index: es2020.bigint.d.ts
* Returns the index of the first element in the array where predicate is true, and -1
* otherwise.
* @param predicate find calls predicate once for each element of the array, in ascending
@@ -651,23 +678,27 @@
@@ -654,23 +681,27 @@
* findIndex immediately returns that element index. Otherwise, findIndex returns -1.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
Expand Down Expand Up @@ -413,7 +413,7 @@ Index: es2020.bigint.d.ts

/**
* Determines whether an array includes a certain element, returning true or false as appropriate.
@@ -703,41 +734,40 @@
@@ -706,41 +737,40 @@
lastIndexOf(searchElement: bigint, fromIndex?: number): number;

/** The length of the array. */
Expand Down Expand Up @@ -468,7 +468,7 @@ Index: es2020.bigint.d.ts
* Calls the specified callback function for all the elements in an array. The return value of
* the callback function is the accumulated result, and is provided as an argument in the next
* call to the callback function.
@@ -746,37 +776,32 @@
@@ -749,37 +779,32 @@
* @param initialValue If initialValue is specified, it is used as the initial value to start
* the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
Expand Down Expand Up @@ -513,7 +513,7 @@ Index: es2020.bigint.d.ts
* Calls the specified callback function for all the elements in an array, in descending order.
* The return value of the callback function is the accumulated result, and is provided as an
* argument in the next call to the callback function.
@@ -785,14 +810,14 @@
@@ -788,14 +813,14 @@
* @param initialValue If initialValue is specified, it is used as the initial value to start
* the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
Expand All @@ -530,7 +530,7 @@ Index: es2020.bigint.d.ts
initialValue: U,
): U;

@@ -811,20 +836,24 @@
@@ -814,20 +839,24 @@
* @param start The beginning of the specified portion of the array.
* @param end The end of the specified portion of the array.
*/
Expand Down Expand Up @@ -559,7 +559,7 @@ Index: es2020.bigint.d.ts

/**
* Sorts the array.
@@ -876,20 +905,23 @@
@@ -882,20 +911,23 @@
* Returns a new array from a set of elements.
* @param items A set of elements to include in the new array object.
*/
Expand Down
2 changes: 1 addition & 1 deletion docs/diff/es5.d.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -3570,7 +3570,7 @@ Index: es5.d.ts
}
declare var Float64Array: Float64ArrayConstructor;

@@ -5551,4 +5465,33 @@
@@ -5584,4 +5498,33 @@
locales?: string | string[],
options?: Intl.DateTimeFormatOptions,
): string;
Expand Down
7 changes: 7 additions & 0 deletions generated/lib.dom.asynciterable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ interface FileSystemDirectoryHandle {
keys(): AsyncIterableIterator<string>;
values(): AsyncIterableIterator<FileSystemHandle>;
}

interface ReadableStream<R = any> {
[Symbol.asyncIterator](
options?: ReadableStreamIteratorOptions,
): AsyncIterableIterator<R>;
values(options?: ReadableStreamIteratorOptions): AsyncIterableIterator<R>;
}
Loading
Loading