diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b296219..7d43e5d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -63,7 +63,7 @@ Follow below steps to run tests locally. 1. `npm run build:tsc` 2. `npm run build:lib` 3. `npm run build:package` -4. `npm run install` in tests directory +4. `npm install` in tests directory 5. `npm test` in tests directory ## Upgrading TypeScript version diff --git a/TypeScript b/TypeScript index a7e3374..d701d90 160000 --- a/TypeScript +++ b/TypeScript @@ -1 +1 @@ -Subproject commit a7e3374f13327483fbe94e32806d65785b0b6cda +Subproject commit d701d908d534e68cfab24b6df15539014ac348a3 diff --git a/build/logic/generate.ts b/build/logic/generate.ts index b98d71c..28a9419 100644 --- a/build/logic/generate.ts +++ b/build/logic/generate.ts @@ -303,6 +303,7 @@ function isPartialReplacement( betterFile: ts.SourceFile, ): boolean { // Compare type parameters and herigate using full text. + if (interfaceDecl.name.escapedText === "Uint8Array") debugger; if ( interfaceDecl.typeParameters !== undefined && replacementDecl.typeParameters !== undefined && @@ -313,8 +314,8 @@ function isPartialReplacement( if ( interfaceDecl.typeParameters.some((typeParam, index) => { return ( - typeParam.getFullText(originalFile) !== - rtp[index].getFullText(betterFile) + typeParam.getFullText(originalFile).trim() !== + rtp[index].getFullText(betterFile).trim() ); }) ) { diff --git a/docs/diff/dom.generated.d.ts.md b/docs/diff/dom.generated.d.ts.md index dfef2c2..d456897 100644 --- a/docs/diff/dom.generated.d.ts.md +++ b/docs/diff/dom.generated.d.ts.md @@ -5,7 +5,7 @@ Index: dom.generated.d.ts =================================================================== --- dom.generated.d.ts +++ dom.generated.d.ts -@@ -2972,11 +2972,16 @@ +@@ -3293,11 +3293,16 @@ }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioParamMap) */ @@ -25,8 +25,8 @@ Index: dom.generated.d.ts } declare var AudioParamMap: { -@@ -3401,9 +3406,9 @@ - blob(): Promise; +@@ -3726,9 +3731,9 @@ + bytes(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */ formData(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/json) */ @@ -36,7 +36,7 @@ Index: dom.generated.d.ts text(): Promise; } -@@ -6551,11 +6556,11 @@ +@@ -6927,11 +6932,11 @@ }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomStateSet) */ @@ -51,7 +51,7 @@ Index: dom.generated.d.ts } declare var CustomStateSet: { -@@ -8926,11 +8931,11 @@ +@@ -9378,11 +9383,11 @@ }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventCounts) */ @@ -66,7 +66,7 @@ Index: dom.generated.d.ts } declare var EventCounts: { -@@ -9462,11 +9467,16 @@ +@@ -9914,11 +9919,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) */ @@ -86,7 +86,7 @@ Index: dom.generated.d.ts addEventListener( type: K, listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any, -@@ -15358,15 +15368,16 @@ +@@ -16210,15 +16220,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) */ @@ -106,7 +106,7 @@ Index: dom.generated.d.ts } declare var Highlight: { -@@ -15375,15 +15386,16 @@ +@@ -16227,15 +16238,16 @@ }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HighlightRegistry) */ @@ -126,7 +126,7 @@ Index: dom.generated.d.ts } declare var HighlightRegistry: { -@@ -16809,11 +16821,16 @@ +@@ -17663,11 +17675,16 @@ * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIInputMap) */ @@ -146,7 +146,7 @@ Index: dom.generated.d.ts } declare var MIDIInputMap: { -@@ -16876,11 +16893,16 @@ +@@ -17730,11 +17747,16 @@ * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIOutputMap) */ @@ -166,7 +166,7 @@ Index: dom.generated.d.ts } declare var MIDIOutputMap: { -@@ -18739,9 +18761,9 @@ +@@ -19528,9 +19550,9 @@ new (): NodeList; }; @@ -177,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. -@@ -21159,11 +21181,11 @@ +@@ -22073,11 +22095,11 @@ }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCStatsReport) */ @@ -192,7 +192,7 @@ Index: dom.generated.d.ts } declare var RTCStatsReport: { -@@ -33973,13 +33995,16 @@ +@@ -34926,13 +34948,16 @@ handler: TimerHandler, timeout?: number, ...arguments: any[] @@ -211,7 +211,7 @@ Index: dom.generated.d.ts declare var sessionStorage: Storage; declare function addEventListener( type: K, -@@ -34638,4 +34663,125 @@ +@@ -35607,4 +35632,125 @@ | "blob" | "document" | "json" diff --git a/docs/diff/es2015.iterable.d.ts.md b/docs/diff/es2015.iterable.d.ts.md index bd9999f..d57b79d 100644 --- a/docs/diff/es2015.iterable.d.ts.md +++ b/docs/diff/es2015.iterable.d.ts.md @@ -90,282 +90,337 @@ Index: es2015.iterable.d.ts interface StringIterator extends IteratorObject { -@@ -283,19 +281,23 @@ +@@ -283,26 +281,23 @@ } interface Int8ArrayConstructor { - new (elements: Iterable): Int8Array; + new (elements: Iterable): Int8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. +- * @param mapfn A mapping function to call on every element of the array. +- * @param thisArg Value of 'this' used to invoke the mapfn. + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. -+ */ -+ from(iterable: Iterable | ArrayLike): Int8Array; -+ /** + */ +- from(arrayLike: Iterable): Int8Array; ++ from(iterable: Iterable | ArrayLike): Int8Array; + /** +- * Creates an array from an array-like or iterable object. +- * @param arrayLike An array-like or iterable object to convert to an array. + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ -- from( -- arrayLike: Iterable, -- mapfn?: (v: number, k: number) => number, +- from( +- arrayLike: Iterable, +- mapfn?: (v: T, k: number) => number, - thisArg?: any, + from( + iterable: Iterable | ArrayLike, + mapfn: (this: This, v: T, k: number) => number, + thisArg?: This, - ): Int8Array; + ): Int8Array; } - interface Uint8Array { -@@ -315,19 +317,23 @@ + interface Uint8Array { +@@ -322,26 +317,23 @@ } interface Uint8ArrayConstructor { - new (elements: Iterable): Uint8Array; + new (elements: Iterable): Uint8Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. +- * @param mapfn A mapping function to call on every element of the array. +- * @param thisArg Value of 'this' used to invoke the mapfn. + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. -+ */ -+ from(iterable: Iterable | ArrayLike): Uint8Array; -+ /** + */ +- from(arrayLike: Iterable): Uint8Array; ++ from(iterable: Iterable | ArrayLike): Uint8Array; + /** +- * Creates an array from an array-like or iterable object. +- * @param arrayLike An array-like or iterable object to convert to an array. + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ -- from( -- arrayLike: Iterable, -- mapfn?: (v: number, k: number) => number, +- from( +- arrayLike: Iterable, +- mapfn?: (v: T, k: number) => number, - thisArg?: any, + from( + iterable: Iterable | ArrayLike, + mapfn: (this: This, v: T, k: number) => number, + thisArg?: This, - ): Uint8Array; + ): Uint8Array; } - interface Uint8ClampedArray { -@@ -349,19 +355,23 @@ + interface Uint8ClampedArray { +@@ -363,26 +355,25 @@ } interface Uint8ClampedArrayConstructor { - new (elements: Iterable): Uint8ClampedArray; + new (elements: Iterable): Uint8ClampedArray; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. +- * @param mapfn A mapping function to call on every element of the array. +- * @param thisArg Value of 'this' used to invoke the mapfn. + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. -+ */ -+ from(iterable: Iterable | ArrayLike): Uint8ClampedArray; -+ /** + */ +- from(arrayLike: Iterable): Uint8ClampedArray; ++ from( ++ iterable: Iterable | ArrayLike, ++ ): Uint8ClampedArray; + /** +- * Creates an array from an array-like or iterable object. +- * @param arrayLike An array-like or iterable object to convert to an array. + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ -- from( -- arrayLike: Iterable, -- mapfn?: (v: number, k: number) => number, +- from( +- arrayLike: Iterable, +- mapfn?: (v: T, k: number) => number, - thisArg?: any, + from( + iterable: Iterable | ArrayLike, + mapfn: (this: This, v: T, k: number) => number, + thisArg?: This, - ): Uint8ClampedArray; + ): Uint8ClampedArray; } - interface Int16Array { -@@ -383,19 +393,23 @@ + interface Int16Array { +@@ -404,26 +395,23 @@ } interface Int16ArrayConstructor { - new (elements: Iterable): Int16Array; + new (elements: Iterable): Int16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. +- * @param mapfn A mapping function to call on every element of the array. +- * @param thisArg Value of 'this' used to invoke the mapfn. + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. -+ */ -+ from(iterable: Iterable | ArrayLike): Int16Array; -+ /** + */ +- from(arrayLike: Iterable): Int16Array; ++ from(iterable: Iterable | ArrayLike): Int16Array; + /** +- * Creates an array from an array-like or iterable object. +- * @param arrayLike An array-like or iterable object to convert to an array. + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ -- from( -- arrayLike: Iterable, -- mapfn?: (v: number, k: number) => number, +- from( +- arrayLike: Iterable, +- mapfn?: (v: T, k: number) => number, - thisArg?: any, + from( + iterable: Iterable | ArrayLike, + mapfn: (this: This, v: T, k: number) => number, + thisArg?: This, - ): Int16Array; + ): Int16Array; } - interface Uint16Array { -@@ -415,19 +429,23 @@ + interface Uint16Array { +@@ -443,26 +431,25 @@ } interface Uint16ArrayConstructor { - new (elements: Iterable): Uint16Array; + new (elements: Iterable): Uint16Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. +- * @param mapfn A mapping function to call on every element of the array. +- * @param thisArg Value of 'this' used to invoke the mapfn. + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. -+ */ -+ from(iterable: Iterable | ArrayLike): Uint16Array; -+ /** + */ +- from(arrayLike: Iterable): Uint16Array; ++ from( ++ iterable: Iterable | ArrayLike, ++ ): Uint16Array; + /** +- * Creates an array from an array-like or iterable object. +- * @param arrayLike An array-like or iterable object to convert to an array. + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ -- from( -- arrayLike: Iterable, -- mapfn?: (v: number, k: number) => number, +- from( +- arrayLike: Iterable, +- mapfn?: (v: T, k: number) => number, - thisArg?: any, + from( + iterable: Iterable | ArrayLike, + mapfn: (this: This, v: T, k: number) => number, + thisArg?: This, - ): Uint16Array; + ): Uint16Array; } - interface Int32Array { -@@ -447,19 +465,23 @@ + interface Int32Array { +@@ -482,26 +469,23 @@ } interface Int32ArrayConstructor { - new (elements: Iterable): Int32Array; + new (elements: Iterable): Int32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. +- * @param mapfn A mapping function to call on every element of the array. +- * @param thisArg Value of 'this' used to invoke the mapfn. + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. -+ */ -+ from(iterable: Iterable | ArrayLike): Int32Array; -+ /** + */ +- from(arrayLike: Iterable): Int32Array; ++ from(iterable: Iterable | ArrayLike): Int32Array; + /** +- * Creates an array from an array-like or iterable object. +- * @param arrayLike An array-like or iterable object to convert to an array. + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ -- from( -- arrayLike: Iterable, -- mapfn?: (v: number, k: number) => number, +- from( +- arrayLike: Iterable, +- mapfn?: (v: T, k: number) => number, - thisArg?: any, + from( + iterable: Iterable | ArrayLike, + mapfn: (this: This, v: T, k: number) => number, + thisArg?: This, - ): Int32Array; + ): Int32Array; } - interface Uint32Array { -@@ -479,19 +501,23 @@ + interface Uint32Array { +@@ -521,26 +505,25 @@ } interface Uint32ArrayConstructor { - new (elements: Iterable): Uint32Array; + new (elements: Iterable): Uint32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. +- * @param mapfn A mapping function to call on every element of the array. +- * @param thisArg Value of 'this' used to invoke the mapfn. + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. -+ */ -+ from(iterable: Iterable | ArrayLike): Uint32Array; -+ /** + */ +- from(arrayLike: Iterable): Uint32Array; ++ from( ++ iterable: Iterable | ArrayLike, ++ ): Uint32Array; + /** +- * Creates an array from an array-like or iterable object. +- * @param arrayLike An array-like or iterable object to convert to an array. + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ -- from( -- arrayLike: Iterable, -- mapfn?: (v: number, k: number) => number, +- from( +- arrayLike: Iterable, +- mapfn?: (v: T, k: number) => number, - thisArg?: any, + from( + iterable: Iterable | ArrayLike, + mapfn: (this: This, v: T, k: number) => number, + thisArg?: This, - ): Uint32Array; + ): Uint32Array; } - interface Float32Array { -@@ -511,19 +537,23 @@ + interface Float32Array { +@@ -560,26 +543,25 @@ } interface Float32ArrayConstructor { - new (elements: Iterable): Float32Array; + new (elements: Iterable): Float32Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. +- * @param mapfn A mapping function to call on every element of the array. +- * @param thisArg Value of 'this' used to invoke the mapfn. + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. -+ */ -+ from(iterable: Iterable | ArrayLike): Float32Array; -+ /** + */ +- from(arrayLike: Iterable): Float32Array; ++ from( ++ iterable: Iterable | ArrayLike, ++ ): Float32Array; + /** +- * Creates an array from an array-like or iterable object. +- * @param arrayLike An array-like or iterable object to convert to an array. + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ -- from( -- arrayLike: Iterable, -- mapfn?: (v: number, k: number) => number, +- from( +- arrayLike: Iterable, +- mapfn?: (v: T, k: number) => number, - thisArg?: any, + from( + iterable: Iterable | ArrayLike, + mapfn: (this: This, v: T, k: number) => number, + thisArg?: This, - ): Float32Array; + ): Float32Array; } - interface Float64Array { -@@ -543,17 +573,21 @@ + interface Float64Array { +@@ -599,24 +581,23 @@ } interface Float64ArrayConstructor { - new (elements: Iterable): Float64Array; + new (elements: Iterable): Float64Array; - /** - * Creates an array from an array-like or iterable object. - * @param arrayLike An array-like or iterable object to convert to an array. +- * @param mapfn A mapping function to call on every element of the array. +- * @param thisArg Value of 'this' used to invoke the mapfn. + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. -+ */ -+ from(iterable: Iterable | ArrayLike): Float64Array; -+ /** + */ +- from(arrayLike: Iterable): Float64Array; ++ from( ++ iterable: Iterable | ArrayLike, ++ ): Float64Array; + /** +- * Creates an array from an array-like or iterable object. +- * @param arrayLike An array-like or iterable object to convert to an array. + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ -- from( -- arrayLike: Iterable, -- mapfn?: (v: number, k: number) => number, +- from( +- arrayLike: Iterable, +- mapfn?: (v: T, k: number) => number, - thisArg?: any, + from( + iterable: Iterable | ArrayLike, + mapfn: (this: This, v: T, k: number) => number, + thisArg?: This, - ): Float64Array; + ): Float64Array; } ``` diff --git a/docs/diff/es2020.bigint.d.ts.md b/docs/diff/es2020.bigint.d.ts.md index f567d4a..4697ef7 100644 --- a/docs/diff/es2020.bigint.d.ts.md +++ b/docs/diff/es2020.bigint.d.ts.md @@ -5,7 +5,7 @@ Index: es2020.bigint.d.ts =================================================================== --- es2020.bigint.d.ts +++ es2020.bigint.d.ts -@@ -261,20 +261,24 @@ +@@ -263,24 +263,24 @@ copyWithin(target: number, start: number, end?: number): this; /** Yields index, value pairs for every entry in the array. */ @@ -20,21 +20,21 @@ Index: es2020.bigint.d.ts * If thisArg is omitted, undefined is used as the this value. */ - every( -- predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, -- thisArg?: any, + every( -+ predicate: ( + predicate: ( + this: This, -+ value: bigint, -+ index: number, + value: bigint, + index: number, +- array: BigInt64Array, + array: this, -+ ) => boolean, + ) => boolean, +- thisArg?: any, + thisArg?: This, ): boolean; /** * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array -@@ -284,21 +288,24 @@ +@@ -290,25 +290,24 @@ * @param end index to stop filling the array at. If end is negative, it is treated as * length+end. */ @@ -48,37 +48,39 @@ Index: es2020.bigint.d.ts * If thisArg is omitted, undefined is used as the this value. */ - filter( -- predicate: (value: bigint, index: number, array: BigInt64Array) => any, -- thisArg?: any, + filter( -+ predicate: ( + predicate: ( + this: This, -+ value: bigint, -+ index: number, + value: bigint, + index: number, +- array: BigInt64Array, +- ) => any, +- thisArg?: any, +- ): BigInt64Array; +- + array: this, + ) => boolean, + thisArg?: This, - ): BigInt64Array; -- ++ ): BigInt64Array; /** * 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 -@@ -306,13 +313,17 @@ +@@ -316,17 +315,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. */ - find( -- predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, -- thisArg?: any, + find( -+ predicate: ( + predicate: ( + this: This, -+ value: bigint, -+ index: number, + value: bigint, + index: number, +- array: BigInt64Array, + array: this, -+ ) => boolean, + ) => boolean, +- thisArg?: any, + thisArg?: This, ): bigint | undefined; - @@ -86,21 +88,21 @@ 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 -@@ -320,23 +331,27 @@ +@@ -334,31 +333,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. */ - findIndex( -- predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, -- thisArg?: any, + findIndex( -+ predicate: ( + predicate: ( + this: This, -+ value: bigint, -+ index: number, + value: bigint, + index: number, +- array: BigInt64Array, + array: this, -+ ) => boolean, + ) => boolean, +- thisArg?: any, + thisArg?: This, ): number; - @@ -112,7 +114,11 @@ Index: es2020.bigint.d.ts * If thisArg is omitted, undefined is used as the this value. */ - forEach( -- callbackfn: (value: bigint, index: number, array: BigInt64Array) => void, +- callbackfn: ( +- value: bigint, +- index: number, +- array: BigInt64Array, +- ) => void, - thisArg?: any, + forEach( + callbackfn: (this: This, value: bigint, index: number, array: this) => void, @@ -121,7 +127,7 @@ Index: es2020.bigint.d.ts /** * Determines whether an array includes a certain element, returning true or false as appropriate. -@@ -372,41 +387,40 @@ +@@ -394,45 +389,40 @@ lastIndexOf(searchElement: bigint, fromIndex?: number): number; /** The length of the array. */ @@ -136,18 +142,19 @@ Index: es2020.bigint.d.ts * If thisArg is omitted, undefined is used as the this value. */ - map( -- callbackfn: (value: bigint, index: number, array: BigInt64Array) => bigint, -- thisArg?: any, + map( -+ callbackfn: ( + callbackfn: ( + this: This, -+ value: bigint, -+ index: number, + value: bigint, + index: number, +- array: BigInt64Array, + array: this, -+ ) => bigint, -+ thisArg?: This, - ): BigInt64Array; + ) => bigint, +- thisArg?: any, +- ): BigInt64Array; - ++ thisArg?: This, ++ ): BigInt64Array; /** * 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 @@ -165,7 +172,7 @@ Index: es2020.bigint.d.ts + previousValue: bigint | U, currentValue: bigint, currentIndex: number, -- array: BigInt64Array, +- array: BigInt64Array, - ) => bigint, - ): bigint; - @@ -176,7 +183,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. -@@ -415,37 +429,32 @@ +@@ -441,37 +431,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. @@ -187,7 +194,7 @@ Index: es2020.bigint.d.ts previousValue: U, currentValue: bigint, currentIndex: number, -- array: BigInt64Array, +- array: BigInt64Array, + array: this, ) => U, initialValue: U, @@ -210,7 +217,7 @@ Index: es2020.bigint.d.ts + previousValue: bigint | U, currentValue: bigint, currentIndex: number, -- array: BigInt64Array, +- array: BigInt64Array, - ) => bigint, - ): bigint; - @@ -221,7 +228,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. -@@ -454,14 +463,14 @@ +@@ -480,14 +465,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. @@ -232,17 +239,17 @@ Index: es2020.bigint.d.ts previousValue: U, currentValue: bigint, currentIndex: number, -- array: BigInt64Array, +- array: BigInt64Array, + array: this, ) => U, initialValue: U, ): U; -@@ -480,20 +489,24 @@ +@@ -506,24 +491,24 @@ * @param start The beginning of the specified portion of the array. * @param end The end of the specified portion of the array. */ - slice(start?: number, end?: number): BigInt64Array; + slice(start?: number, end?: number): BigInt64Array; - /** * Determines whether the specified callback function returns true for any element of an array. @@ -253,38 +260,42 @@ Index: es2020.bigint.d.ts * If thisArg is omitted, undefined is used as the this value. */ - some( -- predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, -- thisArg?: any, + some( -+ predicate: ( + predicate: ( + this: This, -+ value: bigint, -+ index: number, + value: bigint, + index: number, +- array: BigInt64Array, + array: this, -+ ) => boolean, + ) => boolean, +- thisArg?: any, + thisArg?: This, ): boolean; /** * Sorts the array. -@@ -548,20 +561,23 @@ +@@ -578,26 +563,25 @@ * Returns a new array from a set of elements. * @param items A set of elements to include in the new array object. */ - of(...items: bigint[]): BigInt64Array; + of(...items: bigint[]): BigInt64Array; - /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. -+ */ -+ from(arrayLike: Iterable | ArrayLike): BigInt64Array; -+ /** -+ * Creates an array from an array-like or iterable object. -+ * @param arrayLike An array-like or iterable object to convert to an array. +- * @param mapfn A mapping function to call on every element of the array. +- * @param thisArg Value of 'this' used to invoke the mapfn. + */ +- from(arrayLike: ArrayLike): BigInt64Array; ++ from( ++ arrayLike: Iterable | ArrayLike, ++ ): BigInt64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like or iterable object to convert to an array. * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ -- from(arrayLike: ArrayLike): BigInt64Array; - from( - arrayLike: ArrayLike, - mapfn: (v: U, k: number) => bigint, @@ -293,11 +304,11 @@ Index: es2020.bigint.d.ts + arrayLike: Iterable | ArrayLike, + mapfn: (this: This, v: T, k: number) => bigint, + thisArg?: This, - ): BigInt64Array; + ): BigInt64Array; } - declare var BigInt64Array: BigInt64ArrayConstructor; -@@ -595,20 +611,24 @@ + +@@ -632,24 +616,24 @@ copyWithin(target: number, start: number, end?: number): this; /** Yields index, value pairs for every entry in the array. */ @@ -312,21 +323,21 @@ Index: es2020.bigint.d.ts * If thisArg is omitted, undefined is used as the this value. */ - every( -- predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, -- thisArg?: any, + every( -+ predicate: ( + predicate: ( + this: This, -+ value: bigint, -+ index: number, + value: bigint, + index: number, +- array: BigUint64Array, + array: this, -+ ) => boolean, + ) => boolean, +- thisArg?: any, + thisArg?: This, ): boolean; /** * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array -@@ -618,21 +638,24 @@ +@@ -659,25 +643,24 @@ * @param end index to stop filling the array at. If end is negative, it is treated as * length+end. */ @@ -340,37 +351,39 @@ Index: es2020.bigint.d.ts * If thisArg is omitted, undefined is used as the this value. */ - filter( -- predicate: (value: bigint, index: number, array: BigUint64Array) => any, -- thisArg?: any, + filter( -+ predicate: ( + predicate: ( + this: This, -+ value: bigint, -+ index: number, + value: bigint, + index: number, +- array: BigUint64Array, +- ) => any, +- thisArg?: any, +- ): BigUint64Array; +- + array: this, + ) => boolean, + thisArg?: This, - ): BigUint64Array; -- ++ ): BigUint64Array; /** * 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 -@@ -640,13 +663,17 @@ +@@ -685,17 +668,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. */ - find( -- predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, -- thisArg?: any, + find( -+ predicate: ( + predicate: ( + this: This, -+ value: bigint, -+ index: number, + value: bigint, + index: number, +- array: BigUint64Array, + array: this, -+ ) => boolean, + ) => boolean, +- thisArg?: any, + thisArg?: This, ): bigint | undefined; - @@ -378,21 +391,21 @@ 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 -@@ -654,23 +681,27 @@ +@@ -703,31 +686,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. */ - findIndex( -- predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, -- thisArg?: any, + findIndex( -+ predicate: ( + predicate: ( + this: This, -+ value: bigint, -+ index: number, + value: bigint, + index: number, +- array: BigUint64Array, + array: this, -+ ) => boolean, + ) => boolean, +- thisArg?: any, + thisArg?: This, ): number; - @@ -404,7 +417,11 @@ Index: es2020.bigint.d.ts * If thisArg is omitted, undefined is used as the this value. */ - forEach( -- callbackfn: (value: bigint, index: number, array: BigUint64Array) => void, +- callbackfn: ( +- value: bigint, +- index: number, +- array: BigUint64Array, +- ) => void, - thisArg?: any, + forEach( + callbackfn: (this: This, value: bigint, index: number, array: this) => void, @@ -413,7 +430,7 @@ Index: es2020.bigint.d.ts /** * Determines whether an array includes a certain element, returning true or false as appropriate. -@@ -706,41 +737,40 @@ +@@ -763,45 +742,40 @@ lastIndexOf(searchElement: bigint, fromIndex?: number): number; /** The length of the array. */ @@ -428,18 +445,19 @@ Index: es2020.bigint.d.ts * If thisArg is omitted, undefined is used as the this value. */ - map( -- callbackfn: (value: bigint, index: number, array: BigUint64Array) => bigint, -- thisArg?: any, + map( -+ callbackfn: ( + callbackfn: ( + this: This, -+ value: bigint, -+ index: number, + value: bigint, + index: number, +- array: BigUint64Array, + array: this, -+ ) => bigint, -+ thisArg?: This, - ): BigUint64Array; + ) => bigint, +- thisArg?: any, +- ): BigUint64Array; - ++ thisArg?: This, ++ ): BigUint64Array; /** * 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 @@ -457,7 +475,7 @@ Index: es2020.bigint.d.ts + previousValue: bigint | U, currentValue: bigint, currentIndex: number, -- array: BigUint64Array, +- array: BigUint64Array, - ) => bigint, - ): bigint; - @@ -468,7 +486,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. -@@ -749,37 +779,32 @@ +@@ -810,37 +784,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. @@ -479,7 +497,7 @@ Index: es2020.bigint.d.ts previousValue: U, currentValue: bigint, currentIndex: number, -- array: BigUint64Array, +- array: BigUint64Array, + array: this, ) => U, initialValue: U, @@ -502,7 +520,7 @@ Index: es2020.bigint.d.ts + previousValue: bigint | U, currentValue: bigint, currentIndex: number, -- array: BigUint64Array, +- array: BigUint64Array, - ) => bigint, - ): bigint; - @@ -513,7 +531,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. -@@ -788,14 +813,14 @@ +@@ -849,14 +818,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. @@ -524,17 +542,17 @@ Index: es2020.bigint.d.ts previousValue: U, currentValue: bigint, currentIndex: number, -- array: BigUint64Array, +- array: BigUint64Array, + array: this, ) => U, initialValue: U, ): U; -@@ -814,20 +839,24 @@ +@@ -875,24 +844,24 @@ * @param start The beginning of the specified portion of the array. * @param end The end of the specified portion of the array. */ - slice(start?: number, end?: number): BigUint64Array; + slice(start?: number, end?: number): BigUint64Array; - /** * Determines whether the specified callback function returns true for any element of an array. @@ -545,31 +563,33 @@ Index: es2020.bigint.d.ts * If thisArg is omitted, undefined is used as the this value. */ - some( -- predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, -- thisArg?: any, + some( -+ predicate: ( + predicate: ( + this: This, -+ value: bigint, -+ index: number, + value: bigint, + index: number, +- array: BigUint64Array, + array: this, -+ ) => boolean, + ) => boolean, +- thisArg?: any, + thisArg?: This, ): boolean; /** * Sorts the array. -@@ -882,20 +911,23 @@ +@@ -949,21 +918,26 @@ * Returns a new array from a set of elements. * @param items A set of elements to include in the new array object. */ - of(...items: bigint[]): BigUint64Array; + of(...items: bigint[]): BigUint64Array; - /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. + */ -+ from(arrayLike: Iterable | ArrayLike): BigUint64Array; ++ from( ++ arrayLike: Iterable | ArrayLike, ++ ): BigUint64Array; + /** + * Creates an array from an array-like or iterable object. + * @param arrayLike An array-like or iterable object to convert to an array. @@ -581,13 +601,15 @@ Index: es2020.bigint.d.ts - arrayLike: ArrayLike, - mapfn: (v: U, k: number) => bigint, - thisArg?: any, +- ): BigUint64Array; + from( + arrayLike: Iterable | ArrayLike, + mapfn: (this: This, v: T, k: number) => bigint, + thisArg?: This, - ): BigUint64Array; ++ ): BigUint64Array; } - declare var BigUint64Array: BigUint64ArrayConstructor; + + interface DataView { ``` diff --git a/docs/diff/es5.d.ts.md b/docs/diff/es5.d.ts.md index 7362d23..6ae6c9e 100644 --- a/docs/diff/es5.d.ts.md +++ b/docs/diff/es5.d.ts.md @@ -865,7 +865,7 @@ Index: es5.d.ts /** * Recursively unwraps the "awaited type" of a type. Non-promise "thenables" should resolve to `never`. This emulates the behavior of `await`. -@@ -2137,20 +2228,24 @@ +@@ -2138,20 +2229,24 @@ * is treated as length+end. * @param end If not specified, length of the this object is used as its default value. */ @@ -880,7 +880,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - every( -- predicate: (value: number, index: number, array: Int8Array) => unknown, +- predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, + every( + predicate: ( @@ -894,7 +894,7 @@ Index: es5.d.ts /** * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array -@@ -2160,21 +2255,24 @@ +@@ -2161,21 +2256,24 @@ * @param end index to stop filling the array at. If end is negative, it is treated as * length+end. */ @@ -908,8 +908,10 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - filter( -- predicate: (value: number, index: number, array: Int8Array) => any, +- predicate: (value: number, index: number, array: this) => any, - thisArg?: any, +- ): Int8Array; +- + filter( + predicate: ( + this: This, @@ -918,19 +920,18 @@ Index: es5.d.ts + array: this, + ) => boolean, + thisArg?: This, - ): Int8Array; -- ++ ): Int8Array; /** * 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 -@@ -2182,13 +2280,12 @@ +@@ -2183,13 +2281,12 @@ * 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. */ - find( -- predicate: (value: number, index: number, obj: Int8Array) => boolean, +- predicate: (value: number, index: number, obj: this) => boolean, - thisArg?: any, + find( + predicate: (this: This, value: number, index: number, obj: this) => boolean, @@ -941,13 +942,13 @@ Index: es5.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 -@@ -2196,23 +2293,22 @@ +@@ -2197,23 +2294,22 @@ * 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. */ - findIndex( -- predicate: (value: number, index: number, obj: Int8Array) => boolean, +- predicate: (value: number, index: number, obj: this) => boolean, - thisArg?: any, + findIndex( + predicate: (this: This, value: number, index: number, obj: this) => boolean, @@ -962,7 +963,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - forEach( -- callbackfn: (value: number, index: number, array: Int8Array) => void, +- callbackfn: (value: number, index: number, array: this) => void, - thisArg?: any, + forEach( + callbackfn: (this: This, value: number, index: number, array: this) => void, @@ -971,7 +972,7 @@ Index: es5.d.ts /** * Returns the index of the first occurrence of a value in an array. -@@ -2240,50 +2336,40 @@ +@@ -2241,50 +2337,40 @@ /** * The length of the array. */ @@ -986,8 +987,10 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - map( -- callbackfn: (value: number, index: number, array: Int8Array) => number, +- callbackfn: (value: number, index: number, array: this) => number, - thisArg?: any, +- ): Int8Array; +- + map( + callbackfn: ( + this: This, @@ -996,8 +999,7 @@ Index: es5.d.ts + array: this, + ) => number, + thisArg?: This, - ): Int8Array; -- ++ ): Int8Array; /** * 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 @@ -1015,7 +1017,7 @@ Index: es5.d.ts + previousValue: number | U, currentValue: number, currentIndex: number, -- array: Int8Array, + array: this, - ) => number, - ): number; - reduce( @@ -1023,19 +1025,18 @@ Index: es5.d.ts - previousValue: number, - currentValue: number, - currentIndex: number, -- array: Int8Array, +- array: this, - ) => number, - initialValue: number, - ): number; - -+ array: this, + ) => U, + ): number | U; /** * 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. -@@ -2292,46 +2378,32 @@ +@@ -2293,46 +2379,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. @@ -1046,8 +1047,7 @@ Index: es5.d.ts previousValue: U, currentValue: number, currentIndex: number, -- array: Int8Array, -+ array: this, + array: this, ) => U, initialValue: U, ): U; @@ -1069,7 +1069,7 @@ Index: es5.d.ts + previousValue: number | U, currentValue: number, currentIndex: number, -- array: Int8Array, + array: this, - ) => number, - ): number; - reduceRight( @@ -1077,19 +1077,18 @@ Index: es5.d.ts - previousValue: number, - currentValue: number, - currentIndex: number, -- array: Int8Array, +- array: this, - ) => number, - initialValue: number, - ): number; - -+ array: this, + ) => U, + ): number | U; /** * 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. -@@ -2340,14 +2412,14 @@ +@@ -2341,9 +2413,9 @@ * @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. @@ -1100,17 +1099,11 @@ Index: es5.d.ts previousValue: U, currentValue: number, currentIndex: number, -- array: Int8Array, -+ array: this, - ) => U, - initialValue: U, - ): U; - -@@ -2368,20 +2440,24 @@ +@@ -2369,20 +2441,24 @@ * @param start The beginning of the specified portion of the array. * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. */ - slice(start?: number, end?: number): Int8Array; + slice(start?: number, end?: number): Int8Array; - /** * Determines whether the specified callback function returns true for any element of an array. @@ -1121,7 +1114,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - some( -- predicate: (value: number, index: number, array: Int8Array) => unknown, +- predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, + some( + predicate: ( @@ -1135,17 +1128,17 @@ Index: es5.d.ts /** * Sorts an array. -@@ -2436,25 +2512,23 @@ +@@ -2438,25 +2514,23 @@ * Returns a new array from a set of elements. * @param items A set of elements to include in the new array object. */ - of(...items: number[]): Int8Array; + of(...items: number[]): Int8Array; - /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Int8Array; + from(arrayLike: ArrayLike): Int8Array; - /** * Creates an array from an array-like or iterable object. @@ -1160,11 +1153,11 @@ Index: es5.d.ts - thisArg?: any, + mapfn: (this: This, v: T, k: number) => number, + thisArg?: This, - ): Int8Array; + ): Int8Array; } declare var Int8Array: Int8ArrayConstructor; -@@ -2492,20 +2566,24 @@ +@@ -2494,20 +2568,24 @@ * is treated as length+end. * @param end If not specified, length of the this object is used as its default value. */ @@ -1179,7 +1172,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - every( -- predicate: (value: number, index: number, array: Uint8Array) => unknown, +- predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, + every( + predicate: ( @@ -1193,7 +1186,7 @@ Index: es5.d.ts /** * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array -@@ -2515,21 +2593,24 @@ +@@ -2517,21 +2595,24 @@ * @param end index to stop filling the array at. If end is negative, it is treated as * length+end. */ @@ -1207,8 +1200,10 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - filter( -- predicate: (value: number, index: number, array: Uint8Array) => any, +- predicate: (value: number, index: number, array: this) => any, - thisArg?: any, +- ): Uint8Array; +- + filter( + predicate: ( + this: This, @@ -1217,19 +1212,18 @@ Index: es5.d.ts + array: this, + ) => boolean, + thisArg?: This, - ): Uint8Array; -- ++ ): Uint8Array; /** * 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 -@@ -2537,13 +2618,12 @@ +@@ -2539,13 +2620,12 @@ * 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. */ - find( -- predicate: (value: number, index: number, obj: Uint8Array) => boolean, +- predicate: (value: number, index: number, obj: this) => boolean, - thisArg?: any, + find( + predicate: (this: This, value: number, index: number, obj: this) => boolean, @@ -1240,13 +1234,13 @@ Index: es5.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 -@@ -2551,23 +2631,22 @@ +@@ -2553,23 +2633,22 @@ * 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. */ - findIndex( -- predicate: (value: number, index: number, obj: Uint8Array) => boolean, +- predicate: (value: number, index: number, obj: this) => boolean, - thisArg?: any, + findIndex( + predicate: (this: This, value: number, index: number, obj: this) => boolean, @@ -1261,7 +1255,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - forEach( -- callbackfn: (value: number, index: number, array: Uint8Array) => void, +- callbackfn: (value: number, index: number, array: this) => void, - thisArg?: any, + forEach( + callbackfn: (this: This, value: number, index: number, array: this) => void, @@ -1270,7 +1264,7 @@ Index: es5.d.ts /** * Returns the index of the first occurrence of a value in an array. -@@ -2595,50 +2674,40 @@ +@@ -2597,50 +2676,40 @@ /** * The length of the array. */ @@ -1285,8 +1279,10 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - map( -- callbackfn: (value: number, index: number, array: Uint8Array) => number, +- callbackfn: (value: number, index: number, array: this) => number, - thisArg?: any, +- ): Uint8Array; +- + map( + callbackfn: ( + this: This, @@ -1295,8 +1291,7 @@ Index: es5.d.ts + array: this, + ) => number, + thisArg?: This, - ): Uint8Array; -- ++ ): Uint8Array; /** * 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 @@ -1314,7 +1309,7 @@ Index: es5.d.ts + previousValue: number | U, currentValue: number, currentIndex: number, -- array: Uint8Array, + array: this, - ) => number, - ): number; - reduce( @@ -1322,19 +1317,18 @@ Index: es5.d.ts - previousValue: number, - currentValue: number, - currentIndex: number, -- array: Uint8Array, +- array: this, - ) => number, - initialValue: number, - ): number; - -+ array: this, + ) => U, + ): number | U; /** * 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. -@@ -2647,46 +2716,32 @@ +@@ -2649,46 +2718,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. @@ -1345,8 +1339,7 @@ Index: es5.d.ts previousValue: U, currentValue: number, currentIndex: number, -- array: Uint8Array, -+ array: this, + array: this, ) => U, initialValue: U, ): U; @@ -1368,7 +1361,7 @@ Index: es5.d.ts + previousValue: number | U, currentValue: number, currentIndex: number, -- array: Uint8Array, + array: this, - ) => number, - ): number; - reduceRight( @@ -1376,19 +1369,18 @@ Index: es5.d.ts - previousValue: number, - currentValue: number, - currentIndex: number, -- array: Uint8Array, +- array: this, - ) => number, - initialValue: number, - ): number; - -+ array: this, + ) => U, + ): number | U; /** * 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. -@@ -2695,14 +2750,14 @@ +@@ -2697,9 +2752,9 @@ * @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. @@ -1399,17 +1391,11 @@ Index: es5.d.ts previousValue: U, currentValue: number, currentIndex: number, -- array: Uint8Array, -+ array: this, - ) => U, - initialValue: U, - ): U; - -@@ -2723,20 +2778,24 @@ +@@ -2725,20 +2780,24 @@ * @param start The beginning of the specified portion of the array. * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. */ - slice(start?: number, end?: number): Uint8Array; + slice(start?: number, end?: number): Uint8Array; - /** * Determines whether the specified callback function returns true for any element of an array. @@ -1420,7 +1406,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - some( -- predicate: (value: number, index: number, array: Uint8Array) => unknown, +- predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, + some( + predicate: ( @@ -1434,17 +1420,17 @@ Index: es5.d.ts /** * Sorts an array. -@@ -2792,25 +2851,23 @@ +@@ -2794,25 +2853,23 @@ * Returns a new array from a set of elements. * @param items A set of elements to include in the new array object. */ - of(...items: number[]): Uint8Array; + of(...items: number[]): Uint8Array; - /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Uint8Array; + from(arrayLike: ArrayLike): Uint8Array; - /** * Creates an array from an array-like or iterable object. @@ -1459,11 +1445,11 @@ Index: es5.d.ts - thisArg?: any, + mapfn: (this: This, v: T, k: number) => number, + thisArg?: This, - ): Uint8Array; + ): Uint8Array; } declare var Uint8Array: Uint8ArrayConstructor; -@@ -2848,24 +2905,24 @@ +@@ -2852,20 +2909,24 @@ * is treated as length+end. * @param end If not specified, length of the this object is used as its default value. */ @@ -1478,14 +1464,13 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - every( +- predicate: (value: number, index: number, array: this) => unknown, +- thisArg?: any, + every( - predicate: ( ++ predicate: ( + this: This, - value: number, - index: number, -- array: Uint8ClampedArray, -- ) => unknown, -- thisArg?: any, ++ value: number, ++ index: number, + array: this, + ) => boolean, + thisArg?: This, @@ -1493,7 +1478,7 @@ Index: es5.d.ts /** * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array -@@ -2875,21 +2932,24 @@ +@@ -2875,21 +2936,24 @@ * @param end index to stop filling the array at. If end is negative, it is treated as * length+end. */ @@ -1507,8 +1492,10 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - filter( -- predicate: (value: number, index: number, array: Uint8ClampedArray) => any, +- predicate: (value: number, index: number, array: this) => any, - thisArg?: any, +- ): Uint8ClampedArray; +- + filter( + predicate: ( + this: This, @@ -1517,23 +1504,18 @@ Index: es5.d.ts + array: this, + ) => boolean, + thisArg?: This, - ): Uint8ClampedArray; -- ++ ): Uint8ClampedArray; /** * 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 -@@ -2897,17 +2957,12 @@ +@@ -2897,13 +2961,12 @@ * 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. */ - find( -- predicate: ( -- value: number, -- index: number, -- obj: Uint8ClampedArray, -- ) => boolean, +- predicate: (value: number, index: number, obj: this) => boolean, - thisArg?: any, + find( + predicate: (this: This, value: number, index: number, obj: this) => boolean, @@ -1544,17 +1526,13 @@ Index: es5.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 -@@ -2915,31 +2970,22 @@ +@@ -2911,23 +2974,22 @@ * 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. */ - findIndex( -- predicate: ( -- value: number, -- index: number, -- obj: Uint8ClampedArray, -- ) => boolean, +- predicate: (value: number, index: number, obj: this) => boolean, - thisArg?: any, + findIndex( + predicate: (this: This, value: number, index: number, obj: this) => boolean, @@ -1569,11 +1547,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - forEach( -- callbackfn: ( -- value: number, -- index: number, -- array: Uint8ClampedArray, -- ) => void, +- callbackfn: (value: number, index: number, array: this) => void, - thisArg?: any, + forEach( + callbackfn: (this: This, value: number, index: number, array: this) => void, @@ -1582,7 +1556,7 @@ Index: es5.d.ts /** * Returns the index of the first occurrence of a value in an array. -@@ -2967,54 +3013,40 @@ +@@ -2955,50 +3017,40 @@ /** * The length of the array. */ @@ -1597,18 +1571,19 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - map( +- callbackfn: (value: number, index: number, array: this) => number, +- thisArg?: any, +- ): Uint8ClampedArray; +- + map( - callbackfn: ( ++ callbackfn: ( + this: This, - value: number, - index: number, -- array: Uint8ClampedArray, ++ value: number, ++ index: number, + array: this, - ) => number, -- thisArg?: any, ++ ) => number, + thisArg?: This, - ): Uint8ClampedArray; -- ++ ): Uint8ClampedArray; /** * 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 @@ -1626,7 +1601,7 @@ Index: es5.d.ts + previousValue: number | U, currentValue: number, currentIndex: number, -- array: Uint8ClampedArray, + array: this, - ) => number, - ): number; - reduce( @@ -1634,19 +1609,18 @@ Index: es5.d.ts - previousValue: number, - currentValue: number, - currentIndex: number, -- array: Uint8ClampedArray, +- array: this, - ) => number, - initialValue: number, - ): number; - -+ array: this, + ) => U, + ): number | U; /** * 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. -@@ -3023,46 +3055,32 @@ +@@ -3007,46 +3059,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. @@ -1657,8 +1631,7 @@ Index: es5.d.ts previousValue: U, currentValue: number, currentIndex: number, -- array: Uint8ClampedArray, -+ array: this, + array: this, ) => U, initialValue: U, ): U; @@ -1680,7 +1653,7 @@ Index: es5.d.ts + previousValue: number | U, currentValue: number, currentIndex: number, -- array: Uint8ClampedArray, + array: this, - ) => number, - ): number; - reduceRight( @@ -1688,19 +1661,18 @@ Index: es5.d.ts - previousValue: number, - currentValue: number, - currentIndex: number, -- array: Uint8ClampedArray, +- array: this, - ) => number, - initialValue: number, - ): number; - -+ array: this, + ) => U, + ): number | U; /** * 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. -@@ -3071,14 +3089,14 @@ +@@ -3055,9 +3093,9 @@ * @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. @@ -1711,17 +1683,11 @@ Index: es5.d.ts previousValue: U, currentValue: number, currentIndex: number, -- array: Uint8ClampedArray, -+ array: this, - ) => U, - initialValue: U, - ): U; - -@@ -3099,24 +3117,24 @@ +@@ -3083,20 +3121,24 @@ * @param start The beginning of the specified portion of the array. * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. */ - slice(start?: number, end?: number): Uint8ClampedArray; + slice(start?: number, end?: number): Uint8ClampedArray; - /** * Determines whether the specified callback function returns true for any element of an array. @@ -1732,14 +1698,13 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - some( +- predicate: (value: number, index: number, array: this) => unknown, +- thisArg?: any, + some( - predicate: ( ++ predicate: ( + this: This, - value: number, - index: number, -- array: Uint8ClampedArray, -- ) => unknown, -- thisArg?: any, ++ value: number, ++ index: number, + array: this, + ) => boolean, + thisArg?: This, @@ -1747,17 +1712,17 @@ Index: es5.d.ts /** * Sorts an array. -@@ -3172,25 +3190,23 @@ +@@ -3152,25 +3194,23 @@ * Returns a new array from a set of elements. * @param items A set of elements to include in the new array object. */ - of(...items: number[]): Uint8ClampedArray; + of(...items: number[]): Uint8ClampedArray; - /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Uint8ClampedArray; + from(arrayLike: ArrayLike): Uint8ClampedArray; - /** * Creates an array from an array-like or iterable object. @@ -1772,11 +1737,11 @@ Index: es5.d.ts - thisArg?: any, + mapfn: (this: This, v: T, k: number) => number, + thisArg?: This, - ): Uint8ClampedArray; + ): Uint8ClampedArray; } declare var Uint8ClampedArray: Uint8ClampedArrayConstructor; -@@ -3228,20 +3244,24 @@ +@@ -3208,20 +3248,24 @@ * is treated as length+end. * @param end If not specified, length of the this object is used as its default value. */ @@ -1791,7 +1756,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - every( -- predicate: (value: number, index: number, array: Int16Array) => unknown, +- predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, + every( + predicate: ( @@ -1805,7 +1770,7 @@ Index: es5.d.ts /** * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array -@@ -3251,21 +3271,24 @@ +@@ -3231,21 +3275,24 @@ * @param end index to stop filling the array at. If end is negative, it is treated as * length+end. */ @@ -1819,8 +1784,10 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - filter( -- predicate: (value: number, index: number, array: Int16Array) => any, +- predicate: (value: number, index: number, array: this) => any, - thisArg?: any, +- ): Int16Array; +- + filter( + predicate: ( + this: This, @@ -1829,19 +1796,18 @@ Index: es5.d.ts + array: this, + ) => boolean, + thisArg?: This, - ): Int16Array; -- ++ ): Int16Array; /** * 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 -@@ -3273,13 +3296,12 @@ +@@ -3253,13 +3300,12 @@ * 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. */ - find( -- predicate: (value: number, index: number, obj: Int16Array) => boolean, +- predicate: (value: number, index: number, obj: this) => boolean, - thisArg?: any, + find( + predicate: (this: This, value: number, index: number, obj: this) => boolean, @@ -1852,13 +1818,13 @@ Index: es5.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 -@@ -3287,23 +3309,22 @@ +@@ -3267,23 +3313,22 @@ * 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. */ - findIndex( -- predicate: (value: number, index: number, obj: Int16Array) => boolean, +- predicate: (value: number, index: number, obj: this) => boolean, - thisArg?: any, + findIndex( + predicate: (this: This, value: number, index: number, obj: this) => boolean, @@ -1873,7 +1839,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - forEach( -- callbackfn: (value: number, index: number, array: Int16Array) => void, +- callbackfn: (value: number, index: number, array: this) => void, - thisArg?: any, + forEach( + callbackfn: (this: This, value: number, index: number, array: this) => void, @@ -1882,7 +1848,7 @@ Index: es5.d.ts /** * Returns the index of the first occurrence of a value in an array. * @param searchElement The value to locate in the array. -@@ -3330,50 +3351,40 @@ +@@ -3310,50 +3355,40 @@ /** * The length of the array. */ @@ -1897,8 +1863,10 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - map( -- callbackfn: (value: number, index: number, array: Int16Array) => number, +- callbackfn: (value: number, index: number, array: this) => number, - thisArg?: any, +- ): Int16Array; +- + map( + callbackfn: ( + this: This, @@ -1907,8 +1875,7 @@ Index: es5.d.ts + array: this, + ) => number, + thisArg?: This, - ): Int16Array; -- ++ ): Int16Array; /** * 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 @@ -1926,7 +1893,7 @@ Index: es5.d.ts + previousValue: number | U, currentValue: number, currentIndex: number, -- array: Int16Array, + array: this, - ) => number, - ): number; - reduce( @@ -1934,19 +1901,18 @@ Index: es5.d.ts - previousValue: number, - currentValue: number, - currentIndex: number, -- array: Int16Array, +- array: this, - ) => number, - initialValue: number, - ): number; - -+ array: this, + ) => U, + ): number | U; /** * 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. -@@ -3382,46 +3393,32 @@ +@@ -3362,46 +3397,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. @@ -1957,8 +1923,7 @@ Index: es5.d.ts previousValue: U, currentValue: number, currentIndex: number, -- array: Int16Array, -+ array: this, + array: this, ) => U, initialValue: U, ): U; @@ -1980,7 +1945,7 @@ Index: es5.d.ts + previousValue: number | U, currentValue: number, currentIndex: number, -- array: Int16Array, + array: this, - ) => number, - ): number; - reduceRight( @@ -1988,19 +1953,18 @@ Index: es5.d.ts - previousValue: number, - currentValue: number, - currentIndex: number, -- array: Int16Array, +- array: this, - ) => number, - initialValue: number, - ): number; - -+ array: this, + ) => U, + ): number | U; /** * 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. -@@ -3430,14 +3427,14 @@ +@@ -3410,9 +3431,9 @@ * @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. @@ -2011,17 +1975,11 @@ Index: es5.d.ts previousValue: U, currentValue: number, currentIndex: number, -- array: Int16Array, -+ array: this, - ) => U, - initialValue: U, - ): U; - -@@ -3458,20 +3455,24 @@ +@@ -3438,20 +3459,24 @@ * @param start The beginning of the specified portion of the array. * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. */ - slice(start?: number, end?: number): Int16Array; + slice(start?: number, end?: number): Int16Array; - /** * Determines whether the specified callback function returns true for any element of an array. @@ -2032,7 +1990,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - some( -- predicate: (value: number, index: number, array: Int16Array) => unknown, +- predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, + some( + predicate: ( @@ -2046,17 +2004,17 @@ Index: es5.d.ts /** * Sorts an array. -@@ -3527,25 +3528,23 @@ +@@ -3507,25 +3532,23 @@ * Returns a new array from a set of elements. * @param items A set of elements to include in the new array object. */ - of(...items: number[]): Int16Array; + of(...items: number[]): Int16Array; - /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Int16Array; + from(arrayLike: ArrayLike): Int16Array; - /** * Creates an array from an array-like or iterable object. @@ -2071,11 +2029,11 @@ Index: es5.d.ts - thisArg?: any, + mapfn: (this: This, v: T, k: number) => number, + thisArg?: This, - ): Int16Array; + ): Int16Array; } declare var Int16Array: Int16ArrayConstructor; -@@ -3583,20 +3582,24 @@ +@@ -3563,20 +3586,24 @@ * is treated as length+end. * @param end If not specified, length of the this object is used as its default value. */ @@ -2090,7 +2048,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - every( -- predicate: (value: number, index: number, array: Uint16Array) => unknown, +- predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, + every( + predicate: ( @@ -2104,7 +2062,7 @@ Index: es5.d.ts /** * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array -@@ -3606,21 +3609,24 @@ +@@ -3586,21 +3613,24 @@ * @param end index to stop filling the array at. If end is negative, it is treated as * length+end. */ @@ -2118,8 +2076,10 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - filter( -- predicate: (value: number, index: number, array: Uint16Array) => any, +- predicate: (value: number, index: number, array: this) => any, - thisArg?: any, +- ): Uint16Array; +- + filter( + predicate: ( + this: This, @@ -2128,19 +2088,18 @@ Index: es5.d.ts + array: this, + ) => boolean, + thisArg?: This, - ): Uint16Array; -- ++ ): Uint16Array; /** * 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 -@@ -3628,13 +3634,12 @@ +@@ -3608,13 +3638,12 @@ * 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. */ - find( -- predicate: (value: number, index: number, obj: Uint16Array) => boolean, +- predicate: (value: number, index: number, obj: this) => boolean, - thisArg?: any, + find( + predicate: (this: This, value: number, index: number, obj: this) => boolean, @@ -2151,13 +2110,13 @@ Index: es5.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 -@@ -3642,23 +3647,22 @@ +@@ -3622,23 +3651,22 @@ * 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. */ - findIndex( -- predicate: (value: number, index: number, obj: Uint16Array) => boolean, +- predicate: (value: number, index: number, obj: this) => boolean, - thisArg?: any, + findIndex( + predicate: (this: This, value: number, index: number, obj: this) => boolean, @@ -2172,7 +2131,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - forEach( -- callbackfn: (value: number, index: number, array: Uint16Array) => void, +- callbackfn: (value: number, index: number, array: this) => void, - thisArg?: any, + forEach( + callbackfn: (this: This, value: number, index: number, array: this) => void, @@ -2181,7 +2140,7 @@ Index: es5.d.ts /** * Returns the index of the first occurrence of a value in an array. -@@ -3686,50 +3690,40 @@ +@@ -3666,50 +3694,40 @@ /** * The length of the array. */ @@ -2196,8 +2155,10 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - map( -- callbackfn: (value: number, index: number, array: Uint16Array) => number, +- callbackfn: (value: number, index: number, array: this) => number, - thisArg?: any, +- ): Uint16Array; +- + map( + callbackfn: ( + this: This, @@ -2206,8 +2167,7 @@ Index: es5.d.ts + array: this, + ) => number, + thisArg?: This, - ): Uint16Array; -- ++ ): Uint16Array; /** * 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 @@ -2225,7 +2185,7 @@ Index: es5.d.ts + previousValue: number | U, currentValue: number, currentIndex: number, -- array: Uint16Array, + array: this, - ) => number, - ): number; - reduce( @@ -2233,19 +2193,18 @@ Index: es5.d.ts - previousValue: number, - currentValue: number, - currentIndex: number, -- array: Uint16Array, +- array: this, - ) => number, - initialValue: number, - ): number; - -+ array: this, + ) => U, + ): number | U; /** * 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. -@@ -3738,46 +3732,32 @@ +@@ -3718,46 +3736,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. @@ -2256,8 +2215,7 @@ Index: es5.d.ts previousValue: U, currentValue: number, currentIndex: number, -- array: Uint16Array, -+ array: this, + array: this, ) => U, initialValue: U, ): U; @@ -2279,7 +2237,7 @@ Index: es5.d.ts + previousValue: number | U, currentValue: number, currentIndex: number, -- array: Uint16Array, + array: this, - ) => number, - ): number; - reduceRight( @@ -2287,19 +2245,18 @@ Index: es5.d.ts - previousValue: number, - currentValue: number, - currentIndex: number, -- array: Uint16Array, +- array: this, - ) => number, - initialValue: number, - ): number; - -+ array: this, + ) => U, + ): number | U; /** * 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. -@@ -3786,14 +3766,14 @@ +@@ -3766,9 +3770,9 @@ * @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. @@ -2310,17 +2267,11 @@ Index: es5.d.ts previousValue: U, currentValue: number, currentIndex: number, -- array: Uint16Array, -+ array: this, - ) => U, - initialValue: U, - ): U; - -@@ -3814,20 +3794,24 @@ +@@ -3794,20 +3798,24 @@ * @param start The beginning of the specified portion of the array. * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. */ - slice(start?: number, end?: number): Uint16Array; + slice(start?: number, end?: number): Uint16Array; - /** * Determines whether the specified callback function returns true for any element of an array. @@ -2331,7 +2282,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - some( -- predicate: (value: number, index: number, array: Uint16Array) => unknown, +- predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, + some( + predicate: ( @@ -2345,17 +2296,17 @@ Index: es5.d.ts /** * Sorts an array. -@@ -3883,25 +3867,23 @@ +@@ -3863,25 +3871,23 @@ * Returns a new array from a set of elements. * @param items A set of elements to include in the new array object. */ - of(...items: number[]): Uint16Array; + of(...items: number[]): Uint16Array; - /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Uint16Array; + from(arrayLike: ArrayLike): Uint16Array; - /** * Creates an array from an array-like or iterable object. @@ -2370,11 +2321,11 @@ Index: es5.d.ts - thisArg?: any, + mapfn: (this: This, v: T, k: number) => number, + thisArg?: This, - ): Uint16Array; + ): Uint16Array; } declare var Uint16Array: Uint16ArrayConstructor; /** -@@ -3938,20 +3920,24 @@ +@@ -3918,20 +3924,24 @@ * is treated as length+end. * @param end If not specified, length of the this object is used as its default value. */ @@ -2389,7 +2340,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - every( -- predicate: (value: number, index: number, array: Int32Array) => unknown, +- predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, + every( + predicate: ( @@ -2403,7 +2354,7 @@ Index: es5.d.ts /** * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array -@@ -3961,21 +3947,24 @@ +@@ -3941,21 +3951,24 @@ * @param end index to stop filling the array at. If end is negative, it is treated as * length+end. */ @@ -2417,8 +2368,10 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - filter( -- predicate: (value: number, index: number, array: Int32Array) => any, +- predicate: (value: number, index: number, array: this) => any, - thisArg?: any, +- ): Int32Array; +- + filter( + predicate: ( + this: This, @@ -2427,19 +2380,18 @@ Index: es5.d.ts + array: this, + ) => boolean, + thisArg?: This, - ): Int32Array; -- ++ ): Int32Array; /** * 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 -@@ -3983,13 +3972,12 @@ +@@ -3963,13 +3976,12 @@ * 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. */ - find( -- predicate: (value: number, index: number, obj: Int32Array) => boolean, +- predicate: (value: number, index: number, obj: this) => boolean, - thisArg?: any, + find( + predicate: (this: This, value: number, index: number, obj: this) => boolean, @@ -2450,13 +2402,13 @@ Index: es5.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 -@@ -3997,23 +3985,22 @@ +@@ -3977,23 +3989,22 @@ * 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. */ - findIndex( -- predicate: (value: number, index: number, obj: Int32Array) => boolean, +- predicate: (value: number, index: number, obj: this) => boolean, - thisArg?: any, + findIndex( + predicate: (this: This, value: number, index: number, obj: this) => boolean, @@ -2471,7 +2423,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - forEach( -- callbackfn: (value: number, index: number, array: Int32Array) => void, +- callbackfn: (value: number, index: number, array: this) => void, - thisArg?: any, + forEach( + callbackfn: (this: This, value: number, index: number, array: this) => void, @@ -2480,7 +2432,7 @@ Index: es5.d.ts /** * Returns the index of the first occurrence of a value in an array. -@@ -4041,50 +4028,40 @@ +@@ -4021,50 +4032,40 @@ /** * The length of the array. */ @@ -2495,8 +2447,10 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - map( -- callbackfn: (value: number, index: number, array: Int32Array) => number, +- callbackfn: (value: number, index: number, array: this) => number, - thisArg?: any, +- ): Int32Array; +- + map( + callbackfn: ( + this: This, @@ -2505,8 +2459,7 @@ Index: es5.d.ts + array: this, + ) => number, + thisArg?: This, - ): Int32Array; -- ++ ): Int32Array; /** * 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 @@ -2524,7 +2477,7 @@ Index: es5.d.ts + previousValue: number | U, currentValue: number, currentIndex: number, -- array: Int32Array, + array: this, - ) => number, - ): number; - reduce( @@ -2532,19 +2485,18 @@ Index: es5.d.ts - previousValue: number, - currentValue: number, - currentIndex: number, -- array: Int32Array, +- array: this, - ) => number, - initialValue: number, - ): number; - -+ array: this, + ) => U, + ): number | U; /** * 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. -@@ -4093,46 +4070,32 @@ +@@ -4073,46 +4074,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. @@ -2555,8 +2507,7 @@ Index: es5.d.ts previousValue: U, currentValue: number, currentIndex: number, -- array: Int32Array, -+ array: this, + array: this, ) => U, initialValue: U, ): U; @@ -2578,7 +2529,7 @@ Index: es5.d.ts + previousValue: number | U, currentValue: number, currentIndex: number, -- array: Int32Array, + array: this, - ) => number, - ): number; - reduceRight( @@ -2586,19 +2537,18 @@ Index: es5.d.ts - previousValue: number, - currentValue: number, - currentIndex: number, -- array: Int32Array, +- array: this, - ) => number, - initialValue: number, - ): number; - -+ array: this, + ) => U, + ): number | U; /** * 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. -@@ -4141,14 +4104,14 @@ +@@ -4121,9 +4108,9 @@ * @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. @@ -2609,17 +2559,11 @@ Index: es5.d.ts previousValue: U, currentValue: number, currentIndex: number, -- array: Int32Array, -+ array: this, - ) => U, - initialValue: U, - ): U; - -@@ -4169,20 +4132,24 @@ +@@ -4149,20 +4136,24 @@ * @param start The beginning of the specified portion of the array. * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. */ - slice(start?: number, end?: number): Int32Array; + slice(start?: number, end?: number): Int32Array; - /** * Determines whether the specified callback function returns true for any element of an array. @@ -2630,7 +2574,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - some( -- predicate: (value: number, index: number, array: Int32Array) => unknown, +- predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, + some( + predicate: ( @@ -2644,17 +2588,17 @@ Index: es5.d.ts /** * Sorts an array. -@@ -4238,25 +4205,23 @@ +@@ -4218,25 +4209,23 @@ * Returns a new array from a set of elements. * @param items A set of elements to include in the new array object. */ - of(...items: number[]): Int32Array; + of(...items: number[]): Int32Array; - /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Int32Array; + from(arrayLike: ArrayLike): Int32Array; - /** * Creates an array from an array-like or iterable object. @@ -2669,11 +2613,11 @@ Index: es5.d.ts - thisArg?: any, + mapfn: (this: This, v: T, k: number) => number, + thisArg?: This, - ): Int32Array; + ): Int32Array; } declare var Int32Array: Int32ArrayConstructor; -@@ -4294,20 +4259,24 @@ +@@ -4274,20 +4263,24 @@ * is treated as length+end. * @param end If not specified, length of the this object is used as its default value. */ @@ -2688,7 +2632,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - every( -- predicate: (value: number, index: number, array: Uint32Array) => unknown, +- predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, + every( + predicate: ( @@ -2702,7 +2646,7 @@ Index: es5.d.ts /** * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array -@@ -4317,21 +4286,24 @@ +@@ -4297,21 +4290,24 @@ * @param end index to stop filling the array at. If end is negative, it is treated as * length+end. */ @@ -2716,8 +2660,10 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - filter( -- predicate: (value: number, index: number, array: Uint32Array) => any, +- predicate: (value: number, index: number, array: this) => any, - thisArg?: any, +- ): Uint32Array; +- + filter( + predicate: ( + this: This, @@ -2726,19 +2672,18 @@ Index: es5.d.ts + array: this, + ) => boolean, + thisArg?: This, - ): Uint32Array; -- ++ ): Uint32Array; /** * 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 -@@ -4339,13 +4311,12 @@ +@@ -4319,13 +4315,12 @@ * 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. */ - find( -- predicate: (value: number, index: number, obj: Uint32Array) => boolean, +- predicate: (value: number, index: number, obj: this) => boolean, - thisArg?: any, + find( + predicate: (this: This, value: number, index: number, obj: this) => boolean, @@ -2749,13 +2694,13 @@ Index: es5.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 -@@ -4353,23 +4324,22 @@ +@@ -4333,23 +4328,22 @@ * 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. */ - findIndex( -- predicate: (value: number, index: number, obj: Uint32Array) => boolean, +- predicate: (value: number, index: number, obj: this) => boolean, - thisArg?: any, + findIndex( + predicate: (this: This, value: number, index: number, obj: this) => boolean, @@ -2770,7 +2715,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - forEach( -- callbackfn: (value: number, index: number, array: Uint32Array) => void, +- callbackfn: (value: number, index: number, array: this) => void, - thisArg?: any, + forEach( + callbackfn: (this: This, value: number, index: number, array: this) => void, @@ -2779,7 +2724,7 @@ Index: es5.d.ts /** * Returns the index of the first occurrence of a value in an array. * @param searchElement The value to locate in the array. -@@ -4396,50 +4366,40 @@ +@@ -4376,50 +4370,40 @@ /** * The length of the array. */ @@ -2794,8 +2739,10 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - map( -- callbackfn: (value: number, index: number, array: Uint32Array) => number, +- callbackfn: (value: number, index: number, array: this) => number, - thisArg?: any, +- ): Uint32Array; +- + map( + callbackfn: ( + this: This, @@ -2804,8 +2751,7 @@ Index: es5.d.ts + array: this, + ) => number, + thisArg?: This, - ): Uint32Array; -- ++ ): Uint32Array; /** * 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 @@ -2823,7 +2769,7 @@ Index: es5.d.ts + previousValue: number | U, currentValue: number, currentIndex: number, -- array: Uint32Array, + array: this, - ) => number, - ): number; - reduce( @@ -2831,19 +2777,18 @@ Index: es5.d.ts - previousValue: number, - currentValue: number, - currentIndex: number, -- array: Uint32Array, +- array: this, - ) => number, - initialValue: number, - ): number; - -+ array: this, + ) => U, + ): number | U; /** * 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. -@@ -4448,46 +4408,32 @@ +@@ -4428,46 +4412,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. @@ -2854,8 +2799,7 @@ Index: es5.d.ts previousValue: U, currentValue: number, currentIndex: number, -- array: Uint32Array, -+ array: this, + array: this, ) => U, initialValue: U, ): U; @@ -2877,7 +2821,7 @@ Index: es5.d.ts + previousValue: number | U, currentValue: number, currentIndex: number, -- array: Uint32Array, + array: this, - ) => number, - ): number; - reduceRight( @@ -2885,19 +2829,18 @@ Index: es5.d.ts - previousValue: number, - currentValue: number, - currentIndex: number, -- array: Uint32Array, +- array: this, - ) => number, - initialValue: number, - ): number; - -+ array: this, + ) => U, + ): number | U; /** * 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. -@@ -4496,14 +4442,14 @@ +@@ -4476,9 +4446,9 @@ * @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. @@ -2908,17 +2851,11 @@ Index: es5.d.ts previousValue: U, currentValue: number, currentIndex: number, -- array: Uint32Array, -+ array: this, - ) => U, - initialValue: U, - ): U; - -@@ -4524,20 +4470,24 @@ +@@ -4504,20 +4474,24 @@ * @param start The beginning of the specified portion of the array. * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. */ - slice(start?: number, end?: number): Uint32Array; + slice(start?: number, end?: number): Uint32Array; - /** * Determines whether the specified callback function returns true for any element of an array. @@ -2929,7 +2866,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - some( -- predicate: (value: number, index: number, array: Uint32Array) => unknown, +- predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, + some( + predicate: ( @@ -2943,17 +2880,17 @@ Index: es5.d.ts /** * Sorts an array. -@@ -4593,25 +4543,23 @@ +@@ -4573,25 +4547,23 @@ * Returns a new array from a set of elements. * @param items A set of elements to include in the new array object. */ - of(...items: number[]): Uint32Array; + of(...items: number[]): Uint32Array; - /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Uint32Array; + from(arrayLike: ArrayLike): Uint32Array; - /** * Creates an array from an array-like or iterable object. @@ -2968,11 +2905,11 @@ Index: es5.d.ts - thisArg?: any, + mapfn: (this: This, v: T, k: number) => number, + thisArg?: This, - ): Uint32Array; + ): Uint32Array; } declare var Uint32Array: Uint32ArrayConstructor; -@@ -4649,20 +4597,24 @@ +@@ -4629,20 +4601,24 @@ * is treated as length+end. * @param end If not specified, length of the this object is used as its default value. */ @@ -2987,7 +2924,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - every( -- predicate: (value: number, index: number, array: Float32Array) => unknown, +- predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, + every( + predicate: ( @@ -3001,7 +2938,7 @@ Index: es5.d.ts /** * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array -@@ -4672,21 +4624,24 @@ +@@ -4652,21 +4628,24 @@ * @param end index to stop filling the array at. If end is negative, it is treated as * length+end. */ @@ -3015,8 +2952,10 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - filter( -- predicate: (value: number, index: number, array: Float32Array) => any, +- predicate: (value: number, index: number, array: this) => any, - thisArg?: any, +- ): Float32Array; +- + filter( + predicate: ( + this: This, @@ -3025,19 +2964,18 @@ Index: es5.d.ts + array: this, + ) => boolean, + thisArg?: This, - ): Float32Array; -- ++ ): Float32Array; /** * 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 -@@ -4694,13 +4649,12 @@ +@@ -4674,13 +4653,12 @@ * 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. */ - find( -- predicate: (value: number, index: number, obj: Float32Array) => boolean, +- predicate: (value: number, index: number, obj: this) => boolean, - thisArg?: any, + find( + predicate: (this: This, value: number, index: number, obj: this) => boolean, @@ -3048,13 +2986,13 @@ Index: es5.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 -@@ -4708,23 +4662,22 @@ +@@ -4688,23 +4666,22 @@ * 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. */ - findIndex( -- predicate: (value: number, index: number, obj: Float32Array) => boolean, +- predicate: (value: number, index: number, obj: this) => boolean, - thisArg?: any, + findIndex( + predicate: (this: This, value: number, index: number, obj: this) => boolean, @@ -3069,7 +3007,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - forEach( -- callbackfn: (value: number, index: number, array: Float32Array) => void, +- callbackfn: (value: number, index: number, array: this) => void, - thisArg?: any, + forEach( + callbackfn: (this: This, value: number, index: number, array: this) => void, @@ -3078,7 +3016,7 @@ Index: es5.d.ts /** * Returns the index of the first occurrence of a value in an array. -@@ -4752,50 +4705,40 @@ +@@ -4732,50 +4709,40 @@ /** * The length of the array. */ @@ -3093,8 +3031,10 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - map( -- callbackfn: (value: number, index: number, array: Float32Array) => number, +- callbackfn: (value: number, index: number, array: this) => number, - thisArg?: any, +- ): Float32Array; +- + map( + callbackfn: ( + this: This, @@ -3103,8 +3043,7 @@ Index: es5.d.ts + array: this, + ) => number, + thisArg?: This, - ): Float32Array; -- ++ ): Float32Array; /** * 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 @@ -3122,7 +3061,7 @@ Index: es5.d.ts + previousValue: number | U, currentValue: number, currentIndex: number, -- array: Float32Array, + array: this, - ) => number, - ): number; - reduce( @@ -3130,19 +3069,18 @@ Index: es5.d.ts - previousValue: number, - currentValue: number, - currentIndex: number, -- array: Float32Array, +- array: this, - ) => number, - initialValue: number, - ): number; - -+ array: this, + ) => U, + ): number | U; /** * 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. -@@ -4804,46 +4747,32 @@ +@@ -4784,46 +4751,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. @@ -3153,8 +3091,7 @@ Index: es5.d.ts previousValue: U, currentValue: number, currentIndex: number, -- array: Float32Array, -+ array: this, + array: this, ) => U, initialValue: U, ): U; @@ -3176,7 +3113,7 @@ Index: es5.d.ts + previousValue: number | U, currentValue: number, currentIndex: number, -- array: Float32Array, + array: this, - ) => number, - ): number; - reduceRight( @@ -3184,19 +3121,18 @@ Index: es5.d.ts - previousValue: number, - currentValue: number, - currentIndex: number, -- array: Float32Array, +- array: this, - ) => number, - initialValue: number, - ): number; - -+ array: this, + ) => U, + ): number | U; /** * 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. -@@ -4852,14 +4781,14 @@ +@@ -4832,9 +4785,9 @@ * @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. @@ -3207,17 +3143,11 @@ Index: es5.d.ts previousValue: U, currentValue: number, currentIndex: number, -- array: Float32Array, -+ array: this, - ) => U, - initialValue: U, - ): U; - -@@ -4880,20 +4809,24 @@ +@@ -4860,20 +4813,24 @@ * @param start The beginning of the specified portion of the array. * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. */ - slice(start?: number, end?: number): Float32Array; + slice(start?: number, end?: number): Float32Array; - /** * Determines whether the specified callback function returns true for any element of an array. @@ -3228,7 +3158,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - some( -- predicate: (value: number, index: number, array: Float32Array) => unknown, +- predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, + some( + predicate: ( @@ -3242,17 +3172,17 @@ Index: es5.d.ts /** * Sorts an array. -@@ -4949,25 +4882,23 @@ +@@ -4929,25 +4886,23 @@ * Returns a new array from a set of elements. * @param items A set of elements to include in the new array object. */ - of(...items: number[]): Float32Array; + of(...items: number[]): Float32Array; - /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Float32Array; + from(arrayLike: ArrayLike): Float32Array; - /** * Creates an array from an array-like or iterable object. @@ -3267,11 +3197,11 @@ Index: es5.d.ts - thisArg?: any, + mapfn: (this: This, v: T, k: number) => number, + thisArg?: This, - ): Float32Array; + ): Float32Array; } declare var Float32Array: Float32ArrayConstructor; -@@ -5005,20 +4936,24 @@ +@@ -4985,20 +4940,24 @@ * is treated as length+end. * @param end If not specified, length of the this object is used as its default value. */ @@ -3286,7 +3216,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - every( -- predicate: (value: number, index: number, array: Float64Array) => unknown, +- predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, + every( + predicate: ( @@ -3300,7 +3230,7 @@ Index: es5.d.ts /** * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array -@@ -5028,21 +4963,24 @@ +@@ -5008,21 +4967,24 @@ * @param end index to stop filling the array at. If end is negative, it is treated as * length+end. */ @@ -3314,8 +3244,10 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - filter( -- predicate: (value: number, index: number, array: Float64Array) => any, +- predicate: (value: number, index: number, array: this) => any, - thisArg?: any, +- ): Float64Array; +- + filter( + predicate: ( + this: This, @@ -3324,19 +3256,18 @@ Index: es5.d.ts + array: this, + ) => boolean, + thisArg?: This, - ): Float64Array; -- ++ ): Float64Array; /** * 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 -@@ -5050,13 +4988,12 @@ +@@ -5030,13 +4992,12 @@ * 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. */ - find( -- predicate: (value: number, index: number, obj: Float64Array) => boolean, +- predicate: (value: number, index: number, obj: this) => boolean, - thisArg?: any, + find( + predicate: (this: This, value: number, index: number, obj: this) => boolean, @@ -3347,13 +3278,13 @@ Index: es5.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 -@@ -5064,23 +5001,22 @@ +@@ -5044,23 +5005,22 @@ * 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. */ - findIndex( -- predicate: (value: number, index: number, obj: Float64Array) => boolean, +- predicate: (value: number, index: number, obj: this) => boolean, - thisArg?: any, + findIndex( + predicate: (this: This, value: number, index: number, obj: this) => boolean, @@ -3368,7 +3299,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - forEach( -- callbackfn: (value: number, index: number, array: Float64Array) => void, +- callbackfn: (value: number, index: number, array: this) => void, - thisArg?: any, + forEach( + callbackfn: (this: This, value: number, index: number, array: this) => void, @@ -3377,7 +3308,7 @@ Index: es5.d.ts /** * Returns the index of the first occurrence of a value in an array. -@@ -5108,50 +5044,40 @@ +@@ -5088,50 +5048,40 @@ /** * The length of the array. */ @@ -3392,8 +3323,10 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - map( -- callbackfn: (value: number, index: number, array: Float64Array) => number, +- callbackfn: (value: number, index: number, array: this) => number, - thisArg?: any, +- ): Float64Array; +- + map( + callbackfn: ( + this: This, @@ -3402,8 +3335,7 @@ Index: es5.d.ts + array: this, + ) => number, + thisArg?: This, - ): Float64Array; -- ++ ): Float64Array; /** * 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 @@ -3421,7 +3353,7 @@ Index: es5.d.ts + previousValue: number | U, currentValue: number, currentIndex: number, -- array: Float64Array, + array: this, - ) => number, - ): number; - reduce( @@ -3429,19 +3361,18 @@ Index: es5.d.ts - previousValue: number, - currentValue: number, - currentIndex: number, -- array: Float64Array, +- array: this, - ) => number, - initialValue: number, - ): number; - -+ array: this, + ) => U, + ): number | U; /** * 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. -@@ -5160,46 +5086,32 @@ +@@ -5140,46 +5090,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. @@ -3452,8 +3383,7 @@ Index: es5.d.ts previousValue: U, currentValue: number, currentIndex: number, -- array: Float64Array, -+ array: this, + array: this, ) => U, initialValue: U, ): U; @@ -3475,7 +3405,7 @@ Index: es5.d.ts + previousValue: number | U, currentValue: number, currentIndex: number, -- array: Float64Array, + array: this, - ) => number, - ): number; - reduceRight( @@ -3483,19 +3413,18 @@ Index: es5.d.ts - previousValue: number, - currentValue: number, - currentIndex: number, -- array: Float64Array, +- array: this, - ) => number, - initialValue: number, - ): number; - -+ array: this, + ) => U, + ): number | U; /** * 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. -@@ -5208,14 +5120,14 @@ +@@ -5188,9 +5124,9 @@ * @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. @@ -3506,17 +3435,11 @@ Index: es5.d.ts previousValue: U, currentValue: number, currentIndex: number, -- array: Float64Array, -+ array: this, - ) => U, - initialValue: U, - ): U; - -@@ -5236,20 +5148,24 @@ +@@ -5216,20 +5152,24 @@ * @param start The beginning of the specified portion of the array. * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. */ - slice(start?: number, end?: number): Float64Array; + slice(start?: number, end?: number): Float64Array; - /** * Determines whether the specified callback function returns true for any element of an array. @@ -3527,7 +3450,7 @@ Index: es5.d.ts * If thisArg is omitted, undefined is used as the this value. */ - some( -- predicate: (value: number, index: number, array: Float64Array) => unknown, +- predicate: (value: number, index: number, array: this) => unknown, - thisArg?: any, + some( + predicate: ( @@ -3541,17 +3464,17 @@ Index: es5.d.ts /** * Sorts an array. -@@ -5305,25 +5221,23 @@ +@@ -5285,25 +5225,23 @@ * Returns a new array from a set of elements. * @param items A set of elements to include in the new array object. */ - of(...items: number[]): Float64Array; + of(...items: number[]): Float64Array; - /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Float64Array; + from(arrayLike: ArrayLike): Float64Array; - /** * Creates an array from an array-like or iterable object. @@ -3566,11 +3489,11 @@ Index: es5.d.ts - thisArg?: any, + mapfn: (this: This, v: T, k: number) => number, + thisArg?: This, - ): Float64Array; + ): Float64Array; } declare var Float64Array: Float64ArrayConstructor; -@@ -5584,4 +5498,33 @@ +@@ -5564,4 +5502,33 @@ locales?: string | string[], options?: Intl.DateTimeFormatOptions, ): string; diff --git a/generated/lib.decorators.d.ts b/generated/lib.decorators.d.ts index c573c68..833ea0c 100644 --- a/generated/lib.decorators.d.ts +++ b/generated/lib.decorators.d.ts @@ -100,9 +100,9 @@ interface ClassMethodDecoratorContext< }; /** - * Adds a callback to be invoked either before static initializers are run (when - * decorating a `static` element), or before instance initializers are run (when - * decorating a non-`static` element). + * Adds a callback to be invoked either after static methods are defined but before + * static initializers are run (when decorating a `static` element), or before instance + * initializers are run (when decorating a non-`static` element). * * @example * ```ts @@ -163,9 +163,9 @@ interface ClassGetterDecoratorContext { }; /** - * Adds a callback to be invoked either before static initializers are run (when - * decorating a `static` element), or before instance initializers are run (when - * decorating a non-`static` element). + * Adds a callback to be invoked either after static methods are defined but before + * static initializers are run (when decorating a `static` element), or before instance + * initializers are run (when decorating a non-`static` element). */ addInitializer(initializer: (this: This) => void): void; @@ -207,9 +207,9 @@ interface ClassSetterDecoratorContext { }; /** - * Adds a callback to be invoked either before static initializers are run (when - * decorating a `static` element), or before instance initializers are run (when - * decorating a non-`static` element). + * Adds a callback to be invoked either after static methods are defined but before + * static initializers are run (when decorating a `static` element), or before instance + * initializers are run (when decorating a non-`static` element). */ addInitializer(initializer: (this: This) => void): void; @@ -260,9 +260,8 @@ interface ClassAccessorDecoratorContext { }; /** - * Adds a callback to be invoked either before static initializers are run (when - * decorating a `static` element), or before instance initializers are run (when - * decorating a non-`static` element). + * Adds a callback to be invoked immediately after the auto `accessor` being + * decorated is initialized (regardless if the `accessor` is `static` or not). */ addInitializer(initializer: (this: This) => void): void; @@ -354,9 +353,8 @@ interface ClassFieldDecoratorContext { }; /** - * Adds a callback to be invoked either before static initializers are run (when - * decorating a `static` element), or before instance initializers are run (when - * decorating a non-`static` element). + * Adds a callback to be invoked immediately after the field being decorated + * is initialized (regardless if the field is `static` or not). */ addInitializer(initializer: (this: This) => void): void; diff --git a/generated/lib.dom.d.ts b/generated/lib.dom.d.ts index e293ee8..1da4d44 100644 --- a/generated/lib.dom.d.ts +++ b/generated/lib.dom.d.ts @@ -9,6 +9,19 @@ interface AddEventListenerOptions extends EventListenerOptions { signal?: AbortSignal; } +interface AddressErrors { + addressLine?: string; + city?: string; + country?: string; + dependentLocality?: string; + organization?: string; + phone?: string; + postalCode?: string; + recipient?: string; + region?: string; + sortingCode?: string; +} + interface AesCbcParams extends Algorithm { iv: BufferSource; } @@ -90,6 +103,59 @@ interface AudioContextOptions { sampleRate?: number; } +interface AudioDataCopyToOptions { + format?: AudioSampleFormat; + frameCount?: number; + frameOffset?: number; + planeIndex: number; +} + +interface AudioDataInit { + data: BufferSource; + format: AudioSampleFormat; + numberOfChannels: number; + numberOfFrames: number; + sampleRate: number; + timestamp: number; + transfer?: ArrayBuffer[]; +} + +interface AudioDecoderConfig { + codec: string; + description?: BufferSource; + numberOfChannels: number; + sampleRate: number; +} + +interface AudioDecoderInit { + error: WebCodecsErrorCallback; + output: AudioDataOutputCallback; +} + +interface AudioDecoderSupport { + config?: AudioDecoderConfig; + supported?: boolean; +} + +interface AudioEncoderConfig { + bitrate?: number; + bitrateMode?: BitrateMode; + codec: string; + numberOfChannels: number; + opus?: OpusEncoderConfig; + sampleRate: number; +} + +interface AudioEncoderInit { + error: WebCodecsErrorCallback; + output: EncodedAudioChunkOutputCallback; +} + +interface AudioEncoderSupport { + config?: AudioEncoderConfig; + supported?: boolean; +} + interface AudioNodeOptions { channelCount?: number; channelCountMode?: ChannelCountMode; @@ -120,12 +186,31 @@ interface AuthenticationExtensionsClientInputs { credProps?: boolean; hmacCreateSecret?: boolean; minPinLength?: boolean; + prf?: AuthenticationExtensionsPRFInputs; } +interface AuthenticationExtensionsClientInputsJSON {} + interface AuthenticationExtensionsClientOutputs { appid?: boolean; credProps?: CredentialPropertiesOutput; hmacCreateSecret?: boolean; + prf?: AuthenticationExtensionsPRFOutputs; +} + +interface AuthenticationExtensionsPRFInputs { + eval?: AuthenticationExtensionsPRFValues; + evalByCredential?: Record; +} + +interface AuthenticationExtensionsPRFOutputs { + enabled?: boolean; + results?: AuthenticationExtensionsPRFValues; +} + +interface AuthenticationExtensionsPRFValues { + first: BufferSource; + second?: BufferSource; } interface AuthenticatorSelectionCriteria { @@ -191,6 +276,10 @@ interface CanvasRenderingContext2DSettings { willReadFrequently?: boolean; } +interface CaretPositionFromPointOptions { + shadowRoots?: ShadowRoot[]; +} + interface ChannelMergerOptions extends AudioNodeOptions { numberOfInputs?: number; } @@ -451,6 +540,18 @@ interface ElementDefinitionOptions { extends?: string; } +interface EncodedAudioChunkInit { + data: AllowSharedBufferSource; + duration?: number; + timestamp: number; + transfer?: ArrayBuffer[]; + type: EncodedAudioChunkType; +} + +interface EncodedAudioChunkMetadata { + decoderConfig?: AudioDecoderConfig; +} + interface EncodedVideoChunkInit { data: AllowSharedBufferSource; duration?: number; @@ -681,16 +782,6 @@ interface InputEventInit extends UIEventInit { targetRanges?: StaticRange[]; } -interface IntersectionObserverEntryInit { - boundingClientRect: DOMRectInit; - intersectionRatio: number; - intersectionRect: DOMRectInit; - isIntersecting: boolean; - rootBounds: DOMRectInit | null; - target: Element; - time: DOMHighResTimeStamp; -} - interface IntersectionObserverInit { root?: Element | Document | null; rootMargin?: string; @@ -900,6 +991,7 @@ interface MediaStreamTrackEventInit extends EventInit { interface MediaTrackCapabilities { aspectRatio?: DoubleRange; autoGainControl?: boolean[]; + backgroundBlur?: boolean[]; channelCount?: ULongRange; deviceId?: string; displaySurface?: string; @@ -917,6 +1009,7 @@ interface MediaTrackCapabilities { interface MediaTrackConstraintSet { aspectRatio?: ConstrainDouble; autoGainControl?: ConstrainBoolean; + backgroundBlur?: ConstrainBoolean; channelCount?: ConstrainULong; deviceId?: ConstrainDOMString; displaySurface?: ConstrainDOMString; @@ -938,6 +1031,7 @@ interface MediaTrackConstraints extends MediaTrackConstraintSet { interface MediaTrackSettings { aspectRatio?: number; autoGainControl?: boolean; + backgroundBlur?: boolean; channelCount?: number; deviceId?: string; displaySurface?: string; @@ -955,6 +1049,7 @@ interface MediaTrackSettings { interface MediaTrackSupportedConstraints { aspectRatio?: boolean; autoGainControl?: boolean; + backgroundBlur?: boolean; channelCount?: boolean; deviceId?: boolean; displaySurface?: boolean; @@ -1049,6 +1144,15 @@ interface OptionalEffectTiming { playbackRate?: number; } +interface OpusEncoderConfig { + complexity?: number; + format?: OpusBitstreamFormat; + frameDuration?: number; + packetlossperc?: number; + usedtx?: boolean; + useinbandfec?: boolean; +} + interface OscillatorOptions extends AudioNodeOptions { detune?: number; frequency?: number; @@ -1077,6 +1181,12 @@ interface PannerOptions extends AudioNodeOptions { rolloffFactor?: number; } +interface PayerErrors { + email?: string; + name?: string; + phone?: string; +} + interface PaymentCurrencyAmount { currency: string; value: string; @@ -1085,6 +1195,7 @@ interface PaymentCurrencyAmount { interface PaymentDetailsBase { displayItems?: PaymentItem[]; modifiers?: PaymentDetailsModifier[]; + shippingOptions?: PaymentShippingOption[]; } interface PaymentDetailsInit extends PaymentDetailsBase { @@ -1100,7 +1211,9 @@ interface PaymentDetailsModifier { } interface PaymentDetailsUpdate extends PaymentDetailsBase { + error?: string; paymentMethodErrors?: any; + shippingAddressErrors?: AddressErrors; total?: PaymentItem; } @@ -1120,11 +1233,27 @@ interface PaymentMethodData { supportedMethods: string; } +interface PaymentOptions { + requestPayerEmail?: boolean; + requestPayerName?: boolean; + requestPayerPhone?: boolean; + requestShipping?: boolean; + shippingType?: PaymentShippingType; +} + interface PaymentRequestUpdateEventInit extends EventInit {} +interface PaymentShippingOption { + amount: PaymentCurrencyAmount; + id: string; + label: string; + selected?: boolean; +} + interface PaymentValidationErrors { error?: string; - paymentMethod?: any; + payer?: PayerErrors; + shippingAddress?: AddressErrors; } interface Pbkdf2Params extends Algorithm { @@ -1174,6 +1303,8 @@ interface PlaneLayout { } interface PointerEventInit extends MouseEventInit { + altitudeAngle?: number; + azimuthAngle?: number; coalescedEvents?: PointerEvent[]; height?: number; isPrimary?: boolean; @@ -1245,12 +1376,31 @@ interface PublicKeyCredentialCreationOptions { user: PublicKeyCredentialUserEntity; } +interface PublicKeyCredentialCreationOptionsJSON { + attestation?: string; + authenticatorSelection?: AuthenticatorSelectionCriteria; + challenge: Base64URLString; + excludeCredentials?: PublicKeyCredentialDescriptorJSON[]; + extensions?: AuthenticationExtensionsClientInputsJSON; + hints?: string[]; + pubKeyCredParams: PublicKeyCredentialParameters[]; + rp: PublicKeyCredentialRpEntity; + timeout?: number; + user: PublicKeyCredentialUserEntityJSON; +} + interface PublicKeyCredentialDescriptor { id: BufferSource; transports?: AuthenticatorTransport[]; type: PublicKeyCredentialType; } +interface PublicKeyCredentialDescriptorJSON { + id: Base64URLString; + transports?: string[]; + type: string; +} + interface PublicKeyCredentialEntity { name: string; } @@ -1269,6 +1419,16 @@ interface PublicKeyCredentialRequestOptions { userVerification?: UserVerificationRequirement; } +interface PublicKeyCredentialRequestOptionsJSON { + allowCredentials?: PublicKeyCredentialDescriptorJSON[]; + challenge: Base64URLString; + extensions?: AuthenticationExtensionsClientInputsJSON; + hints?: string[]; + rpId?: string; + timeout?: number; + userVerification?: string; +} + interface PublicKeyCredentialRpEntity extends PublicKeyCredentialEntity { id?: string; } @@ -1278,6 +1438,12 @@ interface PublicKeyCredentialUserEntity extends PublicKeyCredentialEntity { id: BufferSource; } +interface PublicKeyCredentialUserEntityJSON { + displayName: string; + id: Base64URLString; + name: string; +} + interface PushSubscriptionJSON { endpoint?: string; expirationTime?: EpochTimeStamp | null; @@ -1997,6 +2163,7 @@ interface VideoConfiguration { colorGamut?: ColorGamut; contentType: string; framerate: number; + hasAlphaChannel?: boolean; hdrMetadataType?: HdrMetadataType; height: number; scalabilityMode?: string; @@ -2032,6 +2199,7 @@ interface VideoEncoderConfig { bitrate?: number; bitrateMode?: VideoEncoderBitrateMode; codec: string; + contentHint?: string; displayHeight?: number; displayWidth?: number; framerate?: number; @@ -2043,9 +2211,14 @@ interface VideoEncoderConfig { } interface VideoEncoderEncodeOptions { + avc?: VideoEncoderEncodeOptionsForAvc; keyFrame?: boolean; } +interface VideoEncoderEncodeOptionsForAvc { + quantizer?: number | null; +} + interface VideoEncoderInit { error: WebCodecsErrorCallback; output: EncodedVideoChunkOutputCallback; @@ -2083,6 +2256,8 @@ interface VideoFrameCallbackMetadata { } interface VideoFrameCopyToOptions { + colorSpace?: PredefinedColorSpace; + format?: VideoPixelFormat; layout?: PlaneLayout[]; rect?: DOMRectInit; } @@ -2239,6 +2414,8 @@ interface ARIAMixin { ariaColCount: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaColIndex) */ ariaColIndex: string | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaColIndexText) */ + ariaColIndexText: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaColSpan) */ ariaColSpan: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaCurrent) */ @@ -2286,6 +2463,8 @@ interface ARIAMixin { ariaRowCount: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaRowIndex) */ ariaRowIndex: string | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaRowIndexText) */ + ariaRowIndexText: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaRowSpan) */ ariaRowSpan: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/ariaSelected) */ @@ -2497,7 +2676,7 @@ interface Animatable { interface AnimationEventMap { cancel: AnimationPlaybackEvent; finish: AnimationPlaybackEvent; - remove: Event; + remove: AnimationPlaybackEvent; } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Animation) */ @@ -2515,7 +2694,7 @@ interface Animation extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Animation/finish_event) */ onfinish: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Animation/remove_event) */ - onremove: ((this: Animation, ev: Event) => any) | null; + onremove: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Animation/pending) */ readonly pending: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Animation/playState) */ @@ -2823,6 +3002,93 @@ declare var AudioContext: { new (contextOptions?: AudioContextOptions): AudioContext; }; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData) */ +interface AudioData { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/duration) */ + readonly duration: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/format) */ + readonly format: AudioSampleFormat | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/numberOfChannels) */ + readonly numberOfChannels: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/numberOfFrames) */ + readonly numberOfFrames: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/sampleRate) */ + readonly sampleRate: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/timestamp) */ + readonly timestamp: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/allocationSize) */ + allocationSize(options: AudioDataCopyToOptions): number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/clone) */ + clone(): AudioData; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/close) */ + close(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/copyTo) */ + copyTo( + destination: AllowSharedBufferSource, + options: AudioDataCopyToOptions, + ): void; +} + +declare var AudioData: { + prototype: AudioData; + new (init: AudioDataInit): AudioData; +}; + +interface AudioDecoderEventMap { + dequeue: Event; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder) + */ +interface AudioDecoder extends EventTarget { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/decodeQueueSize) */ + readonly decodeQueueSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/dequeue_event) */ + ondequeue: ((this: AudioDecoder, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/state) */ + readonly state: CodecState; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/close) */ + close(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/configure) */ + configure(config: AudioDecoderConfig): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/decode) */ + decode(chunk: EncodedAudioChunk): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/flush) */ + flush(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/reset) */ + reset(): void; + addEventListener( + type: K, + listener: (this: AudioDecoder, ev: AudioDecoderEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: AudioDecoder, ev: AudioDecoderEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions, + ): void; +} + +declare var AudioDecoder: { + prototype: AudioDecoder; + new (init: AudioDecoderInit): AudioDecoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/isConfigSupported_static) */ + isConfigSupported(config: AudioDecoderConfig): Promise; +}; + /** * AudioDestinationNode has no output (as it is the output, no more AudioNode can be linked after it in the audio graph) and one input. The number of channels in the input must be between 0 and the maxChannelCount value or an exception is raised. * @@ -2838,6 +3104,61 @@ declare var AudioDestinationNode: { new (): AudioDestinationNode; }; +interface AudioEncoderEventMap { + dequeue: Event; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder) + */ +interface AudioEncoder extends EventTarget { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/encodeQueueSize) */ + readonly encodeQueueSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/dequeue_event) */ + ondequeue: ((this: AudioEncoder, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/state) */ + readonly state: CodecState; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/close) */ + close(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/configure) */ + configure(config: AudioEncoderConfig): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/encode) */ + encode(data: AudioData): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/flush) */ + flush(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/reset) */ + reset(): void; + addEventListener( + type: K, + listener: (this: AudioEncoder, ev: AudioEncoderEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: AudioEncoder, ev: AudioEncoderEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions, + ): void; +} + +declare var AudioEncoder: { + prototype: AudioEncoder; + new (init: AudioEncoderInit): AudioEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/isConfigSupported_static) */ + isConfigSupported(config: AudioEncoderConfig): Promise; +}; + /** * The position and orientation of the unique person listening to the audio scene, and is used in audio spatialization. All PannerNodes spatialize in relation to the AudioListener stored in the BaseAudioContext.listener attribute. * @@ -3085,7 +3406,7 @@ declare var AudioWorklet: { }; interface AudioWorkletNodeEventMap { - processorerror: Event; + processorerror: ErrorEvent; } /** @@ -3095,7 +3416,7 @@ interface AudioWorkletNodeEventMap { */ interface AudioWorkletNode extends AudioNode { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletNode/processorerror_event) */ - onprocessorerror: ((this: AudioWorkletNode, ev: Event) => any) | null; + onprocessorerror: ((this: AudioWorkletNode, ev: ErrorEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletNode/parameters) */ readonly parameters: AudioParamMap; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletNode/port) */ @@ -3371,6 +3692,8 @@ interface Blob { readonly type: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */ arrayBuffer(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/bytes) */ + bytes(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */ slice(start?: number, end?: number, contentType?: string): Blob; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */ @@ -3406,6 +3729,8 @@ interface Body { arrayBuffer(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */ blob(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bytes) */ + bytes(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */ formData(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/json) */ @@ -3665,7 +3990,7 @@ interface CSSImportRule extends CSSRule { readonly layerName: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSImportRule/media) */ readonly media: MediaList; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSImportRule/stylesheet) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSImportRule/styleSheet) */ readonly styleSheet: CSSStyleSheet | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSImportRule/supportsText) */ readonly supportsText: string | null; @@ -3701,6 +4026,7 @@ declare var CSSKeyframeRule: { interface CSSKeyframesRule extends CSSRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeyframesRule/cssRules) */ readonly cssRules: CSSRuleList; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeyframesRule/length) */ readonly length: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeyframesRule/name) */ name: string; @@ -3972,7 +4298,7 @@ declare var CSSPerspective: { interface CSSPropertyRule extends CSSRule { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSPropertyRule/inherits) */ readonly inherits: boolean; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSPropertyRule/initialvalue) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSPropertyRule/initialValue) */ readonly initialValue: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSPropertyRule/name) */ readonly name: string; @@ -4367,11 +4693,13 @@ interface CSSStyleDeclaration { clip: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/clip-path) */ clipPath: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/clip-rule) */ clipRule: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/color) */ color: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/color-interpolation) */ colorInterpolation: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/color-interpolation-filters) */ colorInterpolationFilters: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/color-scheme) */ colorScheme: string; @@ -4397,9 +4725,11 @@ interface CSSStyleDeclaration { columns: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/contain) */ contain: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-block-size) */ containIntrinsicBlockSize: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-height) */ containIntrinsicHeight: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-inline-size) */ containIntrinsicInlineSize: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-size) */ containIntrinsicSize: string; @@ -4427,18 +4757,25 @@ interface CSSStyleDeclaration { cssText: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/cursor) */ cursor: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/cx) */ cx: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/cy) */ cy: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/d) */ d: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/direction) */ direction: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/display) */ display: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/dominant-baseline) */ dominantBaseline: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/empty-cells) */ emptyCells: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/fill) */ fill: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/fill-opacity) */ fillOpacity: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/fill-rule) */ fillRule: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/filter) */ filter: string; @@ -4625,9 +4962,13 @@ interface CSSStyleDeclaration { marginRight: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/margin-top) */ marginTop: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/marker) */ marker: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/marker-end) */ markerEnd: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/marker-mid) */ markerMid: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/marker-start) */ markerStart: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/mask) */ mask: string; @@ -4777,6 +5118,7 @@ interface CSSStyleDeclaration { printColorAdjust: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/quotes) */ quotes: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/r) */ r: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/resize) */ resize: string; @@ -4786,9 +5128,13 @@ interface CSSStyleDeclaration { rotate: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/row-gap) */ rowGap: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/ruby-align) */ + rubyAlign: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/ruby-position) */ rubyPosition: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/rx) */ rx: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/ry) */ ry: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/scale) */ scale: string; @@ -4856,16 +5202,27 @@ interface CSSStyleDeclaration { shapeMargin: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/shape-outside) */ shapeOutside: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/shape-rendering) */ shapeRendering: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/stop-color) */ stopColor: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/stop-opacity) */ stopOpacity: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/stroke) */ stroke: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/stroke-dasharray) */ strokeDasharray: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/stroke-dashoffset) */ strokeDashoffset: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/stroke-linecap) */ strokeLinecap: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/stroke-linejoin) */ strokeLinejoin: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/stroke-miterlimit) */ strokeMiterlimit: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/stroke-opacity) */ strokeOpacity: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/stroke-width) */ strokeWidth: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/tab-size) */ tabSize: string; @@ -4875,6 +5232,7 @@ interface CSSStyleDeclaration { textAlign: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/text-align-last) */ textAlignLast: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/text-anchor) */ textAnchor: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/text-combine-upright) */ textCombineUpright: string; @@ -4950,6 +5308,7 @@ interface CSSStyleDeclaration { unicodeBidi: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/user-select) */ userSelect: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/vector-effect) */ vectorEffect: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/vertical-align) */ verticalAlign: string; @@ -5379,7 +5738,9 @@ interface CSSStyleDeclaration { wordWrap: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/writing-mode) */ writingMode: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/x) */ x: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/y) */ y: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/z-index) */ zIndex: string; @@ -6103,6 +6464,18 @@ interface CanvasUserInterface { drawFocusIfNeeded(path: Path2D, element: Element): void; } +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CaretPosition) */ +interface CaretPosition { + readonly offset: number; + readonly offsetNode: Node; + getClientRect(): DOMRect | null; +} + +declare var CaretPosition: { + prototype: CaretPosition; + new (): CaretPosition; +}; + /** * The ChannelMergerNode interface, often used in conjunction with its opposite, ChannelSplitterNode, reunites different mono inputs into a single output. Each input is used to fill a channel of the output. This is useful for accessing each channels separately, e.g. for performing channel mixing where gain must be separately controlled on each channel. * @@ -6328,7 +6701,10 @@ declare var CompositionEvent: { }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream) */ -interface CompressionStream extends GenericTransformStream {} +interface CompressionStream extends GenericTransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; +} declare var CompressionStream: { prototype: CompressionStream; @@ -6681,27 +7057,49 @@ declare var DOMImplementation: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix) */ interface DOMMatrix extends DOMMatrixReadOnly { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ a: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ b: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ c: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ d: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ e: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ f: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m11: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m12: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m13: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m14: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m21: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m22: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m23: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m24: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m31: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m32: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m33: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m34: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m41: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m42: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m43: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m44: number; invertSelf(): DOMMatrix; multiplySelf(other?: DOMMatrixInit): DOMMatrix; @@ -6750,29 +7148,51 @@ declare var WebKitCSSMatrix: typeof DOMMatrix; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly) */ interface DOMMatrixReadOnly { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly a: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly b: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly c: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly d: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly e: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly f: number; readonly is2D: boolean; readonly isIdentity: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m11: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m12: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m13: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m14: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m21: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m22: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m23: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m24: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m31: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m32: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m33: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m34: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m41: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m42: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m43: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m44: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/flipX) */ flipX(): DOMMatrix; @@ -7282,7 +7702,10 @@ declare var DataTransferItemList: { }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream) */ -interface DecompressionStream extends GenericTransformStream {} +interface DecompressionStream extends GenericTransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; +} declare var DecompressionStream: { prototype: DecompressionStream; @@ -7554,6 +7977,8 @@ interface Document * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/forms) */ readonly forms: HTMLCollectionOf; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/fragmentDirective) */ + readonly fragmentDirective: FragmentDirective; /** * @deprecated * @@ -7698,6 +8123,12 @@ interface Document adoptNode(node: T): T; /** @deprecated */ captureEvents(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/caretPositionFromPoint) */ + caretPositionFromPoint( + x: number, + y: number, + options?: CaretPositionFromPointOptions, + ): CaretPosition | null; /** @deprecated */ caretRangeFromPoint(x: number, y: number): Range | null; /** @@ -7839,8 +8270,6 @@ interface Document createEvent(eventInterface: "MessageEvent"): MessageEvent; createEvent(eventInterface: "MouseEvent"): MouseEvent; createEvent(eventInterface: "MouseEvents"): MouseEvent; - createEvent(eventInterface: "MutationEvent"): MutationEvent; - createEvent(eventInterface: "MutationEvents"): MutationEvent; createEvent( eventInterface: "OfflineAudioCompletionEvent", ): OfflineAudioCompletionEvent; @@ -8092,7 +8521,9 @@ interface Document /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/requestStorageAccess) */ requestStorageAccess(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/startViewTransition) */ - startViewTransition(callbackOptions?: UpdateCallback): ViewTransition; + startViewTransition( + callbackOptions?: ViewTransitionUpdateCallback, + ): ViewTransition; /** * Writes one or more HTML expressions to a document in the specified window. * @param content Specifies the text and HTML tags to write. @@ -8382,6 +8813,8 @@ interface Element readonly clientTop: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/clientWidth) */ readonly clientWidth: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/currentCSSZoom) */ + readonly currentCSSZoom: number; /** * Returns the value of element's id content attribute. Can be set to change it. * @@ -8769,6 +9202,25 @@ declare var ElementInternals: { new (): ElementInternals; }; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk) */ +interface EncodedAudioChunk { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk/byteLength) */ + readonly byteLength: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk/duration) */ + readonly duration: number | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk/timestamp) */ + readonly timestamp: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk/type) */ + readonly type: EncodedAudioChunkType; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk/copyTo) */ + copyTo(destination: AllowSharedBufferSource): void; +} + +declare var EncodedAudioChunk: { + prototype: EncodedAudioChunk; + new (init: EncodedAudioChunkInit): EncodedAudioChunk; +}; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk) */ interface EncodedVideoChunk { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk/byteLength) */ @@ -9447,25 +9899,25 @@ declare var FontFace: { prototype: FontFace; new ( family: string, - source: string | BinaryData, + source: string | BufferSource, descriptors?: FontFaceDescriptors, ): FontFace; }; interface FontFaceSetEventMap { - loading: Event; - loadingdone: Event; - loadingerror: Event; + loading: FontFaceSetLoadEvent; + loadingdone: FontFaceSetLoadEvent; + loadingerror: FontFaceSetLoadEvent; } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet) */ interface FontFaceSet extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loading_event) */ - onloading: ((this: FontFaceSet, ev: Event) => any) | null; + onloading: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loadingdone_event) */ - onloadingdone: ((this: FontFaceSet, ev: Event) => any) | null; + onloadingdone: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loadingerror_event) */ - onloadingerror: ((this: FontFaceSet, ev: Event) => any) | null; + onloadingerror: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/ready) */ readonly ready: Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/status) */ @@ -9508,7 +9960,7 @@ interface FontFaceSet extends EventTarget { declare var FontFaceSet: { prototype: FontFaceSet; - new (initialFaces: FontFace[]): FontFaceSet; + new (): FontFaceSet; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSetLoadEvent) */ @@ -9582,6 +10034,14 @@ declare var FormDataEvent: { new (type: string, eventInitDict: FormDataEventInit): FormDataEvent; }; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FragmentDirective) */ +interface FragmentDirective {} + +declare var FragmentDirective: { + prototype: FragmentDirective; + new (): FragmentDirective; +}; + /** * A change in volume. It is an AudioNode audio-processing module that causes a given gain to be applied to the input data before its propagation to the output. A GainNode always has exactly one input and one output, both with the same number of channels. * @@ -9671,6 +10131,7 @@ interface GamepadHapticActuator { type: GamepadHapticEffectType, params?: GamepadEffectParameters, ): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GamepadHapticActuator/reset) */ reset(): Promise; } @@ -10653,7 +11114,11 @@ declare var HTMLBRElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLBaseElement) */ interface HTMLBaseElement extends HTMLElement { - /** Gets or sets the baseline URL on which relative links are based. */ + /** + * Gets or sets the baseline URL on which relative links are based. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLBaseElement/href) + */ href: string; /** * Sets or retrieves the window or frame at which to target content. @@ -10745,7 +11210,11 @@ declare var HTMLBodyElement: { interface HTMLButtonElement extends HTMLElement, PopoverInvokerElement { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/disabled) */ disabled: boolean; - /** Retrieves a reference to the form that the object is embedded in. */ + /** + * Retrieves a reference to the form that the object is embedded in. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/form) + */ readonly form: HTMLFormElement | null; /** Overrides the action attribute (where the data on a form is sent) on the parent form element. */ formAction: string; @@ -10759,7 +11228,11 @@ interface HTMLButtonElement extends HTMLElement, PopoverInvokerElement { formTarget: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/labels) */ readonly labels: NodeListOf; - /** Sets or retrieves the name of the object. */ + /** + * Sets or retrieves the name of the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/name) + */ name: string; /** * Gets the classification and default behavior of the button. @@ -10767,20 +11240,43 @@ interface HTMLButtonElement extends HTMLElement, PopoverInvokerElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/type) */ type: "submit" | "reset" | "button"; - /** Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. */ + /** + * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/validationMessage) + */ readonly validationMessage: string; - /** Returns a ValidityState object that represents the validity states of an element. */ + /** + * Returns a ValidityState object that represents the validity states of an element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/validity) + */ readonly validity: ValidityState; - /** Sets or retrieves the default or selected value of the control. */ + /** + * Sets or retrieves the default or selected value of the control. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/value) + */ value: string; - /** Returns whether an element will successfully validate based on forms validation rules and constraints. */ + /** + * Returns whether an element will successfully validate based on forms validation rules and constraints. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/willValidate) + */ readonly willValidate: boolean; - /** Returns whether a form will validate when it is submitted, without having to submit it. */ + /** + * Returns whether a form will validate when it is submitted, without having to submit it. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/checkValidity) + */ checkValidity(): boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/reportValidity) */ reportValidity(): boolean; /** * Sets a custom error message that is displayed when a form is submitted. * @param error Sets a custom error message that is displayed when a form is submitted. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/setCustomValidity) */ setCustomValidity(error: string): void; addEventListener( @@ -11008,7 +11504,11 @@ declare var HTMLDataElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDataListElement) */ interface HTMLDataListElement extends HTMLElement { - /** Returns an HTMLCollection of the option elements of the datalist element. */ + /** + * Returns an HTMLCollection of the option elements of the datalist element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDataListElement/options) + */ readonly options: HTMLCollectionOf; addEventListener( type: K, @@ -11039,6 +11539,7 @@ declare var HTMLDataListElement: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDetailsElement) */ interface HTMLDetailsElement extends HTMLElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDetailsElement/open) */ name: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDetailsElement/open) */ open: boolean; @@ -11271,6 +11772,7 @@ interface HTMLElement title: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/translate) */ translate: boolean; + writingSuggestions: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/attachInternals) */ attachInternals(): ElementInternals; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/click) */ @@ -11374,26 +11876,59 @@ declare var HTMLEmbedElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement) */ interface HTMLFieldSetElement extends HTMLElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement/disabled) */ disabled: boolean; - /** Returns an HTMLCollection of the form controls in the element. */ + /** + * Returns an HTMLCollection of the form controls in the element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement/elements) + */ readonly elements: HTMLCollection; - /** Retrieves a reference to the form that the object is embedded in. */ + /** + * Retrieves a reference to the form that the object is embedded in. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement/form) + */ readonly form: HTMLFormElement | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement/name) */ name: string; - /** Returns the string "fieldset". */ + /** + * Returns the string "fieldset". + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement/type) + */ readonly type: string; - /** Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. */ + /** + * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement/validationMessage) + */ readonly validationMessage: string; - /** Returns a ValidityState object that represents the validity states of an element. */ + /** + * Returns a ValidityState object that represents the validity states of an element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement/validity) + */ readonly validity: ValidityState; - /** Returns whether an element will successfully validate based on forms validation rules and constraints. */ + /** + * Returns whether an element will successfully validate based on forms validation rules and constraints. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement/willValidate) + */ readonly willValidate: boolean; - /** Returns whether a form will validate when it is submitted, without having to submit it. */ + /** + * Returns whether a form will validate when it is submitted, without having to submit it. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement/checkValidity) + */ checkValidity(): boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement/reportValidity) */ reportValidity(): boolean; /** * Sets a custom error message that is displayed when a form is submitted. * @param error Sets a custom error message that is displayed when a form is submitted. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFieldSetElement/setCustomValidity) */ setCustomValidity(error: string): void; addEventListener( @@ -11564,7 +12099,11 @@ interface HTMLFormElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/target) */ target: string; - /** Returns whether a form will validate when it is submitted, without having to submit it. */ + /** + * Returns whether a form will validate when it is submitted, without having to submit it. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/checkValidity) + */ checkValidity(): boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/reportValidity) */ reportValidity(): boolean; @@ -12278,23 +12817,48 @@ declare var HTMLImageElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement) */ interface HTMLInputElement extends HTMLElement, PopoverInvokerElement { - /** Sets or retrieves a comma-separated list of content types. */ + /** + * Sets or retrieves a comma-separated list of content types. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/accept) + */ accept: string; /** * Sets or retrieves how the object is aligned with adjacent text. * @deprecated */ align: string; - /** Sets or retrieves a text alternative to the graphic. */ + /** + * Sets or retrieves a text alternative to the graphic. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/alt) + */ alt: string; - /** Specifies whether autocomplete is applied to an editable text field. */ + /** + * Specifies whether autocomplete is applied to an editable text field. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/autocomplete) + */ autocomplete: AutoFill; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/capture) */ capture: string; - /** Sets or retrieves the state of the check box or radio button. */ + /** + * Sets or retrieves the state of the check box or radio button. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/checked) + */ checked: boolean; - /** Sets or retrieves the state of the check box or radio button. */ + /** + * Sets or retrieves the state of the check box or radio button. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/defaultChecked) + */ defaultChecked: boolean; - /** Sets or retrieves the initial contents of the object. */ + /** + * Sets or retrieves the initial contents of the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/defaultValue) + */ defaultValue: string; dirName: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/disabled) */ @@ -12305,7 +12869,11 @@ interface HTMLInputElement extends HTMLElement, PopoverInvokerElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/files) */ files: FileList | null; - /** Retrieves a reference to the form that the object is embedded in. */ + /** + * Retrieves a reference to the form that the object is embedded in. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/form) + */ readonly form: HTMLFormElement | null; /** Overrides the action attribute (where the data on a form is sent) on the parent form element. */ formAction: string; @@ -12317,20 +12885,45 @@ interface HTMLInputElement extends HTMLElement, PopoverInvokerElement { formNoValidate: boolean; /** Overrides the target attribute on a form element. */ formTarget: string; - /** Sets or retrieves the height of the object. */ + /** + * Sets or retrieves the height of the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/height) + */ height: number; - /** When set, overrides the rendering of checkbox controls so that the current value is not visible. */ + /** + * When set, overrides the rendering of checkbox controls so that the current value is not visible. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/indeterminate) + */ indeterminate: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/labels) */ readonly labels: NodeListOf | null; - /** Specifies the ID of a pre-defined datalist of options for an input element. */ + /** + * Specifies the ID of a pre-defined datalist of options for an input element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/list) + */ readonly list: HTMLDataListElement | null; - /** Defines the maximum acceptable value for an input element with type="number".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field. */ + /** + * Defines the maximum acceptable value for an input element with type="number".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/max) + */ max: string; - /** Sets or retrieves the maximum number of characters that the user can enter in a text control. */ + /** + * Sets or retrieves the maximum number of characters that the user can enter in a text control. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/maxLength) + */ maxLength: number; - /** Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field. */ + /** + * Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/min) + */ min: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/minLength) */ minLength: number; /** * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list. @@ -12338,14 +12931,31 @@ interface HTMLInputElement extends HTMLElement, PopoverInvokerElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/multiple) */ multiple: boolean; - /** Sets or retrieves the name of the object. */ + /** + * Sets or retrieves the name of the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/name) + */ name: string; - /** Gets or sets a string containing a regular expression that the user's input must match. */ + /** + * Gets or sets a string containing a regular expression that the user's input must match. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/pattern) + */ pattern: string; - /** Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field. */ + /** + * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/placeholder) + */ placeholder: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/readOnly) */ readOnly: boolean; - /** When present, marks an element that can't be submitted without a value. */ + /** + * When present, marks an element that can't be submitted without a value. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/required) + */ required: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/selectionDirection) */ selectionDirection: "forward" | "backward" | "none" | null; @@ -12361,10 +12971,19 @@ interface HTMLInputElement extends HTMLElement, PopoverInvokerElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/selectionStart) */ selectionStart: number | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/size) */ size: number; - /** The address or URL of the a media resource that is to be considered. */ + /** + * The address or URL of the a media resource that is to be considered. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/src) + */ src: string; - /** Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field. */ + /** + * Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/step) + */ step: string; /** * Returns the content type of the object. @@ -12377,23 +12996,51 @@ interface HTMLInputElement extends HTMLElement, PopoverInvokerElement { * @deprecated */ useMap: string; - /** Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. */ + /** + * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/validationMessage) + */ readonly validationMessage: string; - /** Returns a ValidityState object that represents the validity states of an element. */ + /** + * Returns a ValidityState object that represents the validity states of an element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/validity) + */ readonly validity: ValidityState; - /** Returns the value of the data at the cursor's current position. */ + /** + * Returns the value of the data at the cursor's current position. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/value) + */ value: string; - /** Returns a Date object representing the form control's value, if applicable; otherwise, returns null. Can be set, to change the value. Throws an "InvalidStateError" DOMException if the control isn't date- or time-based. */ + /** + * Returns a Date object representing the form control's value, if applicable; otherwise, returns null. Can be set, to change the value. Throws an "InvalidStateError" DOMException if the control isn't date- or time-based. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/valueAsDate) + */ valueAsDate: Date | null; - /** Returns the input field value as a number. */ + /** + * Returns the input field value as a number. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/valueAsNumber) + */ valueAsNumber: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/webkitEntries) */ readonly webkitEntries: ReadonlyArray; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/webkitdirectory) */ webkitdirectory: boolean; - /** Sets or retrieves the width of the object. */ + /** + * Sets or retrieves the width of the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/width) + */ width: number; - /** Returns whether an element will successfully validate based on forms validation rules and constraints. */ + /** + * Returns whether an element will successfully validate based on forms validation rules and constraints. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/willValidate) + */ readonly willValidate: boolean; /** * Returns whether a form will validate when it is submitted, without having to submit it. @@ -12576,7 +13223,11 @@ declare var HTMLLabelElement: { interface HTMLLegendElement extends HTMLElement { /** @deprecated */ align: string; - /** Retrieves a reference to the form that the object is embedded in. */ + /** + * Retrieves a reference to the form that the object is embedded in. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLegendElement/form) + */ readonly form: HTMLFormElement | null; addEventListener( type: K, @@ -12624,7 +13275,11 @@ interface HTMLLinkElement extends HTMLElement, LinkStyle { disabled: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/fetchPriority) */ fetchPriority: string; - /** Sets or retrieves a destination URL or an anchor point. */ + /** + * Sets or retrieves a destination URL or an anchor point. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/href) + */ href: string; /** * Sets or retrieves the language code of the object. @@ -12636,7 +13291,11 @@ interface HTMLLinkElement extends HTMLElement, LinkStyle { imageSrcset: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/integrity) */ integrity: string; - /** Sets or retrieves the media type. */ + /** + * Sets or retrieves the media type. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/media) + */ media: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/referrerPolicy) */ referrerPolicy: string; @@ -12698,7 +13357,11 @@ declare var HTMLLinkElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMapElement) */ interface HTMLMapElement extends HTMLElement { - /** Retrieves a collection of the area objects defined for the given map object. */ + /** + * Retrieves a collection of the area objects defined for the given map object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMapElement/areas) + */ readonly areas: HTMLCollection; /** * Sets or retrieves the name of the object. @@ -13135,13 +13798,19 @@ declare var HTMLMetaElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement) */ interface HTMLMeterElement extends HTMLElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement/high) */ high: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement/labels) */ readonly labels: NodeListOf; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement/low) */ low: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement/max) */ max: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement/min) */ min: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement/optimum) */ optimum: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement/value) */ value: number; addEventListener( type: K, @@ -13369,6 +14038,7 @@ interface HTMLObjectElement extends HTMLElement { */ checkValidity(): boolean; getSVGDocument(): Document | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLObjectElement/reportValidity) */ reportValidity(): boolean; /** * Sets a custom error message that is displayed when a form is submitted. @@ -13410,8 +14080,13 @@ declare var HTMLObjectElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptGroupElement) */ interface HTMLOptGroupElement extends HTMLElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptGroupElement/disabled) */ disabled: boolean; - /** Sets or retrieves a value that you can use to implement your own label functionality for the object. */ + /** + * Sets or retrieves a value that you can use to implement your own label functionality for the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptGroupElement/label) + */ label: string; addEventListener( type: K, @@ -13446,20 +14121,49 @@ declare var HTMLOptGroupElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement) */ interface HTMLOptionElement extends HTMLElement { - /** Sets or retrieves the status of an option. */ + /** + * Sets or retrieves the status of an option. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement/defaultSelected) + */ defaultSelected: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement/disabled) */ disabled: boolean; - /** Retrieves a reference to the form that the object is embedded in. */ + /** + * Retrieves a reference to the form that the object is embedded in. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement/form) + */ readonly form: HTMLFormElement | null; - /** Sets or retrieves the ordinal position of an option in a list box. */ + /** + * Sets or retrieves the ordinal position of an option in a list box. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement/index) + */ readonly index: number; - /** Sets or retrieves a value that you can use to implement your own label functionality for the object. */ + /** + * Sets or retrieves a value that you can use to implement your own label functionality for the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement/label) + */ label: string; - /** Sets or retrieves whether the option in the list box is the default item. */ + /** + * Sets or retrieves whether the option in the list box is the default item. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement/selected) + */ selected: boolean; - /** Sets or retrieves the text string specified by the option tag. */ + /** + * Sets or retrieves the text string specified by the option tag. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement/text) + */ text: string; - /** Sets or retrieves the value which is returned to the server when the form control is submitted. */ + /** + * Sets or retrieves the value which is returned to the server when the form control is submitted. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement/value) + */ value: string; addEventListener( type: K, @@ -13552,24 +14256,38 @@ interface HTMLOrSVGElement { */ interface HTMLOutputElement extends HTMLElement { defaultValue: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/form) */ readonly form: HTMLFormElement | null; readonly htmlFor: DOMTokenList; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/labels) */ readonly labels: NodeListOf; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/name) */ name: string; - /** Returns the string "output". */ + /** + * Returns the string "output". + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/type) + */ readonly type: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/validationMessage) */ readonly validationMessage: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/validity) */ readonly validity: ValidityState; /** * Returns the element's current value. * * Can be set, to change the value. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/value) */ value: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/willValidate) */ readonly willValidate: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/checkValidity) */ checkValidity(): boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/reportValidity) */ reportValidity(): boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/setCustomValidity) */ setCustomValidity(error: string): void; addEventListener( type: K, @@ -13953,11 +14671,23 @@ interface HTMLSelectElement extends HTMLElement { readonly form: HTMLFormElement | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/labels) */ readonly labels: NodeListOf; - /** Sets or retrieves the number of objects in a collection. */ + /** + * Sets or retrieves the number of objects in a collection. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/length) + */ length: number; - /** Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list. */ + /** + * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/multiple) + */ multiple: boolean; - /** Sets or retrieves the name of the object. */ + /** + * Sets or retrieves the name of the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/name) + */ name: string; /** * Returns an HTMLOptionsCollection of the list of options. @@ -13965,7 +14695,11 @@ interface HTMLSelectElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/options) */ readonly options: HTMLOptionsCollection; - /** When present, marks an element that can't be submitted without a value. */ + /** + * When present, marks an element that can't be submitted without a value. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/required) + */ required: boolean; /** * Sets or retrieves the index of the selected option in a select object. @@ -13975,7 +14709,11 @@ interface HTMLSelectElement extends HTMLElement { selectedIndex: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/selectedOptions) */ readonly selectedOptions: HTMLCollectionOf; - /** Sets or retrieves the number of rows in the list box. */ + /** + * Sets or retrieves the number of rows in the list box. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/size) + */ size: number; /** * Retrieves the type of select control based on the value of the MULTIPLE attribute. @@ -13983,9 +14721,17 @@ interface HTMLSelectElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/type) */ readonly type: "select-one" | "select-multiple"; - /** Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. */ + /** + * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/validationMessage) + */ readonly validationMessage: string; - /** Returns a ValidityState object that represents the validity states of an element. */ + /** + * Returns a ValidityState object that represents the validity states of an element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/validity) + */ readonly validity: ValidityState; /** * Sets or retrieves the value which is returned to the server when the form control is submitted. @@ -13993,7 +14739,11 @@ interface HTMLSelectElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/value) */ value: string; - /** Returns whether an element will successfully validate based on forms validation rules and constraints. */ + /** + * Returns whether an element will successfully validate based on forms validation rules and constraints. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/willValidate) + */ readonly willValidate: boolean; /** * Adds an element to the areas, controlRange, or options collection. @@ -14035,6 +14785,7 @@ interface HTMLSelectElement extends HTMLElement { */ remove(): void; remove(index: number): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/reportValidity) */ reportValidity(): boolean; /** * Sets a custom error message that is displayed when a form is submitted. @@ -14249,6 +15000,8 @@ interface HTMLTableCaptionElement extends HTMLElement { /** * Sets or retrieves the alignment of the caption or legend. * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableCaptionElement/align) */ align: string; addEventListener( @@ -14725,6 +15478,8 @@ interface HTMLTableRowElement extends HTMLElement { /** * Sets or retrieves how the object is aligned with adjacent text. * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableRowElement/align) */ align: string; /** @@ -14763,7 +15518,11 @@ interface HTMLTableRowElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableRowElement/sectionRowIndex) */ readonly sectionRowIndex: number; - /** @deprecated */ + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableRowElement/vAlign) + */ vAlign: string; /** * Removes the specified cell from the table row, as well as from the cells collection. @@ -14815,6 +15574,8 @@ interface HTMLTableSectionElement extends HTMLElement { /** * Sets or retrieves a value that indicates the table alignment. * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableSectionElement/align) */ align: string; /** @@ -14835,7 +15596,11 @@ interface HTMLTableSectionElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableSectionElement/rows) */ readonly rows: HTMLCollectionOf; - /** @deprecated */ + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTableSectionElement/vAlign) + */ vAlign: string; /** * Removes the specified row (tr) from the element and from the rows collection. @@ -14937,35 +15702,84 @@ declare var HTMLTemplateElement: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement) */ interface HTMLTextAreaElement extends HTMLElement { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/autocomplete) */ autocomplete: AutoFill; - /** Sets or retrieves the width of the object. */ + /** + * Sets or retrieves the width of the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/cols) + */ cols: number; - /** Sets or retrieves the initial contents of the object. */ + /** + * Sets or retrieves the initial contents of the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/defaultValue) + */ defaultValue: string; dirName: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/disabled) */ disabled: boolean; - /** Retrieves a reference to the form that the object is embedded in. */ + /** + * Retrieves a reference to the form that the object is embedded in. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/form) + */ readonly form: HTMLFormElement | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/labels) */ readonly labels: NodeListOf; - /** Sets or retrieves the maximum number of characters that the user can enter in a text control. */ + /** + * Sets or retrieves the maximum number of characters that the user can enter in a text control. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/maxLength) + */ maxLength: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/minLength) */ minLength: number; - /** Sets or retrieves the name of the object. */ + /** + * Sets or retrieves the name of the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/name) + */ name: string; - /** Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field. */ + /** + * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/placeholder) + */ placeholder: string; - /** Sets or retrieves the value indicated whether the content of the object is read-only. */ + /** + * Sets or retrieves the value indicated whether the content of the object is read-only. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/readOnly) + */ readOnly: boolean; - /** When present, marks an element that can't be submitted without a value. */ + /** + * When present, marks an element that can't be submitted without a value. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/required) + */ required: boolean; - /** Sets or retrieves the number of horizontal rows contained in the object. */ + /** + * Sets or retrieves the number of horizontal rows contained in the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/rows) + */ rows: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/selectionDirection) */ selectionDirection: "forward" | "backward" | "none"; - /** Gets or sets the end position or offset of a text selection. */ + /** + * Gets or sets the end position or offset of a text selection. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/selectionEnd) + */ selectionEnd: number; - /** Gets or sets the starting position or offset of a text selection. */ + /** + * Gets or sets the starting position or offset of a text selection. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/selectionStart) + */ selectionStart: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/textLength) */ readonly textLength: number; /** * Retrieves the type of control. @@ -14973,26 +15787,58 @@ interface HTMLTextAreaElement extends HTMLElement { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/type) */ readonly type: string; - /** Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. */ + /** + * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/validationMessage) + */ readonly validationMessage: string; - /** Returns a ValidityState object that represents the validity states of an element. */ + /** + * Returns a ValidityState object that represents the validity states of an element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/validity) + */ readonly validity: ValidityState; - /** Retrieves or sets the text in the entry field of the textArea element. */ + /** + * Retrieves or sets the text in the entry field of the textArea element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/value) + */ value: string; - /** Returns whether an element will successfully validate based on forms validation rules and constraints. */ + /** + * Returns whether an element will successfully validate based on forms validation rules and constraints. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/willValidate) + */ readonly willValidate: boolean; - /** Sets or retrieves how to handle wordwrapping in the object. */ + /** + * Sets or retrieves how to handle wordwrapping in the object. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/wrap) + */ wrap: string; - /** Returns whether a form will validate when it is submitted, without having to submit it. */ + /** + * Returns whether a form will validate when it is submitted, without having to submit it. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/checkValidity) + */ checkValidity(): boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/reportValidity) */ reportValidity(): boolean; - /** Highlights the input area of a form element. */ + /** + * Highlights the input area of a form element. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/select) + */ select(): void; /** * Sets a custom error message that is displayed when a form is submitted. * @param error Sets a custom error message that is displayed when a form is submitted. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/setCustomValidity) */ setCustomValidity(error: string): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/setRangeText) */ setRangeText(replacement: string): void; setRangeText( replacement: string, @@ -15005,6 +15851,8 @@ interface HTMLTextAreaElement extends HTMLElement { * @param start The offset into the text field for the start of the selection. * @param end The offset into the text field for the end of the selection. * @param direction The direction in which the selection is performed. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/setSelectionRange) */ setSelectionRange( start: number | null, @@ -15233,8 +16081,8 @@ declare var HTMLUnknownElement: { }; interface HTMLVideoElementEventMap extends HTMLMediaElementEventMap { - enterpictureinpicture: Event; - leavepictureinpicture: Event; + enterpictureinpicture: PictureInPictureEvent; + leavepictureinpicture: PictureInPictureEvent; } /** @@ -15252,9 +16100,13 @@ interface HTMLVideoElement extends HTMLMediaElement { */ height: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement/enterpictureinpicture_event) */ - onenterpictureinpicture: ((this: HTMLVideoElement, ev: Event) => any) | null; + onenterpictureinpicture: + | ((this: HTMLVideoElement, ev: PictureInPictureEvent) => any) + | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement/leavepictureinpicture_event) */ - onleavepictureinpicture: ((this: HTMLVideoElement, ev: Event) => any) | null; + onleavepictureinpicture: + | ((this: HTMLVideoElement, ev: PictureInPictureEvent) => any) + | null; /** Gets or sets the playsinline of the video element. for example, On iPhone, video elements will now be allowed to play inline, and will not automatically enter fullscreen mode when playback begins. */ playsInline: boolean; /** @@ -16164,7 +17016,7 @@ interface IDBTransaction extends EventTarget { /** * Returns a list of the names of object stores in the transaction's scope. For an upgrade transaction this is all object stores in the database. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/ObjectStoreNames) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/objectStoreNames) */ readonly objectStoreNames: DOMStringList; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/abort_event) */ @@ -16295,7 +17147,11 @@ declare var ImageBitmap: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageBitmapRenderingContext) */ interface ImageBitmapRenderingContext { - /** Returns the canvas element that the context is bound to. */ + /** + * Returns the canvas element that the context is bound to. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageBitmapRenderingContext/canvas) + */ readonly canvas: HTMLCanvasElement | OffscreenCanvas; /** * Transfers the underlying bitmap data from imageBitmap to context, and the bitmap becomes the contents of the canvas element to which context is bound. @@ -16442,9 +17298,7 @@ interface IntersectionObserverEntry { declare var IntersectionObserverEntry: { prototype: IntersectionObserverEntry; - new ( - intersectionObserverEntryInit: IntersectionObserverEntryInit, - ): IntersectionObserverEntry; + new (): IntersectionObserverEntry; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/KHR_parallel_shader_compile) */ @@ -16724,7 +17578,7 @@ declare var LockManager: { }; interface MIDIAccessEventMap { - statechange: Event; + statechange: MIDIConnectionEvent; } /** @@ -16736,7 +17590,7 @@ interface MIDIAccess extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIAccess/inputs) */ readonly inputs: MIDIInputMap; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIAccess/statechange_event) */ - onstatechange: ((this: MIDIAccess, ev: Event) => any) | null; + onstatechange: ((this: MIDIAccess, ev: MIDIConnectionEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIAccess/outputs) */ readonly outputs: MIDIOutputMap; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIAccess/sysexEnabled) */ @@ -17302,6 +18156,7 @@ declare var MediaKeySystemAccess: { interface MediaKeys { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaKeys/createSession) */ createSession(sessionType?: MediaKeySessionType): MediaKeySession; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaKeys/getStatusForPolicy) */ getStatusForPolicy(policy?: MediaKeysPolicy): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaKeys/setServerCertificate) */ setServerCertificate(serverCertificate: BufferSource): Promise; @@ -17427,7 +18282,7 @@ declare var MediaQueryListEvent: { interface MediaRecorderEventMap { dataavailable: BlobEvent; - error: Event; + error: ErrorEvent; pause: Event; resume: Event; start: Event; @@ -17443,7 +18298,7 @@ interface MediaRecorder extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaRecorder/dataavailable_event) */ ondataavailable: ((this: MediaRecorder, ev: BlobEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaRecorder/error_event) */ - onerror: ((this: MediaRecorder, ev: Event) => any) | null; + onerror: ((this: MediaRecorder, ev: ErrorEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaRecorder/pause_event) */ onpause: ((this: MediaRecorder, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaRecorder/resume_event) */ @@ -18050,72 +18905,6 @@ declare var MouseEvent: { new (type: string, eventInitDict?: MouseEventInit): MouseEvent; }; -/** - * Provides event properties that are specific to modifications to the Document Object Model (DOM) hierarchy and nodes. - * @deprecated DOM4 [DOM] provides a new mechanism using a MutationObserver interface which addresses the use cases that mutation events solve, but in a more performant manner. Thus, this specification describes mutation events for reference and completeness of legacy behavior, but deprecates the use of the MutationEvent interface. - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MutationEvent) - */ -interface MutationEvent extends Event { - /** - * @deprecated - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MutationEvent/attrChange) - */ - readonly attrChange: number; - /** - * @deprecated - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MutationEvent/attrName) - */ - readonly attrName: string; - /** - * @deprecated - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MutationEvent/newValue) - */ - readonly newValue: string; - /** - * @deprecated - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MutationEvent/prevValue) - */ - readonly prevValue: string; - /** - * @deprecated - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MutationEvent/relatedNode) - */ - readonly relatedNode: Node | null; - /** - * @deprecated - * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MutationEvent/initMutationEvent) - */ - initMutationEvent( - typeArg: string, - bubblesArg?: boolean, - cancelableArg?: boolean, - relatedNodeArg?: Node | null, - prevValueArg?: string, - newValueArg?: string, - attrNameArg?: string, - attrChangeArg?: number, - ): void; - readonly MODIFICATION: 1; - readonly ADDITION: 2; - readonly REMOVAL: 3; -} - -/** @deprecated */ -declare var MutationEvent: { - prototype: MutationEvent; - new (): MutationEvent; - readonly MODIFICATION: 1; - readonly ADDITION: 2; - readonly REMOVAL: 3; -}; - /** * Provides the ability to watch for changes being made to the DOM tree. It is designed as a replacement for the older Mutation Events feature which was part of the DOM3 Events specification. * @@ -18975,7 +19764,7 @@ interface OES_vertex_array_object { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/bindVertexArrayOES) */ bindVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/createVertexArrayOES) */ - createVertexArrayOES(): WebGLVertexArrayObjectOES | null; + createVertexArrayOES(): WebGLVertexArrayObjectOES; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/deleteVertexArrayOES) */ deleteVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/isVertexArrayOES) */ @@ -19186,6 +19975,7 @@ interface OffscreenCanvasRenderingContext2D CanvasText, CanvasTextDrawingStyles, CanvasTransform { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/canvas) */ readonly canvas: OffscreenCanvas; } @@ -19442,6 +20232,37 @@ declare var Path2D: { new (path?: Path2D | string): Path2D; }; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContactAddress) */ +interface PaymentAddress { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContactAddress/addressLine) */ + readonly addressLine: ReadonlyArray; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContactAddress/city) */ + readonly city: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContactAddress/country) */ + readonly country: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContactAddress/dependentLocality) */ + readonly dependentLocality: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContactAddress/organization) */ + readonly organization: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContactAddress/phone) */ + readonly phone: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContactAddress/postalCode) */ + readonly postalCode: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContactAddress/recipient) */ + readonly recipient: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContactAddress/region) */ + readonly region: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContactAddress/sortingCode) */ + readonly sortingCode: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ContactAddress/toJSON) */ + toJSON(): any; +} + +declare var PaymentAddress: { + prototype: PaymentAddress; + new (): PaymentAddress; +}; + /** * Available only in secure contexts. * @@ -19463,7 +20284,9 @@ declare var PaymentMethodChangeEvent: { }; interface PaymentRequestEventMap { - paymentmethodchange: Event; + paymentmethodchange: PaymentMethodChangeEvent; + shippingaddresschange: PaymentRequestUpdateEvent; + shippingoptionchange: PaymentRequestUpdateEvent; } /** @@ -19476,7 +20299,43 @@ interface PaymentRequest extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentRequest/id) */ readonly id: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentRequest/paymentmethodchange_event) */ - onpaymentmethodchange: ((this: PaymentRequest, ev: Event) => any) | null; + onpaymentmethodchange: + | ((this: PaymentRequest, ev: PaymentMethodChangeEvent) => any) + | null; + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentRequest/shippingaddresschange_event) + */ + onshippingaddresschange: + | ((this: PaymentRequest, ev: PaymentRequestUpdateEvent) => any) + | null; + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentRequest/shippingoptionchange_event) + */ + onshippingoptionchange: + | ((this: PaymentRequest, ev: PaymentRequestUpdateEvent) => any) + | null; + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentRequest/shippingAddress) + */ + readonly shippingAddress: PaymentAddress | null; + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentRequest/shippingOption) + */ + readonly shippingOption: string | null; + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentRequest/shippingType) + */ + readonly shippingType: PaymentShippingType | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentRequest/abort) */ abort(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentRequest/canMakePayment) */ @@ -19512,6 +20371,7 @@ declare var PaymentRequest: { new ( methodData: PaymentMethodData[], details: PaymentDetailsInit, + options?: PaymentOptions, ): PaymentRequest; }; @@ -19536,6 +20396,10 @@ declare var PaymentRequestUpdateEvent: { ): PaymentRequestUpdateEvent; }; +interface PaymentResponseEventMap { + payerdetailchange: PaymentRequestUpdateEvent; +} + /** * This Payment Request API interface is returned after a user selects a payment method and approves a payment request. * Available only in secure contexts. @@ -19547,14 +20411,48 @@ interface PaymentResponse extends EventTarget { readonly details: any; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/methodName) */ readonly methodName: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/payerdetailchange_event) */ + onpayerdetailchange: + | ((this: PaymentResponse, ev: PaymentRequestUpdateEvent) => any) + | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/payerEmail) */ + readonly payerEmail: string | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/payerName) */ + readonly payerName: string | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/payerPhone) */ + readonly payerPhone: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/requestId) */ readonly requestId: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/shippingAddress) */ + readonly shippingAddress: PaymentAddress | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/shippingOption) */ + readonly shippingOption: string | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/complete) */ complete(result?: PaymentComplete): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/retry) */ retry(errorFields?: PaymentValidationErrors): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentResponse/toJSON) */ toJSON(): any; + addEventListener( + type: K, + listener: (this: PaymentResponse, ev: PaymentResponseEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: PaymentResponse, ev: PaymentResponseEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions, + ): void; } declare var PaymentResponse: { @@ -19865,6 +20763,8 @@ interface PerformanceResourceTiming extends PerformanceEntry { readonly responseEnd: DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseStart) */ readonly responseStart: DOMHighResTimeStamp; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseStatus) */ + readonly responseStatus: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/secureConnectionStart) */ readonly secureConnectionStart: DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/serverTiming) */ @@ -20240,6 +21140,10 @@ declare var PluginArray: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent) */ interface PointerEvent extends MouseEvent { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/altitudeAngle) */ + readonly altitudeAngle: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/azimuthAngle) */ + readonly azimuthAngle: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/height) */ readonly height: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/isPrimary) */ @@ -20368,15 +21272,25 @@ interface PublicKeyCredential extends Credential { readonly response: AuthenticatorResponse; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/getClientExtensionResults) */ getClientExtensionResults(): AuthenticationExtensionsClientOutputs; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/toJSON) */ + toJSON(): PublicKeyCredentialJSON; } declare var PublicKeyCredential: { prototype: PublicKeyCredential; new (): PublicKeyCredential; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/isConditionalMediationAvailable) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/isConditionalMediationAvailable_static) */ isConditionalMediationAvailable(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/isUserVerifyingPlatformAuthenticatorAvailable_static) */ isUserVerifyingPlatformAuthenticatorAvailable(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/parseCreationOptionsFromJSON_static) */ + parseCreationOptionsFromJSON( + options: PublicKeyCredentialCreationOptionsJSON, + ): PublicKeyCredentialCreationOptions; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PublicKeyCredential/parseRequestOptionsFromJSON_static) */ + parseRequestOptionsFromJSON( + options: PublicKeyCredentialRequestOptionsJSON, + ): PublicKeyCredentialRequestOptions; }; /** @@ -20524,7 +21438,7 @@ interface RTCDataChannelEventMap { bufferedamountlow: Event; close: Event; closing: Event; - error: Event; + error: RTCErrorEvent; message: MessageEvent; open: Event; } @@ -20554,7 +21468,7 @@ interface RTCDataChannel extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/closing_event) */ onclosing: ((this: RTCDataChannel, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/error_event) */ - onerror: ((this: RTCDataChannel, ev: Event) => any) | null; + onerror: ((this: RTCDataChannel, ev: RTCErrorEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/message_event) */ onmessage: ((this: RTCDataChannel, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/open_event) */ @@ -20614,7 +21528,7 @@ declare var RTCDataChannelEvent: { }; interface RTCDtlsTransportEventMap { - error: Event; + error: RTCErrorEvent; statechange: Event; } @@ -20623,7 +21537,7 @@ interface RTCDtlsTransport extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDtlsTransport/iceTransport) */ readonly iceTransport: RTCIceTransport; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDtlsTransport/error_event) */ - onerror: ((this: RTCDtlsTransport, ev: Event) => any) | null; + onerror: ((this: RTCDtlsTransport, ev: RTCErrorEvent) => any) | null; onstatechange: ((this: RTCDtlsTransport, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDtlsTransport/state) */ readonly state: RTCDtlsTransportState; @@ -20889,10 +21803,10 @@ interface RTCPeerConnection extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/signalingState) */ readonly signalingState: RTCSignalingState; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCPeerConnection/addIceCandidate) */ - addIceCandidate(candidate?: RTCIceCandidateInit): Promise; + addIceCandidate(candidate?: RTCIceCandidateInit | null): Promise; /** @deprecated */ addIceCandidate( - candidate: RTCIceCandidateInit, + candidate: RTCIceCandidateInit | null, successCallback: VoidFunction, failureCallback: RTCPeerConnectionErrorCallback, ): Promise; @@ -21391,7 +22305,7 @@ interface ReadableStreamBYOBReader extends ReadableStreamGenericReader { declare var ReadableStreamBYOBReader: { prototype: ReadableStreamBYOBReader; - new (stream: ReadableStream): ReadableStreamBYOBReader; + new (stream: ReadableStream): ReadableStreamBYOBReader; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */ @@ -23793,14 +24707,23 @@ declare var SVGLength: { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLengthList) */ interface SVGLengthList { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLengthList/length) */ readonly length: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLengthList/numberOfItems) */ readonly numberOfItems: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLengthList/appendItem) */ appendItem(newItem: SVGLength): SVGLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLengthList/clear) */ clear(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLengthList/getItem) */ getItem(index: number): SVGLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLengthList/initialize) */ initialize(newItem: SVGLength): SVGLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLengthList/insertItemBefore) */ insertItemBefore(newItem: SVGLength, index: number): SVGLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLengthList/removeItem) */ removeItem(index: number): SVGLength; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGLengthList/replaceItem) */ replaceItem(newItem: SVGLength, index: number): SVGLength; [index: number]: SVGLength; } @@ -26295,7 +27218,7 @@ interface SubtleCrypto { | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, - length: number, + length?: number | null, ): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */ deriveKey( @@ -26572,8 +27495,23 @@ declare var TextEncoderStream: { new (): TextEncoderStream; }; +/** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEvent) + */ interface TextEvent extends UIEvent { + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEvent/data) + */ readonly data: string; + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEvent/initTextEvent) + */ initTextEvent( type: string, bubbles?: boolean, @@ -26583,6 +27521,7 @@ interface TextEvent extends UIEvent { ): void; } +/** @deprecated */ declare var TextEvent: { prototype: TextEvent; new (): TextEvent; @@ -26896,7 +27835,7 @@ interface TextTrackList extends EventTarget { onaddtrack: ((this: TextTrackList, ev: TrackEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextTrackList/change_event) */ onchange: ((this: TextTrackList, ev: Event) => any) | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextTrackList/removeTrack_event) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextTrackList/removetrack_event) */ onremovetrack: ((this: TextTrackList, ev: TrackEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextTrackList/getTrackById) */ getTrackById(id: string): TextTrack | null; @@ -27315,7 +28254,7 @@ declare var URLSearchParams: { interface UserActivation { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/UserActivation/hasBeenActive) */ readonly hasBeenActive: boolean; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/UserActivation/hasBeenActive) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/UserActivation/isActive) */ readonly isActive: boolean; } @@ -27400,6 +28339,7 @@ declare var VTTRegion: { interface ValidityState { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/badInput) */ readonly badInput: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/customError) */ readonly customError: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/patternMismatch) */ readonly patternMismatch: boolean; @@ -27415,6 +28355,7 @@ interface ValidityState { readonly tooShort: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/typeMismatch) */ readonly typeMismatch: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/valid) */ readonly valid: boolean; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ValidityState/valueMissing) */ readonly valueMissing: boolean; @@ -28687,13 +29628,13 @@ interface WebGL2RenderingContextBase { height: GLsizei, ): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/createQuery) */ - createQuery(): WebGLQuery | null; + createQuery(): WebGLQuery; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/createSampler) */ - createSampler(): WebGLSampler | null; + createSampler(): WebGLSampler; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/createTransformFeedback) */ - createTransformFeedback(): WebGLTransformFeedback | null; + createTransformFeedback(): WebGLTransformFeedback; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/createVertexArray) */ - createVertexArray(): WebGLVertexArrayObject | null; + createVertexArray(): WebGLVertexArrayObject; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/deleteQuery) */ deleteQuery(query: WebGLQuery | null): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/deleteSampler) */ @@ -30135,17 +31076,17 @@ interface WebGLRenderingContextBase { height: GLsizei, ): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createBuffer) */ - createBuffer(): WebGLBuffer | null; + createBuffer(): WebGLBuffer; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createFramebuffer) */ - createFramebuffer(): WebGLFramebuffer | null; + createFramebuffer(): WebGLFramebuffer; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createProgram) */ - createProgram(): WebGLProgram | null; + createProgram(): WebGLProgram; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createRenderbuffer) */ - createRenderbuffer(): WebGLRenderbuffer | null; + createRenderbuffer(): WebGLRenderbuffer; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createShader) */ createShader(type: GLenum): WebGLShader | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createTexture) */ - createTexture(): WebGLTexture | null; + createTexture(): WebGLTexture; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/cullFace) */ cullFace(mode: GLenum): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/deleteBuffer) */ @@ -31719,7 +32660,7 @@ interface WindowOrWorkerGlobalScope { sh: number, options?: ImageBitmapOptions, ): Promise; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/queueMicrotask) */ queueMicrotask(callback: VoidFunction): void; @@ -32219,7 +33160,11 @@ interface XPathEvaluatorBase { expression: string, resolver?: XPathNSResolver | null, ): XPathExpression; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/createNSResolver) */ + /** + * @deprecated + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/createNSResolver) + */ createNSResolver(nodeResolver: Node): Node; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/evaluate) */ evaluate( @@ -32342,7 +33287,7 @@ interface Console { clear(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static) */ count(label?: string): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countreset_static) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static) */ countReset(label?: string): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static) */ debug(...data: any[]): void; @@ -32354,9 +33299,9 @@ interface Console { error(...data: any[]): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static) */ group(...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupcollapsed_static) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static) */ groupCollapsed(...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupend_static) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static) */ groupEnd(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static) */ info(...data: any[]): void; @@ -32366,9 +33311,9 @@ interface Console { table(tabularData?: any, properties?: string[]): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static) */ time(label?: string): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeend_static) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static) */ timeEnd(label?: string): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timelog_static) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static) */ timeLog(label?: string, ...data: any[]): void; timeStamp(label?: string): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace_static) */ @@ -32677,6 +33622,10 @@ declare namespace WebAssembly { function validate(bytes: BufferSource): boolean; } +interface AudioDataOutputCallback { + (output: AudioData): void; +} + interface BlobCallback { (blob: Blob | null): void; } @@ -32693,6 +33642,10 @@ interface DecodeSuccessCallback { (decodedData: AudioBuffer): void; } +interface EncodedAudioChunkOutputCallback { + (output: EncodedAudioChunk, metadata?: EncodedAudioChunkMetadata): void; +} + interface EncodedVideoChunkOutputCallback { (chunk: EncodedVideoChunk, metadata?: EncodedVideoChunkMetadata): void; } @@ -32841,10 +33794,6 @@ interface UnderlyingSourceStartCallback { (controller: ReadableStreamController): any; } -interface UpdateCallback { - (): any; -} - interface VideoFrameOutputCallback { (output: VideoFrame): void; } @@ -32853,6 +33802,10 @@ interface VideoFrameRequestCallback { (now: DOMHighResTimeStamp, metadata: VideoFrameCallbackMetadata): void; } +interface ViewTransitionUpdateCallback { + (): any; +} + interface VoidFunction { (): void; } @@ -33988,7 +34941,7 @@ declare function createImageBitmap( sh: number, options?: ImageBitmapOptions, ): Promise; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ declare function fetch( input: RequestInfo | URL, init?: RequestInit, @@ -34051,8 +35004,8 @@ type AutoFillField = | AutoFillNormalField | `${OptionalPrefixToken}${AutoFillContactField}`; type AutoFillSection = `section-${string}`; +type Base64URLString = string; type BigInteger = Uint8Array; -type BinaryData = ArrayBuffer | ArrayBufferView; type BlobPart = BufferSource | Blob | string; type BodyInit = ReadableStream | XMLHttpRequestBodyInit; type BufferSource = ArrayBufferView | ArrayBuffer; @@ -34114,6 +35067,7 @@ type OnErrorEventHandler = OnErrorEventHandlerNonNull | null; type OptionalPostfixToken = ` ${T}` | ""; type OptionalPrefixToken = `${T} ` | ""; type PerformanceEntryList = PerformanceEntry[]; +type PublicKeyCredentialJSON = any; type RTCRtpTransform = RTCRtpScriptTransform; type ReadableStreamController = | ReadableStreamDefaultController @@ -34148,6 +35102,7 @@ type Transferable = | ReadableStream | WritableStream | TransformStream + | AudioData | VideoFrame | ArrayBuffer; type Uint32List = Uint32Array | GLuint[]; @@ -34171,6 +35126,15 @@ type AttestationConveyancePreference = | "none"; type AudioContextLatencyCategory = "balanced" | "interactive" | "playback"; type AudioContextState = "closed" | "running" | "suspended"; +type AudioSampleFormat = + | "f32" + | "f32-planar" + | "s16" + | "s16-planar" + | "s32" + | "s32-planar" + | "u8" + | "u8-planar"; type AuthenticatorAttachment = "cross-platform" | "platform"; type AuthenticatorTransport = "ble" | "hybrid" | "internal" | "nfc" | "usb"; type AutoFillAddressKind = "billing" | "shipping"; @@ -34237,6 +35201,7 @@ type BiquadFilterType = | "lowshelf" | "notch" | "peaking"; +type BitrateMode = "constant" | "variable"; type CSSMathOperator = | "clamp" | "invert" @@ -34315,6 +35280,7 @@ type DisplayCaptureSurfaceType = "browser" | "monitor" | "window"; type DistanceModelType = "exponential" | "inverse" | "linear"; type DocumentReadyState = "complete" | "interactive" | "loading"; type DocumentVisibilityState = "hidden" | "visible"; +type EncodedAudioChunkType = "delta" | "key"; type EncodedVideoChunkType = "delta" | "key"; type EndOfStreamError = "decode" | "network"; type EndingType = "native" | "transparent"; @@ -34435,6 +35401,7 @@ type OffscreenRenderingContextId = | "webgl" | "webgl2" | "webgpu"; +type OpusBitstreamFormat = "ogg" | "opus"; type OrientationType = | "landscape-primary" | "landscape-secondary" @@ -34444,13 +35411,15 @@ type OscillatorType = "custom" | "sawtooth" | "sine" | "square" | "triangle"; type OverSampleType = "2x" | "4x" | "none"; type PanningModelType = "HRTF" | "equalpower"; type PaymentComplete = "fail" | "success" | "unknown"; +type PaymentShippingType = "delivery" | "pickup" | "shipping"; type PermissionName = | "geolocation" + | "midi" | "notifications" | "persistent-storage" | "push" | "screen-wake-lock" - | "xr-spatial-tracking"; + | "storage-access"; type PermissionState = "denied" | "granted" | "prompt"; type PlaybackDirection = | "alternate" diff --git a/generated/lib.es2015.core.d.ts b/generated/lib.es2015.core.d.ts index bf441c0..93fbb62 100644 --- a/generated/lib.es2015.core.d.ts +++ b/generated/lib.es2015.core.d.ts @@ -684,63 +684,63 @@ interface StringConstructor { ): string; } -interface Int8Array { +interface Int8Array { toLocaleString( locales: string | string[], options?: Intl.NumberFormatOptions, ): string; } -interface Uint8Array { +interface Uint8Array { toLocaleString( locales: string | string[], options?: Intl.NumberFormatOptions, ): string; } -interface Uint8ClampedArray { +interface Uint8ClampedArray { toLocaleString( locales: string | string[], options?: Intl.NumberFormatOptions, ): string; } -interface Int16Array { +interface Int16Array { toLocaleString( locales: string | string[], options?: Intl.NumberFormatOptions, ): string; } -interface Uint16Array { +interface Uint16Array { toLocaleString( locales: string | string[], options?: Intl.NumberFormatOptions, ): string; } -interface Int32Array { +interface Int32Array { toLocaleString( locales: string | string[], options?: Intl.NumberFormatOptions, ): string; } -interface Uint32Array { +interface Uint32Array { toLocaleString( locales: string | string[], options?: Intl.NumberFormatOptions, ): string; } -interface Float32Array { +interface Float32Array { toLocaleString( locales: string | string[], options?: Intl.NumberFormatOptions, ): string; } -interface Float64Array { +interface Float64Array { toLocaleString( locales: string | string[], options?: Intl.NumberFormatOptions, diff --git a/generated/lib.es2015.iterable.d.ts b/generated/lib.es2015.iterable.d.ts index 4bb4a25..bdfbd5a 100644 --- a/generated/lib.es2015.iterable.d.ts +++ b/generated/lib.es2015.iterable.d.ts @@ -310,7 +310,7 @@ interface String { [Symbol.iterator](): StringIterator; } -interface Int8Array { +interface Int8Array { [Symbol.iterator](): ArrayIterator; /** * Returns an array of key, value pairs for every entry in the array @@ -327,12 +327,12 @@ interface Int8Array { } interface Int8ArrayConstructor { - new (elements: Iterable): Int8Array; + new (elements: Iterable): Int8Array; /** * Creates an array from an iterable object. * @param iterable An iterable object to convert to an array. */ - from(iterable: Iterable | ArrayLike): Int8Array; + from(iterable: Iterable | ArrayLike): Int8Array; /** * Creates an array from an iterable object. * @param iterable An iterable object to convert to an array. @@ -343,7 +343,7 @@ interface Int8ArrayConstructor { iterable: Iterable | ArrayLike, mapfn: (this: This, v: T, k: number) => number, thisArg?: This, - ): Int8Array; + ): Int8Array; } // /** // * Creates an array from an array-like or iterable object. @@ -351,9 +351,16 @@ interface Int8ArrayConstructor { // * @param mapfn A mapping function to call on every element of the array. // * @param thisArg Value of 'this' used to invoke the mapfn. // */ -// from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; +// from(arrayLike: Iterable): Int8Array; +// /** +// * Creates an array from an array-like or iterable object. +// * @param arrayLike An array-like or iterable object to convert to an array. +// * @param mapfn A mapping function to call on every element of the array. +// * @param thisArg Value of 'this' used to invoke the mapfn. +// */ +// from(arrayLike: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int8Array; -interface Uint8Array { +interface Uint8Array { [Symbol.iterator](): ArrayIterator; /** * Returns an array of key, value pairs for every entry in the array @@ -370,12 +377,12 @@ interface Uint8Array { } interface Uint8ArrayConstructor { - new (elements: Iterable): Uint8Array; + new (elements: Iterable): Uint8Array; /** * Creates an array from an iterable object. * @param iterable An iterable object to convert to an array. */ - from(iterable: Iterable | ArrayLike): Uint8Array; + from(iterable: Iterable | ArrayLike): Uint8Array; /** * Creates an array from an iterable object. * @param iterable An iterable object to convert to an array. @@ -386,7 +393,7 @@ interface Uint8ArrayConstructor { iterable: Iterable | ArrayLike, mapfn: (this: This, v: T, k: number) => number, thisArg?: This, - ): Uint8Array; + ): Uint8Array; } // /** // * Creates an array from an array-like or iterable object. @@ -394,9 +401,16 @@ interface Uint8ArrayConstructor { // * @param mapfn A mapping function to call on every element of the array. // * @param thisArg Value of 'this' used to invoke the mapfn. // */ -// from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; +// from(arrayLike: Iterable): Uint8Array; +// /** +// * Creates an array from an array-like or iterable object. +// * @param arrayLike An array-like or iterable object to convert to an array. +// * @param mapfn A mapping function to call on every element of the array. +// * @param thisArg Value of 'this' used to invoke the mapfn. +// */ +// from(arrayLike: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array; -interface Uint8ClampedArray { +interface Uint8ClampedArray { [Symbol.iterator](): ArrayIterator; /** * Returns an array of key, value pairs for every entry in the array @@ -415,12 +429,14 @@ interface Uint8ClampedArray { } interface Uint8ClampedArrayConstructor { - new (elements: Iterable): Uint8ClampedArray; + new (elements: Iterable): Uint8ClampedArray; /** * Creates an array from an iterable object. * @param iterable An iterable object to convert to an array. */ - from(iterable: Iterable | ArrayLike): Uint8ClampedArray; + from( + iterable: Iterable | ArrayLike, + ): Uint8ClampedArray; /** * Creates an array from an iterable object. * @param iterable An iterable object to convert to an array. @@ -431,7 +447,7 @@ interface Uint8ClampedArrayConstructor { iterable: Iterable | ArrayLike, mapfn: (this: This, v: T, k: number) => number, thisArg?: This, - ): Uint8ClampedArray; + ): Uint8ClampedArray; } // /** // * Creates an array from an array-like or iterable object. @@ -439,9 +455,16 @@ interface Uint8ClampedArrayConstructor { // * @param mapfn A mapping function to call on every element of the array. // * @param thisArg Value of 'this' used to invoke the mapfn. // */ -// from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; +// from(arrayLike: Iterable): Uint8ClampedArray; +// /** +// * Creates an array from an array-like or iterable object. +// * @param arrayLike An array-like or iterable object to convert to an array. +// * @param mapfn A mapping function to call on every element of the array. +// * @param thisArg Value of 'this' used to invoke the mapfn. +// */ +// from(arrayLike: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; -interface Int16Array { +interface Int16Array { [Symbol.iterator](): ArrayIterator; /** * Returns an array of key, value pairs for every entry in the array @@ -460,12 +483,12 @@ interface Int16Array { } interface Int16ArrayConstructor { - new (elements: Iterable): Int16Array; + new (elements: Iterable): Int16Array; /** * Creates an array from an iterable object. * @param iterable An iterable object to convert to an array. */ - from(iterable: Iterable | ArrayLike): Int16Array; + from(iterable: Iterable | ArrayLike): Int16Array; /** * Creates an array from an iterable object. * @param iterable An iterable object to convert to an array. @@ -476,7 +499,7 @@ interface Int16ArrayConstructor { iterable: Iterable | ArrayLike, mapfn: (this: This, v: T, k: number) => number, thisArg?: This, - ): Int16Array; + ): Int16Array; } // /** // * Creates an array from an array-like or iterable object. @@ -484,9 +507,16 @@ interface Int16ArrayConstructor { // * @param mapfn A mapping function to call on every element of the array. // * @param thisArg Value of 'this' used to invoke the mapfn. // */ -// from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; +// from(arrayLike: Iterable): Int16Array; +// /** +// * Creates an array from an array-like or iterable object. +// * @param arrayLike An array-like or iterable object to convert to an array. +// * @param mapfn A mapping function to call on every element of the array. +// * @param thisArg Value of 'this' used to invoke the mapfn. +// */ +// from(arrayLike: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int16Array; -interface Uint16Array { +interface Uint16Array { [Symbol.iterator](): ArrayIterator; /** * Returns an array of key, value pairs for every entry in the array @@ -503,12 +533,14 @@ interface Uint16Array { } interface Uint16ArrayConstructor { - new (elements: Iterable): Uint16Array; + new (elements: Iterable): Uint16Array; /** * Creates an array from an iterable object. * @param iterable An iterable object to convert to an array. */ - from(iterable: Iterable | ArrayLike): Uint16Array; + from( + iterable: Iterable | ArrayLike, + ): Uint16Array; /** * Creates an array from an iterable object. * @param iterable An iterable object to convert to an array. @@ -519,7 +551,7 @@ interface Uint16ArrayConstructor { iterable: Iterable | ArrayLike, mapfn: (this: This, v: T, k: number) => number, thisArg?: This, - ): Uint16Array; + ): Uint16Array; } // /** // * Creates an array from an array-like or iterable object. @@ -527,9 +559,16 @@ interface Uint16ArrayConstructor { // * @param mapfn A mapping function to call on every element of the array. // * @param thisArg Value of 'this' used to invoke the mapfn. // */ -// from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; +// from(arrayLike: Iterable): Uint16Array; +// /** +// * Creates an array from an array-like or iterable object. +// * @param arrayLike An array-like or iterable object to convert to an array. +// * @param mapfn A mapping function to call on every element of the array. +// * @param thisArg Value of 'this' used to invoke the mapfn. +// */ +// from(arrayLike: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint16Array; -interface Int32Array { +interface Int32Array { [Symbol.iterator](): ArrayIterator; /** * Returns an array of key, value pairs for every entry in the array @@ -546,12 +585,12 @@ interface Int32Array { } interface Int32ArrayConstructor { - new (elements: Iterable): Int32Array; + new (elements: Iterable): Int32Array; /** * Creates an array from an iterable object. * @param iterable An iterable object to convert to an array. */ - from(iterable: Iterable | ArrayLike): Int32Array; + from(iterable: Iterable | ArrayLike): Int32Array; /** * Creates an array from an iterable object. * @param iterable An iterable object to convert to an array. @@ -562,7 +601,7 @@ interface Int32ArrayConstructor { iterable: Iterable | ArrayLike, mapfn: (this: This, v: T, k: number) => number, thisArg?: This, - ): Int32Array; + ): Int32Array; } // /** // * Creates an array from an array-like or iterable object. @@ -570,9 +609,16 @@ interface Int32ArrayConstructor { // * @param mapfn A mapping function to call on every element of the array. // * @param thisArg Value of 'this' used to invoke the mapfn. // */ -// from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; +// from(arrayLike: Iterable): Int32Array; +// /** +// * Creates an array from an array-like or iterable object. +// * @param arrayLike An array-like or iterable object to convert to an array. +// * @param mapfn A mapping function to call on every element of the array. +// * @param thisArg Value of 'this' used to invoke the mapfn. +// */ +// from(arrayLike: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Int32Array; -interface Uint32Array { +interface Uint32Array { [Symbol.iterator](): ArrayIterator; /** * Returns an array of key, value pairs for every entry in the array @@ -589,12 +635,14 @@ interface Uint32Array { } interface Uint32ArrayConstructor { - new (elements: Iterable): Uint32Array; + new (elements: Iterable): Uint32Array; /** * Creates an array from an iterable object. * @param iterable An iterable object to convert to an array. */ - from(iterable: Iterable | ArrayLike): Uint32Array; + from( + iterable: Iterable | ArrayLike, + ): Uint32Array; /** * Creates an array from an iterable object. * @param iterable An iterable object to convert to an array. @@ -605,7 +653,7 @@ interface Uint32ArrayConstructor { iterable: Iterable | ArrayLike, mapfn: (this: This, v: T, k: number) => number, thisArg?: This, - ): Uint32Array; + ): Uint32Array; } // /** // * Creates an array from an array-like or iterable object. @@ -613,9 +661,16 @@ interface Uint32ArrayConstructor { // * @param mapfn A mapping function to call on every element of the array. // * @param thisArg Value of 'this' used to invoke the mapfn. // */ -// from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; +// from(arrayLike: Iterable): Uint32Array; +// /** +// * Creates an array from an array-like or iterable object. +// * @param arrayLike An array-like or iterable object to convert to an array. +// * @param mapfn A mapping function to call on every element of the array. +// * @param thisArg Value of 'this' used to invoke the mapfn. +// */ +// from(arrayLike: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint32Array; -interface Float32Array { +interface Float32Array { [Symbol.iterator](): ArrayIterator; /** * Returns an array of key, value pairs for every entry in the array @@ -632,12 +687,14 @@ interface Float32Array { } interface Float32ArrayConstructor { - new (elements: Iterable): Float32Array; + new (elements: Iterable): Float32Array; /** * Creates an array from an iterable object. * @param iterable An iterable object to convert to an array. */ - from(iterable: Iterable | ArrayLike): Float32Array; + from( + iterable: Iterable | ArrayLike, + ): Float32Array; /** * Creates an array from an iterable object. * @param iterable An iterable object to convert to an array. @@ -648,7 +705,7 @@ interface Float32ArrayConstructor { iterable: Iterable | ArrayLike, mapfn: (this: This, v: T, k: number) => number, thisArg?: This, - ): Float32Array; + ): Float32Array; } // /** // * Creates an array from an array-like or iterable object. @@ -656,9 +713,16 @@ interface Float32ArrayConstructor { // * @param mapfn A mapping function to call on every element of the array. // * @param thisArg Value of 'this' used to invoke the mapfn. // */ -// from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; +// from(arrayLike: Iterable): Float32Array; +// /** +// * Creates an array from an array-like or iterable object. +// * @param arrayLike An array-like or iterable object to convert to an array. +// * @param mapfn A mapping function to call on every element of the array. +// * @param thisArg Value of 'this' used to invoke the mapfn. +// */ +// from(arrayLike: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float32Array; -interface Float64Array { +interface Float64Array { [Symbol.iterator](): ArrayIterator; /** * Returns an array of key, value pairs for every entry in the array @@ -675,12 +739,14 @@ interface Float64Array { } interface Float64ArrayConstructor { - new (elements: Iterable): Float64Array; + new (elements: Iterable): Float64Array; /** * Creates an array from an iterable object. * @param iterable An iterable object to convert to an array. */ - from(iterable: Iterable | ArrayLike): Float64Array; + from( + iterable: Iterable | ArrayLike, + ): Float64Array; /** * Creates an array from an iterable object. * @param iterable An iterable object to convert to an array. @@ -691,7 +757,7 @@ interface Float64ArrayConstructor { iterable: Iterable | ArrayLike, mapfn: (this: This, v: T, k: number) => number, thisArg?: This, - ): Float64Array; + ): Float64Array; } // /** // * Creates an array from an array-like or iterable object. @@ -699,4 +765,11 @@ interface Float64ArrayConstructor { // * @param mapfn A mapping function to call on every element of the array. // * @param thisArg Value of 'this' used to invoke the mapfn. // */ -// from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; +// from(arrayLike: Iterable): Float64Array; +// /** +// * Creates an array from an array-like or iterable object. +// * @param arrayLike An array-like or iterable object to convert to an array. +// * @param mapfn A mapping function to call on every element of the array. +// * @param thisArg Value of 'this' used to invoke the mapfn. +// */ +// from(arrayLike: Iterable, mapfn?: (v: T, k: number) => number, thisArg?: any): Float64Array; diff --git a/generated/lib.es2015.symbol.wellknown.d.ts b/generated/lib.es2015.symbol.wellknown.d.ts index 37b398e..f702b16 100644 --- a/generated/lib.es2015.symbol.wellknown.d.ts +++ b/generated/lib.es2015.symbol.wellknown.d.ts @@ -306,43 +306,43 @@ interface ArrayBuffer { readonly [Symbol.toStringTag]: string; } -interface DataView { +interface DataView { readonly [Symbol.toStringTag]: string; } -interface Int8Array { +interface Int8Array { readonly [Symbol.toStringTag]: "Int8Array"; } -interface Uint8Array { +interface Uint8Array { readonly [Symbol.toStringTag]: "Uint8Array"; } -interface Uint8ClampedArray { +interface Uint8ClampedArray { readonly [Symbol.toStringTag]: "Uint8ClampedArray"; } -interface Int16Array { +interface Int16Array { readonly [Symbol.toStringTag]: "Int16Array"; } -interface Uint16Array { +interface Uint16Array { readonly [Symbol.toStringTag]: "Uint16Array"; } -interface Int32Array { +interface Int32Array { readonly [Symbol.toStringTag]: "Int32Array"; } -interface Uint32Array { +interface Uint32Array { readonly [Symbol.toStringTag]: "Uint32Array"; } -interface Float32Array { +interface Float32Array { readonly [Symbol.toStringTag]: "Float32Array"; } -interface Float64Array { +interface Float64Array { readonly [Symbol.toStringTag]: "Float64Array"; } diff --git a/generated/lib.es2016.array.include.d.ts b/generated/lib.es2016.array.include.d.ts index 2ab27a0..527186f 100644 --- a/generated/lib.es2016.array.include.d.ts +++ b/generated/lib.es2016.array.include.d.ts @@ -17,7 +17,7 @@ interface ReadonlyArray { includes(searchElement: T, fromIndex?: number): boolean; } -interface Int8Array { +interface Int8Array { /** * Determines whether an array includes a certain element, returning true or false as appropriate. * @param searchElement The element to search for. @@ -26,7 +26,7 @@ interface Int8Array { includes(searchElement: number, fromIndex?: number): boolean; } -interface Uint8Array { +interface Uint8Array { /** * Determines whether an array includes a certain element, returning true or false as appropriate. * @param searchElement The element to search for. @@ -35,7 +35,7 @@ interface Uint8Array { includes(searchElement: number, fromIndex?: number): boolean; } -interface Uint8ClampedArray { +interface Uint8ClampedArray { /** * Determines whether an array includes a certain element, returning true or false as appropriate. * @param searchElement The element to search for. @@ -44,7 +44,7 @@ interface Uint8ClampedArray { includes(searchElement: number, fromIndex?: number): boolean; } -interface Int16Array { +interface Int16Array { /** * Determines whether an array includes a certain element, returning true or false as appropriate. * @param searchElement The element to search for. @@ -53,7 +53,7 @@ interface Int16Array { includes(searchElement: number, fromIndex?: number): boolean; } -interface Uint16Array { +interface Uint16Array { /** * Determines whether an array includes a certain element, returning true or false as appropriate. * @param searchElement The element to search for. @@ -62,7 +62,7 @@ interface Uint16Array { includes(searchElement: number, fromIndex?: number): boolean; } -interface Int32Array { +interface Int32Array { /** * Determines whether an array includes a certain element, returning true or false as appropriate. * @param searchElement The element to search for. @@ -71,7 +71,7 @@ interface Int32Array { includes(searchElement: number, fromIndex?: number): boolean; } -interface Uint32Array { +interface Uint32Array { /** * Determines whether an array includes a certain element, returning true or false as appropriate. * @param searchElement The element to search for. @@ -80,7 +80,7 @@ interface Uint32Array { includes(searchElement: number, fromIndex?: number): boolean; } -interface Float32Array { +interface Float32Array { /** * Determines whether an array includes a certain element, returning true or false as appropriate. * @param searchElement The element to search for. @@ -89,7 +89,7 @@ interface Float32Array { includes(searchElement: number, fromIndex?: number): boolean; } -interface Float64Array { +interface Float64Array { /** * Determines whether an array includes a certain element, returning true or false as appropriate. * @param searchElement The element to search for. diff --git a/generated/lib.es2016.intl.d.ts b/generated/lib.es2016.intl.d.ts index c6f4b5e..819fa3b 100644 --- a/generated/lib.es2016.intl.d.ts +++ b/generated/lib.es2016.intl.d.ts @@ -5,7 +5,7 @@ declare namespace Intl { * the canonical locale names. Duplicates will be omitted and elements * will be validated as structurally valid language tags. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales) + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales) * * @param locale A list of String values for which to get the canonical locale names * @returns An array containing the canonical and validated locale names. diff --git a/generated/lib.es2017.arraybuffer.d.ts b/generated/lib.es2017.arraybuffer.d.ts new file mode 100644 index 0000000..2d75e50 --- /dev/null +++ b/generated/lib.es2017.arraybuffer.d.ts @@ -0,0 +1,4 @@ +/// +interface ArrayBufferConstructor { + new (): ArrayBuffer; +} diff --git a/generated/lib.es2017.d.ts b/generated/lib.es2017.d.ts index e2c4ddc..fcbb841 100644 --- a/generated/lib.es2017.d.ts +++ b/generated/lib.es2017.d.ts @@ -1,8 +1,9 @@ /// /// +/// +/// +/// /// /// /// -/// /// -/// diff --git a/generated/lib.es2017.sharedmemory.d.ts b/generated/lib.es2017.sharedmemory.d.ts index da2508d..4a2b009 100644 --- a/generated/lib.es2017.sharedmemory.d.ts +++ b/generated/lib.es2017.sharedmemory.d.ts @@ -11,14 +11,14 @@ interface SharedArrayBuffer { /** * Returns a section of an SharedArrayBuffer. */ - slice(begin: number, end?: number): SharedArrayBuffer; + slice(begin?: number, end?: number): SharedArrayBuffer; readonly [Symbol.species]: SharedArrayBuffer; readonly [Symbol.toStringTag]: "SharedArrayBuffer"; } interface SharedArrayBufferConstructor { readonly prototype: SharedArrayBuffer; - new (byteLength: number): SharedArrayBuffer; + new (byteLength?: number): SharedArrayBuffer; } declare var SharedArrayBuffer: SharedArrayBufferConstructor; @@ -34,12 +34,12 @@ interface Atomics { */ add( typedArray: - | Int8Array - | Uint8Array - | Int16Array - | Uint16Array - | Int32Array - | Uint32Array, + | Int8Array + | Uint8Array + | Int16Array + | Uint16Array + | Int32Array + | Uint32Array, index: number, value: number, ): number; @@ -51,12 +51,12 @@ interface Atomics { */ and( typedArray: - | Int8Array - | Uint8Array - | Int16Array - | Uint16Array - | Int32Array - | Uint32Array, + | Int8Array + | Uint8Array + | Int16Array + | Uint16Array + | Int32Array + | Uint32Array, index: number, value: number, ): number; @@ -68,12 +68,12 @@ interface Atomics { */ compareExchange( typedArray: - | Int8Array - | Uint8Array - | Int16Array - | Uint16Array - | Int32Array - | Uint32Array, + | Int8Array + | Uint8Array + | Int16Array + | Uint16Array + | Int32Array + | Uint32Array, index: number, expectedValue: number, replacementValue: number, @@ -86,12 +86,12 @@ interface Atomics { */ exchange( typedArray: - | Int8Array - | Uint8Array - | Int16Array - | Uint16Array - | Int32Array - | Uint32Array, + | Int8Array + | Uint8Array + | Int16Array + | Uint16Array + | Int32Array + | Uint32Array, index: number, value: number, ): number; @@ -109,12 +109,12 @@ interface Atomics { */ load( typedArray: - | Int8Array - | Uint8Array - | Int16Array - | Uint16Array - | Int32Array - | Uint32Array, + | Int8Array + | Uint8Array + | Int16Array + | Uint16Array + | Int32Array + | Uint32Array, index: number, ): number; @@ -125,12 +125,12 @@ interface Atomics { */ or( typedArray: - | Int8Array - | Uint8Array - | Int16Array - | Uint16Array - | Int32Array - | Uint32Array, + | Int8Array + | Uint8Array + | Int16Array + | Uint16Array + | Int32Array + | Uint32Array, index: number, value: number, ): number; @@ -141,12 +141,12 @@ interface Atomics { */ store( typedArray: - | Int8Array - | Uint8Array - | Int16Array - | Uint16Array - | Int32Array - | Uint32Array, + | Int8Array + | Uint8Array + | Int16Array + | Uint16Array + | Int32Array + | Uint32Array, index: number, value: number, ): number; @@ -158,12 +158,12 @@ interface Atomics { */ sub( typedArray: - | Int8Array - | Uint8Array - | Int16Array - | Uint16Array - | Int32Array - | Uint32Array, + | Int8Array + | Uint8Array + | Int16Array + | Uint16Array + | Int32Array + | Uint32Array, index: number, value: number, ): number; @@ -175,7 +175,7 @@ interface Atomics { * `"not-equal"`. */ wait( - typedArray: Int32Array, + typedArray: Int32Array, index: number, value: number, timeout?: number, @@ -184,11 +184,15 @@ interface Atomics { /** * Wakes up sleeping agents that are waiting on the given index of the array, returning the * number of agents that were awoken. - * @param typedArray A shared Int32Array. + * @param typedArray A shared Int32Array. * @param index The position in the typedArray to wake up on. * @param count The number of sleeping agents to notify. Defaults to +Infinity. */ - notify(typedArray: Int32Array, index: number, count?: number): number; + notify( + typedArray: Int32Array, + index: number, + count?: number, + ): number; /** * Stores the bitwise XOR of a value with the value at the given position in the array, @@ -197,12 +201,12 @@ interface Atomics { */ xor( typedArray: - | Int8Array - | Uint8Array - | Int16Array - | Uint16Array - | Int32Array - | Uint32Array, + | Int8Array + | Uint8Array + | Int16Array + | Uint16Array + | Int32Array + | Uint32Array, index: number, value: number, ): number; diff --git a/generated/lib.es2017.typedarrays.d.ts b/generated/lib.es2017.typedarrays.d.ts index 9df3c7f..6769ef5 100644 --- a/generated/lib.es2017.typedarrays.d.ts +++ b/generated/lib.es2017.typedarrays.d.ts @@ -1,36 +1,36 @@ /// interface Int8ArrayConstructor { - new (): Int8Array; + new (): Int8Array; } interface Uint8ArrayConstructor { - new (): Uint8Array; + new (): Uint8Array; } interface Uint8ClampedArrayConstructor { - new (): Uint8ClampedArray; + new (): Uint8ClampedArray; } interface Int16ArrayConstructor { - new (): Int16Array; + new (): Int16Array; } interface Uint16ArrayConstructor { - new (): Uint16Array; + new (): Uint16Array; } interface Int32ArrayConstructor { - new (): Int32Array; + new (): Int32Array; } interface Uint32ArrayConstructor { - new (): Uint32Array; + new (): Uint32Array; } interface Float32ArrayConstructor { - new (): Float32Array; + new (): Float32Array; } interface Float64ArrayConstructor { - new (): Float64Array; + new (): Float64Array; } diff --git a/generated/lib.es2020.bigint.d.ts b/generated/lib.es2020.bigint.d.ts index b249568..e70733e 100644 --- a/generated/lib.es2020.bigint.d.ts +++ b/generated/lib.es2020.bigint.d.ts @@ -3,7 +3,7 @@ interface BigIntToLocaleStringOptions { /** - * The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation Intl page}. + * The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation Intl page}. */ localeMatcher?: string; /** @@ -237,12 +237,14 @@ declare var BigInt: BigIntConstructor; * A typed array of 64-bit signed integer values. The contents are initialized to 0. If the * requested number of bytes could not be allocated, an exception is raised. */ -interface BigInt64Array { +interface BigInt64Array< + TArrayBuffer extends ArrayBufferLike = ArrayBufferLike, +> { /** The size in bytes of each element in the array. */ readonly BYTES_PER_ELEMENT: number; /** The ArrayBuffer instance referenced by the array. */ - readonly buffer: ArrayBufferLike; + readonly buffer: TArrayBuffer; /** The length in bytes of the array. */ readonly byteLength: number; @@ -490,7 +492,7 @@ interface BigInt64Array { * @param start The beginning of the specified portion of the array. * @param end The end of the specified portion of the array. */ - slice(start?: number, end?: number): BigInt64Array; + slice(start?: number, end?: number): BigInt64Array; /** * Determines whether the specified callback function returns true for any element of an array. * @param predicate A function that accepts up to three arguments. The some method calls the @@ -521,7 +523,7 @@ interface BigInt64Array { * @param begin The index of the beginning of the array. * @param end The index of the end of the array. */ - subarray(begin?: number, end?: number): BigInt64Array; + subarray(begin?: number, end?: number): BigInt64Array; /** Converts the array to a string by using the current locale. */ toLocaleString( @@ -533,7 +535,7 @@ interface BigInt64Array { toString(): string; /** Returns the primitive value of the specified object. */ - valueOf(): BigInt64Array; + valueOf(): BigInt64Array; /** Yields each value in the array. */ values(): ArrayIterator; @@ -552,7 +554,7 @@ interface BigInt64Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// every(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; +// every(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; // /** // * Returns the elements of an array that meet the condition specified in a callback function. // * @param predicate A function that accepts up to three arguments. The filter method calls @@ -560,7 +562,7 @@ interface BigInt64Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// filter(predicate: (value: bigint, index: number, array: BigInt64Array) => any, thisArg?: any): BigInt64Array; +// filter(predicate: (value: bigint, index: number, array: BigInt64Array) => any, thisArg?: any): BigInt64Array; // /** // * Returns the value of the first element in the array where predicate is true, and undefined // * otherwise. @@ -570,7 +572,7 @@ interface BigInt64Array { // * @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. // */ -// find(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): bigint | undefined; +// find(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): bigint | undefined; // /** // * Returns the index of the first element in the array where predicate is true, and -1 // * otherwise. @@ -580,7 +582,7 @@ interface BigInt64Array { // * @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. // */ -// findIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): number; +// findIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): number; // /** // * Performs the specified action for each element in an array. // * @param callbackfn A function that accepts up to three arguments. forEach calls the @@ -588,7 +590,7 @@ interface BigInt64Array { // * @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. // */ -// forEach(callbackfn: (value: bigint, index: number, array: BigInt64Array) => void, thisArg?: any): void; +// forEach(callbackfn: (value: bigint, index: number, array: BigInt64Array) => void, thisArg?: any): void; // /** // * Calls a defined callback function on each element of an array, and returns an array that // * contains the results. @@ -597,7 +599,7 @@ interface BigInt64Array { // * @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. // */ -// map(callbackfn: (value: bigint, index: number, array: BigInt64Array) => bigint, thisArg?: any): BigInt64Array; +// map(callbackfn: (value: bigint, index: number, array: BigInt64Array) => bigint, thisArg?: any): BigInt64Array; // /** // * 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 @@ -608,7 +610,7 @@ interface BigInt64Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; +// reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; // /** // * 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 @@ -619,7 +621,7 @@ interface BigInt64Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; +// reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; // /** // * 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 @@ -630,7 +632,7 @@ interface BigInt64Array { // * the accumulation. The first call to the callbackfn function provides this value as an // * argument instead of an array value. // */ -// reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; +// reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; // /** // * 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 @@ -641,7 +643,7 @@ interface BigInt64Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; +// reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; // /** // * Determines whether the specified callback function returns true for any element of an array. // * @param predicate A function that accepts up to three arguments. The some method calls the @@ -650,17 +652,18 @@ interface BigInt64Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// some(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; +// some(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; interface BigInt64ArrayConstructor { - readonly prototype: BigInt64Array; - new (length?: number): BigInt64Array; - new (array: Iterable): BigInt64Array; - new ( - buffer: ArrayBufferLike, + readonly prototype: BigInt64Array; + new (length?: number): BigInt64Array; + new (array: ArrayLike | Iterable): BigInt64Array; + new ( + buffer: TArrayBuffer, byteOffset?: number, length?: number, - ): BigInt64Array; + ): BigInt64Array; + new (array: ArrayLike | ArrayBuffer): BigInt64Array; /** The size in bytes of each element in the array. */ readonly BYTES_PER_ELEMENT: number; @@ -669,12 +672,14 @@ interface BigInt64ArrayConstructor { * Returns a new array from a set of elements. * @param items A set of elements to include in the new array object. */ - of(...items: bigint[]): BigInt64Array; + of(...items: bigint[]): BigInt64Array; /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. */ - from(arrayLike: Iterable | ArrayLike): BigInt64Array; + from( + arrayLike: Iterable | ArrayLike, + ): BigInt64Array; /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. @@ -685,7 +690,7 @@ interface BigInt64ArrayConstructor { arrayLike: Iterable | ArrayLike, mapfn: (this: This, v: T, k: number) => bigint, thisArg?: This, - ): BigInt64Array; + ): BigInt64Array; } // /** // * Creates an array from an array-like or iterable object. @@ -693,8 +698,14 @@ interface BigInt64ArrayConstructor { // * @param mapfn A mapping function to call on every element of the array. // * @param thisArg Value of 'this' used to invoke the mapfn. // */ -// from(arrayLike: ArrayLike): BigInt64Array; -// from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array; +// from(arrayLike: ArrayLike): BigInt64Array; +// /** +// * Creates an array from an array-like or iterable object. +// * @param arrayLike An array-like or iterable object to convert to an array. +// * @param mapfn A mapping function to call on every element of the array. +// * @param thisArg Value of 'this' used to invoke the mapfn. +// */ +// from(arrayLike: ArrayLike, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array; declare var BigInt64Array: BigInt64ArrayConstructor; @@ -702,12 +713,14 @@ declare var BigInt64Array: BigInt64ArrayConstructor; * A typed array of 64-bit unsigned integer values. The contents are initialized to 0. If the * requested number of bytes could not be allocated, an exception is raised. */ -interface BigUint64Array { +interface BigUint64Array< + TArrayBuffer extends ArrayBufferLike = ArrayBufferLike, +> { /** The size in bytes of each element in the array. */ readonly BYTES_PER_ELEMENT: number; /** The ArrayBuffer instance referenced by the array. */ - readonly buffer: ArrayBufferLike; + readonly buffer: TArrayBuffer; /** The length in bytes of the array. */ readonly byteLength: number; @@ -955,7 +968,7 @@ interface BigUint64Array { * @param start The beginning of the specified portion of the array. * @param end The end of the specified portion of the array. */ - slice(start?: number, end?: number): BigUint64Array; + slice(start?: number, end?: number): BigUint64Array; /** * Determines whether the specified callback function returns true for any element of an array. * @param predicate A function that accepts up to three arguments. The some method calls the @@ -986,7 +999,7 @@ interface BigUint64Array { * @param begin The index of the beginning of the array. * @param end The index of the end of the array. */ - subarray(begin?: number, end?: number): BigUint64Array; + subarray(begin?: number, end?: number): BigUint64Array; /** Converts the array to a string by using the current locale. */ toLocaleString( @@ -998,7 +1011,7 @@ interface BigUint64Array { toString(): string; /** Returns the primitive value of the specified object. */ - valueOf(): BigUint64Array; + valueOf(): BigUint64Array; /** Yields each value in the array. */ values(): ArrayIterator; @@ -1017,7 +1030,7 @@ interface BigUint64Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// every(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; +// every(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; // /** // * Returns the elements of an array that meet the condition specified in a callback function. // * @param predicate A function that accepts up to three arguments. The filter method calls @@ -1025,7 +1038,7 @@ interface BigUint64Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// filter(predicate: (value: bigint, index: number, array: BigUint64Array) => any, thisArg?: any): BigUint64Array; +// filter(predicate: (value: bigint, index: number, array: BigUint64Array) => any, thisArg?: any): BigUint64Array; // /** // * Returns the value of the first element in the array where predicate is true, and undefined // * otherwise. @@ -1035,7 +1048,7 @@ interface BigUint64Array { // * @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. // */ -// find(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): bigint | undefined; +// find(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): bigint | undefined; // /** // * Returns the index of the first element in the array where predicate is true, and -1 // * otherwise. @@ -1045,7 +1058,7 @@ interface BigUint64Array { // * @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. // */ -// findIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): number; +// findIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): number; // /** // * Performs the specified action for each element in an array. // * @param callbackfn A function that accepts up to three arguments. forEach calls the @@ -1053,7 +1066,7 @@ interface BigUint64Array { // * @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. // */ -// forEach(callbackfn: (value: bigint, index: number, array: BigUint64Array) => void, thisArg?: any): void; +// forEach(callbackfn: (value: bigint, index: number, array: BigUint64Array) => void, thisArg?: any): void; // /** // * Calls a defined callback function on each element of an array, and returns an array that // * contains the results. @@ -1062,7 +1075,7 @@ interface BigUint64Array { // * @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. // */ -// map(callbackfn: (value: bigint, index: number, array: BigUint64Array) => bigint, thisArg?: any): BigUint64Array; +// map(callbackfn: (value: bigint, index: number, array: BigUint64Array) => bigint, thisArg?: any): BigUint64Array; // /** // * 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 @@ -1073,7 +1086,7 @@ interface BigUint64Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; +// reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; // /** // * 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 @@ -1084,7 +1097,7 @@ interface BigUint64Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; +// reduce(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; // /** // * 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 @@ -1095,7 +1108,7 @@ interface BigUint64Array { // * the accumulation. The first call to the callbackfn function provides this value as an // * argument instead of an array value. // */ -// reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; +// reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; // /** // * 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 @@ -1106,7 +1119,7 @@ interface BigUint64Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; +// reduceRight(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; // /** // * Determines whether the specified callback function returns true for any element of an array. // * @param predicate A function that accepts up to three arguments. The some method calls the @@ -1115,17 +1128,20 @@ interface BigUint64Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// some(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; +// some(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; interface BigUint64ArrayConstructor { - readonly prototype: BigUint64Array; - new (length?: number): BigUint64Array; - new (array: Iterable): BigUint64Array; + readonly prototype: BigUint64Array; + new (length?: number): BigUint64Array; new ( - buffer: ArrayBufferLike, + array: ArrayLike | Iterable, + ): BigUint64Array; + new ( + buffer: TArrayBuffer, byteOffset?: number, length?: number, - ): BigUint64Array; + ): BigUint64Array; + new (array: ArrayLike | ArrayBuffer): BigUint64Array; /** The size in bytes of each element in the array. */ readonly BYTES_PER_ELEMENT: number; @@ -1134,12 +1150,14 @@ interface BigUint64ArrayConstructor { * Returns a new array from a set of elements. * @param items A set of elements to include in the new array object. */ - of(...items: bigint[]): BigUint64Array; + of(...items: bigint[]): BigUint64Array; /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. */ - from(arrayLike: Iterable | ArrayLike): BigUint64Array; + from( + arrayLike: Iterable | ArrayLike, + ): BigUint64Array; /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. @@ -1150,7 +1168,7 @@ interface BigUint64ArrayConstructor { arrayLike: Iterable | ArrayLike, mapfn: (this: This, v: T, k: number) => bigint, thisArg?: This, - ): BigUint64Array; + ): BigUint64Array; } // /** // * Creates an array from an array-like or iterable object. @@ -1163,7 +1181,7 @@ interface BigUint64ArrayConstructor { declare var BigUint64Array: BigUint64ArrayConstructor; -interface DataView { +interface DataView { /** * Gets the BigInt64 value at the specified byte offset from the start of the view. There is * no alignment constraint; multi-byte values may be fetched from any offset. diff --git a/generated/lib.es2020.intl.d.ts b/generated/lib.es2020.intl.d.ts index 8c8e791..86eee76 100644 --- a/generated/lib.es2020.intl.d.ts +++ b/generated/lib.es2020.intl.d.ts @@ -6,14 +6,14 @@ declare namespace Intl { * * For example: "fa", "es-MX", "zh-Hant-TW". * - * See [MDN - Intl - locales argument](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). */ type UnicodeBCP47LocaleIdentifier = string; /** * Unit to use in the relative time internationalized message. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format#Parameters). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format#Parameters). */ type RelativeTimeFormatUnit = | "year" @@ -40,7 +40,7 @@ declare namespace Intl { * but `formatToParts` only outputs singular (e.g. "day") not plural (e.g. * "days"). * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). */ type RelativeTimeFormatUnitSingular = | "year" @@ -62,21 +62,21 @@ declare namespace Intl { /** * The format of output message. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). */ type RelativeTimeFormatNumeric = "always" | "auto"; /** * The length of the internationalized message. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). */ type RelativeTimeFormatStyle = "long" | "short" | "narrow"; /** * The locale or locales to use * - * See [MDN - Intl - locales argument](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). + * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument). */ type LocalesArgument = | UnicodeBCP47LocaleIdentifier @@ -88,7 +88,7 @@ declare namespace Intl { * An object with some or all of properties of `options` parameter * of `Intl.RelativeTimeFormat` constructor. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters). */ interface RelativeTimeFormatOptions { /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ @@ -104,7 +104,7 @@ declare namespace Intl { * and formatting options computed during initialization * of the `Intl.RelativeTimeFormat` object * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions#Description). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions#Description). */ interface ResolvedRelativeTimeFormatOptions { locale: UnicodeBCP47LocaleIdentifier; @@ -117,7 +117,7 @@ declare namespace Intl { * An object representing the relative time format in parts * that can be used for custom locale-aware formatting. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts). */ type RelativeTimeFormatPart = | { @@ -153,7 +153,7 @@ declare namespace Intl { * * @returns {string} Internationalized relative time message as string * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format). */ format(value: number, unit: RelativeTimeFormatUnit): string; @@ -166,7 +166,7 @@ declare namespace Intl { * * @throws `RangeError` if `unit` was given something other than `unit` possible values * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts). */ formatToParts( value: number, @@ -176,7 +176,7 @@ declare namespace Intl { /** * Provides access to the locale and options computed during initialization of this `Intl.RelativeTimeFormat` object. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions). */ resolvedOptions(): ResolvedRelativeTimeFormatOptions; } @@ -185,22 +185,22 @@ declare namespace Intl { * The [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) * object is a constructor for objects that enable language-sensitive relative time formatting. * - * [Compatibility](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat#Browser_compatibility). + * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat#Browser_compatibility). */ const RelativeTimeFormat: { /** - * Creates [Intl.RelativeTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) objects + * Creates [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) objects * * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. * For the general form and interpretation of the locales argument, - * see the [`Intl` page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). * - * @param options - An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) * with some or all of options of `RelativeTimeFormatOptions`. * - * @returns [Intl.RelativeTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) object. + * @returns [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) object. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat). */ new ( locales?: LocalesArgument, @@ -214,16 +214,16 @@ declare namespace Intl { * * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. * For the general form and interpretation of the locales argument, - * see the [`Intl` page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). * - * @param options - An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters) * with some or all of options of the formatting. * * @returns An array containing those of the provided locales * that are supported in date and time formatting * without having to fall back to the runtime's default locale. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/supportedLocalesOf). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/supportedLocalesOf). */ supportedLocalesOf( locales?: LocalesArgument, @@ -332,18 +332,18 @@ declare namespace Intl { } /** - * Constructor creates [Intl.Locale](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) + * Constructor creates [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) * objects * * @param tag - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646). * For the general form and interpretation of the locales argument, - * see the [`Intl` page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). * - * @param options - An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/Locale#Parameters) with some or all of options of the locale. + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/Locale#Parameters) with some or all of options of the locale. * - * @returns [Intl.Locale](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) object. + * @returns [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) object. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale). */ const Locale: { new ( @@ -383,7 +383,7 @@ declare namespace Intl { interface DisplayNames { /** * Receives a code and returns a string based on the locale and options provided when instantiating - * [`Intl.DisplayNames()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) + * [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) * * @param code The `code` to provide depends on the `type` passed to display name during creation: * - If the type is `"region"`, code should be either an [ISO-3166 two letters region code](https://www.iso.org/iso-3166-country-codes.html), @@ -394,35 +394,35 @@ declare namespace Intl { * `languageCode` is either a two letters ISO 639-1 language code or a three letters ISO 639-2 language code. * - If the type is `"currency"`, code should be a [3-letter ISO 4217 currency code](https://www.iso.org/iso-4217-currency-codes.html). * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/of). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/of). */ of(code: string): string | undefined; /** * Returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current - * [`Intl/DisplayNames`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) object. + * [`Intl/DisplayNames`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) object. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/resolvedOptions). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/resolvedOptions). */ resolvedOptions(): ResolvedDisplayNamesOptions; } /** - * The [`Intl.DisplayNames()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) + * The [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) * object enables the consistent translation of language, region and script display names. * - * [Compatibility](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames#browser_compatibility). + * [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames#browser_compatibility). */ const DisplayNames: { prototype: DisplayNames; /** * @param locales A string with a BCP 47 language tag, or an array of such strings. - * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) + * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) * page. * * @param options An object for setting up a display name. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames). */ new (locales: LocalesArgument, options: DisplayNamesOptions): DisplayNames; @@ -430,14 +430,14 @@ declare namespace Intl { * Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale. * * @param locales A string with a BCP 47 language tag, or an array of such strings. - * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) + * For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation) * page. * * @param options An object with a locale matcher. * * @returns An array of strings representing a subset of the given locale tags that are supported in display names without having to fall back to the runtime's default locale. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf). */ supportedLocalesOf( locales?: LocalesArgument, diff --git a/generated/lib.es2020.sharedmemory.d.ts b/generated/lib.es2020.sharedmemory.d.ts index cfa1056..d1e6bc5 100644 --- a/generated/lib.es2020.sharedmemory.d.ts +++ b/generated/lib.es2020.sharedmemory.d.ts @@ -1,4 +1,6 @@ /// +/// + interface Atomics { /** * Adds a value to the value at the given position in the array, returning the original value. @@ -6,7 +8,9 @@ interface Atomics { * will block. */ add( - typedArray: BigInt64Array | BigUint64Array, + typedArray: + | BigInt64Array + | BigUint64Array, index: number, value: bigint, ): bigint; @@ -17,7 +21,9 @@ interface Atomics { * write operation against the array will block. */ and( - typedArray: BigInt64Array | BigUint64Array, + typedArray: + | BigInt64Array + | BigUint64Array, index: number, value: bigint, ): bigint; @@ -28,7 +34,9 @@ interface Atomics { * other read or write operation against the array will block. */ compareExchange( - typedArray: BigInt64Array | BigUint64Array, + typedArray: + | BigInt64Array + | BigUint64Array, index: number, expectedValue: bigint, replacementValue: bigint, @@ -40,7 +48,9 @@ interface Atomics { * block. */ exchange( - typedArray: BigInt64Array | BigUint64Array, + typedArray: + | BigInt64Array + | BigUint64Array, index: number, value: bigint, ): bigint; @@ -49,7 +59,12 @@ interface Atomics { * Returns the value at the given position in the array. Until this atomic operation completes, * any other read or write operation against the array will block. */ - load(typedArray: BigInt64Array | BigUint64Array, index: number): bigint; + load( + typedArray: + | BigInt64Array + | BigUint64Array, + index: number, + ): bigint; /** * Stores the bitwise OR of a value with the value at the given position in the array, @@ -57,7 +72,9 @@ interface Atomics { * operation against the array will block. */ or( - typedArray: BigInt64Array | BigUint64Array, + typedArray: + | BigInt64Array + | BigUint64Array, index: number, value: bigint, ): bigint; @@ -67,7 +84,9 @@ interface Atomics { * atomic operation completes, any other read or write operation against the array will block. */ store( - typedArray: BigInt64Array | BigUint64Array, + typedArray: + | BigInt64Array + | BigUint64Array, index: number, value: bigint, ): bigint; @@ -78,7 +97,9 @@ interface Atomics { * array will block. */ sub( - typedArray: BigInt64Array | BigUint64Array, + typedArray: + | BigInt64Array + | BigUint64Array, index: number, value: bigint, ): bigint; @@ -90,7 +111,7 @@ interface Atomics { * `"not-equal"`. */ wait( - typedArray: BigInt64Array, + typedArray: BigInt64Array, index: number, value: bigint, timeout?: number, @@ -103,7 +124,11 @@ interface Atomics { * @param index The position in the typedArray to wake up on. * @param count The number of sleeping agents to notify. Defaults to +Infinity. */ - notify(typedArray: BigInt64Array, index: number, count?: number): number; + notify( + typedArray: BigInt64Array, + index: number, + count?: number, + ): number; /** * Stores the bitwise XOR of a value with the value at the given position in the array, @@ -111,7 +136,9 @@ interface Atomics { * operation against the array will block. */ xor( - typedArray: BigInt64Array | BigUint64Array, + typedArray: + | BigInt64Array + | BigUint64Array, index: number, value: bigint, ): bigint; diff --git a/generated/lib.es2020.string.d.ts b/generated/lib.es2020.string.d.ts index dc3c61e..3cd66f0 100644 --- a/generated/lib.es2020.string.d.ts +++ b/generated/lib.es2020.string.d.ts @@ -1,4 +1,6 @@ /// +/// +/// /// interface String { diff --git a/generated/lib.es2021.intl.d.ts b/generated/lib.es2021.intl.d.ts index 4a9dc63..4c5d41d 100644 --- a/generated/lib.es2021.intl.d.ts +++ b/generated/lib.es2021.intl.d.ts @@ -39,28 +39,28 @@ declare namespace Intl { /** * The locale matching algorithm to use. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). */ type ListFormatLocaleMatcher = "lookup" | "best fit"; /** * The format of output message. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). */ type ListFormatType = "conjunction" | "disjunction" | "unit"; /** * The length of the formatted message. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). */ type ListFormatStyle = "long" | "short" | "narrow"; /** * An object with some or all properties of the `Intl.ListFormat` constructor `options` parameter. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters). */ interface ListFormatOptions { /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ @@ -81,26 +81,26 @@ declare namespace Intl { /** * Returns a string with a language-specific representation of the list. * - * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array). + * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array). * * @throws `TypeError` if `list` includes something other than the possible values. * * @returns {string} A language-specific formatted string representing the elements of the list. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/format). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/format). */ format(list: Iterable): string; /** * Returns an Array of objects representing the different components that can be used to format a list of values in a locale-aware fashion. * - * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array), to be formatted according to a locale. + * @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array), to be formatted according to a locale. * * @throws `TypeError` if `list` includes something other than the possible values. * * @returns {{ type: "element" | "literal", value: string; }[]} An Array of components which contains the formatted parts from the list. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts). */ formatToParts( list: Iterable, @@ -111,7 +111,7 @@ declare namespace Intl { * formatting options computed during the construction of the current * `Intl.ListFormat` object. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/resolvedOptions). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/resolvedOptions). */ resolvedOptions(): ResolvedListFormatOptions; } @@ -120,19 +120,19 @@ declare namespace Intl { prototype: ListFormat; /** - * Creates [Intl.ListFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) objects that + * Creates [Intl.ListFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) objects that * enable language-sensitive list formatting. * * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. * For the general form and interpretation of the `locales` argument, - * see the [`Intl` page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). * - * @param options - An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters) + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters) * with some or all options of `ListFormatOptions`. * - * @returns [Intl.ListFormatOptions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) object. + * @returns [Intl.ListFormatOptions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) object. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat). */ new (locales?: LocalesArgument, options?: ListFormatOptions): ListFormat; @@ -142,15 +142,15 @@ declare namespace Intl { * * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. * For the general form and interpretation of the `locales` argument, - * see the [`Intl` page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). * - * @param options - An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf#parameters). + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf#parameters). * with some or all possible options. * * @returns An array of strings representing a subset of the given locale tags that are supported in list * formatting without having to fall back to the runtime's default locale. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf). */ supportedLocalesOf( locales: LocalesArgument, diff --git a/generated/lib.es2021.weakref.d.ts b/generated/lib.es2021.weakref.d.ts index f5b3a81..680d632 100644 --- a/generated/lib.es2021.weakref.d.ts +++ b/generated/lib.es2021.weakref.d.ts @@ -1,4 +1,6 @@ /// +/// + interface WeakRef { readonly [Symbol.toStringTag]: "WeakRef"; diff --git a/generated/lib.es2022.array.d.ts b/generated/lib.es2022.array.d.ts index 37b6bfd..41aca94 100644 --- a/generated/lib.es2022.array.d.ts +++ b/generated/lib.es2022.array.d.ts @@ -15,7 +15,7 @@ interface ReadonlyArray { at(index: number): T | undefined; } -interface Int8Array { +interface Int8Array { /** * Returns the item located at the specified index. * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. @@ -23,7 +23,7 @@ interface Int8Array { at(index: number): number | undefined; } -interface Uint8Array { +interface Uint8Array { /** * Returns the item located at the specified index. * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. @@ -31,7 +31,7 @@ interface Uint8Array { at(index: number): number | undefined; } -interface Uint8ClampedArray { +interface Uint8ClampedArray { /** * Returns the item located at the specified index. * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. @@ -39,7 +39,7 @@ interface Uint8ClampedArray { at(index: number): number | undefined; } -interface Int16Array { +interface Int16Array { /** * Returns the item located at the specified index. * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. @@ -47,7 +47,7 @@ interface Int16Array { at(index: number): number | undefined; } -interface Uint16Array { +interface Uint16Array { /** * Returns the item located at the specified index. * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. @@ -55,7 +55,7 @@ interface Uint16Array { at(index: number): number | undefined; } -interface Int32Array { +interface Int32Array { /** * Returns the item located at the specified index. * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. @@ -63,7 +63,7 @@ interface Int32Array { at(index: number): number | undefined; } -interface Uint32Array { +interface Uint32Array { /** * Returns the item located at the specified index. * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. @@ -71,7 +71,7 @@ interface Uint32Array { at(index: number): number | undefined; } -interface Float32Array { +interface Float32Array { /** * Returns the item located at the specified index. * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. @@ -79,7 +79,7 @@ interface Float32Array { at(index: number): number | undefined; } -interface Float64Array { +interface Float64Array { /** * Returns the item located at the specified index. * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. @@ -87,7 +87,7 @@ interface Float64Array { at(index: number): number | undefined; } -interface BigInt64Array { +interface BigInt64Array { /** * Returns the item located at the specified index. * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. @@ -95,7 +95,7 @@ interface BigInt64Array { at(index: number): bigint | undefined; } -interface BigUint64Array { +interface BigUint64Array { /** * Returns the item located at the specified index. * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. diff --git a/generated/lib.es2022.d.ts b/generated/lib.es2022.d.ts index 020ed12..3695de9 100644 --- a/generated/lib.es2022.d.ts +++ b/generated/lib.es2022.d.ts @@ -4,6 +4,5 @@ /// /// /// -/// -/// /// +/// diff --git a/generated/lib.es2022.error.d.ts b/generated/lib.es2022.error.d.ts index a11b131..c97bdbf 100644 --- a/generated/lib.es2022.error.d.ts +++ b/generated/lib.es2022.error.d.ts @@ -1,4 +1,6 @@ /// +/// + interface ErrorOptions { cause?: unknown; } diff --git a/generated/lib.es2022.intl.d.ts b/generated/lib.es2022.intl.d.ts index f54760c..096c127 100644 --- a/generated/lib.es2022.intl.d.ts +++ b/generated/lib.es2022.intl.d.ts @@ -3,7 +3,7 @@ declare namespace Intl { /** * An object with some or all properties of the `Intl.Segmenter` constructor `options` parameter. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters) + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters) */ interface SegmenterOptions { /** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */ @@ -68,14 +68,14 @@ declare namespace Intl { * * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. * For the general form and interpretation of the `locales` argument, - * see the [`Intl` page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). * - * @param options - An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters) + * @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters) * with some or all options of `SegmenterOptions`. * - * @returns [Intl.Segmenter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segments) object. + * @returns [Intl.Segmenter](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segments) object. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter). + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter). */ new (locales?: LocalesArgument, options?: SegmenterOptions): Segmenter; @@ -84,12 +84,12 @@ declare namespace Intl { * * @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings. * For the general form and interpretation of the `locales` argument, - * see the [`Intl` page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). + * see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation). * - * @param options An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf#parameters). + * @param options An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf#parameters). * with some or all possible options. * - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf) + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf) */ supportedLocalesOf( locales: LocalesArgument, @@ -99,7 +99,7 @@ declare namespace Intl { /** * Returns a sorted array of the supported collation, calendar, currency, numbering system, timezones, and units by the implementation. - * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf) + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf) * * @param key A string indicating the category of values to return. * @returns A sorted array of the supported values. diff --git a/generated/lib.es2023.array.d.ts b/generated/lib.es2023.array.d.ts index 2b3b7a1..8862ea6 100644 --- a/generated/lib.es2023.array.d.ts +++ b/generated/lib.es2023.array.d.ts @@ -155,7 +155,7 @@ interface ReadonlyArray { with(index: number, value: T): T[]; } -interface Int8Array { +interface Int8Array { /** * Returns the value of the last element in the array where predicate is true, and undefined * otherwise. @@ -166,11 +166,11 @@ interface Int8Array { * predicate. If it is not provided, undefined is used instead. */ findLast( - predicate: (value: number, index: number, array: Int8Array) => value is S, + predicate: (value: number, index: number, array: this) => value is S, thisArg?: any, ): S | undefined; findLast( - predicate: (value: number, index: number, array: Int8Array) => unknown, + predicate: (value: number, index: number, array: this) => unknown, thisArg?: any, ): number | undefined; @@ -184,14 +184,14 @@ interface Int8Array { * predicate. If it is not provided, undefined is used instead. */ findLastIndex( - predicate: (value: number, index: number, array: Int8Array) => unknown, + predicate: (value: number, index: number, array: this) => unknown, thisArg?: any, ): number; /** * Copies the array and returns the copy with the elements in reverse order. */ - toReversed(): Int8Array; + toReversed(): Int8Array; /** * Copies and sorts the array. @@ -199,11 +199,13 @@ interface Int8Array { * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * const myNums = Int8Array.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Int8Array(4) [1, 2, 11, 22] + * const myNums = Int8Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Int8Array(4) [1, 2, 11, 22] * ``` */ - toSorted(compareFn?: (a: number, b: number) => number): Int8Array; + toSorted( + compareFn?: (a: number, b: number) => number, + ): Int8Array; /** * Copies the array and inserts the given number at the provided index. @@ -212,10 +214,10 @@ interface Int8Array { * @param value The value to insert into the copied array. * @returns A copy of the original array with the inserted value. */ - with(index: number, value: number): Int8Array; + with(index: number, value: number): Int8Array; } -interface Uint8Array { +interface Uint8Array { /** * Returns the value of the last element in the array where predicate is true, and undefined * otherwise. @@ -226,11 +228,11 @@ interface Uint8Array { * predicate. If it is not provided, undefined is used instead. */ findLast( - predicate: (value: number, index: number, array: Uint8Array) => value is S, + predicate: (value: number, index: number, array: this) => value is S, thisArg?: any, ): S | undefined; findLast( - predicate: (value: number, index: number, array: Uint8Array) => unknown, + predicate: (value: number, index: number, array: this) => unknown, thisArg?: any, ): number | undefined; @@ -244,14 +246,14 @@ interface Uint8Array { * predicate. If it is not provided, undefined is used instead. */ findLastIndex( - predicate: (value: number, index: number, array: Uint8Array) => unknown, + predicate: (value: number, index: number, array: this) => unknown, thisArg?: any, ): number; /** * Copies the array and returns the copy with the elements in reverse order. */ - toReversed(): Uint8Array; + toReversed(): Uint8Array; /** * Copies and sorts the array. @@ -259,11 +261,13 @@ interface Uint8Array { * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * const myNums = Uint8Array.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22] + * const myNums = Uint8Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22] * ``` */ - toSorted(compareFn?: (a: number, b: number) => number): Uint8Array; + toSorted( + compareFn?: (a: number, b: number) => number, + ): Uint8Array; /** * Copies the array and inserts the given number at the provided index. @@ -272,10 +276,10 @@ interface Uint8Array { * @param value The value to insert into the copied array. * @returns A copy of the original array with the inserted value. */ - with(index: number, value: number): Uint8Array; + with(index: number, value: number): Uint8Array; } -interface Uint8ClampedArray { +interface Uint8ClampedArray { /** * Returns the value of the last element in the array where predicate is true, and undefined * otherwise. @@ -286,19 +290,11 @@ interface Uint8ClampedArray { * predicate. If it is not provided, undefined is used instead. */ findLast( - predicate: ( - value: number, - index: number, - array: Uint8ClampedArray, - ) => value is S, + predicate: (value: number, index: number, array: this) => value is S, thisArg?: any, ): S | undefined; findLast( - predicate: ( - value: number, - index: number, - array: Uint8ClampedArray, - ) => unknown, + predicate: (value: number, index: number, array: this) => unknown, thisArg?: any, ): number | undefined; @@ -312,18 +308,14 @@ interface Uint8ClampedArray { * predicate. If it is not provided, undefined is used instead. */ findLastIndex( - predicate: ( - value: number, - index: number, - array: Uint8ClampedArray, - ) => unknown, + predicate: (value: number, index: number, array: this) => unknown, thisArg?: any, ): number; /** * Copies the array and returns the copy with the elements in reverse order. */ - toReversed(): Uint8ClampedArray; + toReversed(): Uint8ClampedArray; /** * Copies and sorts the array. @@ -331,11 +323,13 @@ interface Uint8ClampedArray { * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * const myNums = Uint8ClampedArray.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Uint8ClampedArray(4) [1, 2, 11, 22] + * const myNums = Uint8ClampedArray.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint8ClampedArray(4) [1, 2, 11, 22] * ``` */ - toSorted(compareFn?: (a: number, b: number) => number): Uint8ClampedArray; + toSorted( + compareFn?: (a: number, b: number) => number, + ): Uint8ClampedArray; /** * Copies the array and inserts the given number at the provided index. @@ -344,10 +338,10 @@ interface Uint8ClampedArray { * @param value The value to insert into the copied array. * @returns A copy of the original array with the inserted value. */ - with(index: number, value: number): Uint8ClampedArray; + with(index: number, value: number): Uint8ClampedArray; } -interface Int16Array { +interface Int16Array { /** * Returns the value of the last element in the array where predicate is true, and undefined * otherwise. @@ -358,11 +352,11 @@ interface Int16Array { * predicate. If it is not provided, undefined is used instead. */ findLast( - predicate: (value: number, index: number, array: Int16Array) => value is S, + predicate: (value: number, index: number, array: this) => value is S, thisArg?: any, ): S | undefined; findLast( - predicate: (value: number, index: number, array: Int16Array) => unknown, + predicate: (value: number, index: number, array: this) => unknown, thisArg?: any, ): number | undefined; @@ -376,14 +370,14 @@ interface Int16Array { * predicate. If it is not provided, undefined is used instead. */ findLastIndex( - predicate: (value: number, index: number, array: Int16Array) => unknown, + predicate: (value: number, index: number, array: this) => unknown, thisArg?: any, ): number; /** * Copies the array and returns the copy with the elements in reverse order. */ - toReversed(): Int16Array; + toReversed(): Int16Array; /** * Copies and sorts the array. @@ -391,11 +385,13 @@ interface Int16Array { * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * const myNums = Int16Array.from([11, 2, -22, 1]); - * myNums.toSorted((a, b) => a - b) // Int16Array(4) [-22, 1, 2, 11] + * const myNums = Int16Array.from([11, 2, -22, 1]); + * myNums.toSorted((a, b) => a - b) // Int16Array(4) [-22, 1, 2, 11] * ``` */ - toSorted(compareFn?: (a: number, b: number) => number): Int16Array; + toSorted( + compareFn?: (a: number, b: number) => number, + ): Int16Array; /** * Copies the array and inserts the given number at the provided index. @@ -404,10 +400,10 @@ interface Int16Array { * @param value The value to insert into the copied array. * @returns A copy of the original array with the inserted value. */ - with(index: number, value: number): Int16Array; + with(index: number, value: number): Int16Array; } -interface Uint16Array { +interface Uint16Array { /** * Returns the value of the last element in the array where predicate is true, and undefined * otherwise. @@ -418,11 +414,11 @@ interface Uint16Array { * predicate. If it is not provided, undefined is used instead. */ findLast( - predicate: (value: number, index: number, array: Uint16Array) => value is S, + predicate: (value: number, index: number, array: this) => value is S, thisArg?: any, ): S | undefined; findLast( - predicate: (value: number, index: number, array: Uint16Array) => unknown, + predicate: (value: number, index: number, array: this) => unknown, thisArg?: any, ): number | undefined; @@ -436,14 +432,14 @@ interface Uint16Array { * predicate. If it is not provided, undefined is used instead. */ findLastIndex( - predicate: (value: number, index: number, array: Uint16Array) => unknown, + predicate: (value: number, index: number, array: this) => unknown, thisArg?: any, ): number; /** * Copies the array and returns the copy with the elements in reverse order. */ - toReversed(): Uint16Array; + toReversed(): Uint16Array; /** * Copies and sorts the array. @@ -451,11 +447,13 @@ interface Uint16Array { * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * const myNums = Uint16Array.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Uint16Array(4) [1, 2, 11, 22] + * const myNums = Uint16Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint16Array(4) [1, 2, 11, 22] * ``` */ - toSorted(compareFn?: (a: number, b: number) => number): Uint16Array; + toSorted( + compareFn?: (a: number, b: number) => number, + ): Uint16Array; /** * Copies the array and inserts the given number at the provided index. @@ -464,10 +462,10 @@ interface Uint16Array { * @param value The value to insert into the copied array. * @returns A copy of the original array with the inserted value. */ - with(index: number, value: number): Uint16Array; + with(index: number, value: number): Uint16Array; } -interface Int32Array { +interface Int32Array { /** * Returns the value of the last element in the array where predicate is true, and undefined * otherwise. @@ -478,11 +476,11 @@ interface Int32Array { * predicate. If it is not provided, undefined is used instead. */ findLast( - predicate: (value: number, index: number, array: Int32Array) => value is S, + predicate: (value: number, index: number, array: this) => value is S, thisArg?: any, ): S | undefined; findLast( - predicate: (value: number, index: number, array: Int32Array) => unknown, + predicate: (value: number, index: number, array: this) => unknown, thisArg?: any, ): number | undefined; @@ -496,14 +494,14 @@ interface Int32Array { * predicate. If it is not provided, undefined is used instead. */ findLastIndex( - predicate: (value: number, index: number, array: Int32Array) => unknown, + predicate: (value: number, index: number, array: this) => unknown, thisArg?: any, ): number; /** * Copies the array and returns the copy with the elements in reverse order. */ - toReversed(): Int32Array; + toReversed(): Int32Array; /** * Copies and sorts the array. @@ -511,11 +509,13 @@ interface Int32Array { * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * const myNums = Int32Array.from([11, 2, -22, 1]); - * myNums.toSorted((a, b) => a - b) // Int32Array(4) [-22, 1, 2, 11] + * const myNums = Int32Array.from([11, 2, -22, 1]); + * myNums.toSorted((a, b) => a - b) // Int32Array(4) [-22, 1, 2, 11] * ``` */ - toSorted(compareFn?: (a: number, b: number) => number): Int32Array; + toSorted( + compareFn?: (a: number, b: number) => number, + ): Int32Array; /** * Copies the array and inserts the given number at the provided index. @@ -524,10 +524,10 @@ interface Int32Array { * @param value The value to insert into the copied array. * @returns A copy of the original array with the inserted value. */ - with(index: number, value: number): Int32Array; + with(index: number, value: number): Int32Array; } -interface Uint32Array { +interface Uint32Array { /** * Returns the value of the last element in the array where predicate is true, and undefined * otherwise. @@ -538,11 +538,11 @@ interface Uint32Array { * predicate. If it is not provided, undefined is used instead. */ findLast( - predicate: (value: number, index: number, array: Uint32Array) => value is S, + predicate: (value: number, index: number, array: this) => value is S, thisArg?: any, ): S | undefined; findLast( - predicate: (value: number, index: number, array: Uint32Array) => unknown, + predicate: (value: number, index: number, array: this) => unknown, thisArg?: any, ): number | undefined; @@ -556,14 +556,14 @@ interface Uint32Array { * predicate. If it is not provided, undefined is used instead. */ findLastIndex( - predicate: (value: number, index: number, array: Uint32Array) => unknown, + predicate: (value: number, index: number, array: this) => unknown, thisArg?: any, ): number; /** * Copies the array and returns the copy with the elements in reverse order. */ - toReversed(): Uint32Array; + toReversed(): Uint32Array; /** * Copies and sorts the array. @@ -571,11 +571,13 @@ interface Uint32Array { * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * const myNums = Uint32Array.from([11, 2, 22, 1]); - * myNums.toSorted((a, b) => a - b) // Uint32Array(4) [1, 2, 11, 22] + * const myNums = Uint32Array.from([11, 2, 22, 1]); + * myNums.toSorted((a, b) => a - b) // Uint32Array(4) [1, 2, 11, 22] * ``` */ - toSorted(compareFn?: (a: number, b: number) => number): Uint32Array; + toSorted( + compareFn?: (a: number, b: number) => number, + ): Uint32Array; /** * Copies the array and inserts the given number at the provided index. @@ -584,10 +586,10 @@ interface Uint32Array { * @param value The value to insert into the copied array. * @returns A copy of the original array with the inserted value. */ - with(index: number, value: number): Uint32Array; + with(index: number, value: number): Uint32Array; } -interface Float32Array { +interface Float32Array { /** * Returns the value of the last element in the array where predicate is true, and undefined * otherwise. @@ -598,15 +600,11 @@ interface Float32Array { * predicate. If it is not provided, undefined is used instead. */ findLast( - predicate: ( - value: number, - index: number, - array: Float32Array, - ) => value is S, + predicate: (value: number, index: number, array: this) => value is S, thisArg?: any, ): S | undefined; findLast( - predicate: (value: number, index: number, array: Float32Array) => unknown, + predicate: (value: number, index: number, array: this) => unknown, thisArg?: any, ): number | undefined; @@ -620,14 +618,14 @@ interface Float32Array { * predicate. If it is not provided, undefined is used instead. */ findLastIndex( - predicate: (value: number, index: number, array: Float32Array) => unknown, + predicate: (value: number, index: number, array: this) => unknown, thisArg?: any, ): number; /** * Copies the array and returns the copy with the elements in reverse order. */ - toReversed(): Float32Array; + toReversed(): Float32Array; /** * Copies and sorts the array. @@ -635,11 +633,13 @@ interface Float32Array { * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * const myNums = Float32Array.from([11.25, 2, -22.5, 1]); - * myNums.toSorted((a, b) => a - b) // Float32Array(4) [-22.5, 1, 2, 11.5] + * const myNums = Float32Array.from([11.25, 2, -22.5, 1]); + * myNums.toSorted((a, b) => a - b) // Float32Array(4) [-22.5, 1, 2, 11.5] * ``` */ - toSorted(compareFn?: (a: number, b: number) => number): Float32Array; + toSorted( + compareFn?: (a: number, b: number) => number, + ): Float32Array; /** * Copies the array and inserts the given number at the provided index. @@ -648,10 +648,10 @@ interface Float32Array { * @param value The value to insert into the copied array. * @returns A copy of the original array with the inserted value. */ - with(index: number, value: number): Float32Array; + with(index: number, value: number): Float32Array; } -interface Float64Array { +interface Float64Array { /** * Returns the value of the last element in the array where predicate is true, and undefined * otherwise. @@ -662,15 +662,11 @@ interface Float64Array { * predicate. If it is not provided, undefined is used instead. */ findLast( - predicate: ( - value: number, - index: number, - array: Float64Array, - ) => value is S, + predicate: (value: number, index: number, array: this) => value is S, thisArg?: any, ): S | undefined; findLast( - predicate: (value: number, index: number, array: Float64Array) => unknown, + predicate: (value: number, index: number, array: this) => unknown, thisArg?: any, ): number | undefined; @@ -684,14 +680,14 @@ interface Float64Array { * predicate. If it is not provided, undefined is used instead. */ findLastIndex( - predicate: (value: number, index: number, array: Float64Array) => unknown, + predicate: (value: number, index: number, array: this) => unknown, thisArg?: any, ): number; /** * Copies the array and returns the copy with the elements in reverse order. */ - toReversed(): Float64Array; + toReversed(): Float64Array; /** * Copies and sorts the array. @@ -699,11 +695,13 @@ interface Float64Array { * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * const myNums = Float64Array.from([11.25, 2, -22.5, 1]); - * myNums.toSorted((a, b) => a - b) // Float64Array(4) [-22.5, 1, 2, 11.5] + * const myNums = Float64Array.from([11.25, 2, -22.5, 1]); + * myNums.toSorted((a, b) => a - b) // Float64Array(4) [-22.5, 1, 2, 11.5] * ``` */ - toSorted(compareFn?: (a: number, b: number) => number): Float64Array; + toSorted( + compareFn?: (a: number, b: number) => number, + ): Float64Array; /** * Copies the array and inserts the given number at the provided index. @@ -712,10 +710,10 @@ interface Float64Array { * @param value The value to insert into the copied array. * @returns A copy of the original array with the inserted value. */ - with(index: number, value: number): Float64Array; + with(index: number, value: number): Float64Array; } -interface BigInt64Array { +interface BigInt64Array { /** * Returns the value of the last element in the array where predicate is true, and undefined * otherwise. @@ -726,15 +724,11 @@ interface BigInt64Array { * predicate. If it is not provided, undefined is used instead. */ findLast( - predicate: ( - value: bigint, - index: number, - array: BigInt64Array, - ) => value is S, + predicate: (value: bigint, index: number, array: this) => value is S, thisArg?: any, ): S | undefined; findLast( - predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, + predicate: (value: bigint, index: number, array: this) => unknown, thisArg?: any, ): bigint | undefined; @@ -748,14 +742,14 @@ interface BigInt64Array { * predicate. If it is not provided, undefined is used instead. */ findLastIndex( - predicate: (value: bigint, index: number, array: BigInt64Array) => unknown, + predicate: (value: bigint, index: number, array: this) => unknown, thisArg?: any, ): number; /** * Copies the array and returns the copy with the elements in reverse order. */ - toReversed(): BigInt64Array; + toReversed(): BigInt64Array; /** * Copies and sorts the array. @@ -763,11 +757,13 @@ interface BigInt64Array { * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * const myNums = BigInt64Array.from([11n, 2n, -22n, 1n]); - * myNums.toSorted((a, b) => Number(a - b)) // BigInt64Array(4) [-22n, 1n, 2n, 11n] + * const myNums = BigInt64Array.from([11n, 2n, -22n, 1n]); + * myNums.toSorted((a, b) => Number(a - b)) // BigInt64Array(4) [-22n, 1n, 2n, 11n] * ``` */ - toSorted(compareFn?: (a: bigint, b: bigint) => number): BigInt64Array; + toSorted( + compareFn?: (a: bigint, b: bigint) => number, + ): BigInt64Array; /** * Copies the array and inserts the given bigint at the provided index. @@ -776,10 +772,10 @@ interface BigInt64Array { * @param value The value to insert into the copied array. * @returns A copy of the original array with the inserted value. */ - with(index: number, value: bigint): BigInt64Array; + with(index: number, value: bigint): BigInt64Array; } -interface BigUint64Array { +interface BigUint64Array { /** * Returns the value of the last element in the array where predicate is true, and undefined * otherwise. @@ -790,15 +786,11 @@ interface BigUint64Array { * predicate. If it is not provided, undefined is used instead. */ findLast( - predicate: ( - value: bigint, - index: number, - array: BigUint64Array, - ) => value is S, + predicate: (value: bigint, index: number, array: this) => value is S, thisArg?: any, ): S | undefined; findLast( - predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, + predicate: (value: bigint, index: number, array: this) => unknown, thisArg?: any, ): bigint | undefined; @@ -812,14 +804,14 @@ interface BigUint64Array { * predicate. If it is not provided, undefined is used instead. */ findLastIndex( - predicate: (value: bigint, index: number, array: BigUint64Array) => unknown, + predicate: (value: bigint, index: number, array: this) => unknown, thisArg?: any, ): number; /** * Copies the array and returns the copy with the elements in reverse order. */ - toReversed(): BigUint64Array; + toReversed(): BigUint64Array; /** * Copies and sorts the array. @@ -827,11 +819,13 @@ interface BigUint64Array { * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts - * const myNums = BigUint64Array.from([11n, 2n, 22n, 1n]); - * myNums.toSorted((a, b) => Number(a - b)) // BigUint64Array(4) [1n, 2n, 11n, 22n] + * const myNums = BigUint64Array.from([11n, 2n, 22n, 1n]); + * myNums.toSorted((a, b) => Number(a - b)) // BigUint64Array(4) [1n, 2n, 11n, 22n] * ``` */ - toSorted(compareFn?: (a: bigint, b: bigint) => number): BigUint64Array; + toSorted( + compareFn?: (a: bigint, b: bigint) => number, + ): BigUint64Array; /** * Copies the array and inserts the given bigint at the provided index. @@ -840,5 +834,5 @@ interface BigUint64Array { * @param value The value to insert into the copied array. * @returns A copy of the original array with the inserted value. */ - with(index: number, value: bigint): BigUint64Array; + with(index: number, value: bigint): BigUint64Array; } diff --git a/generated/lib.es2024.arraybuffer.d.ts b/generated/lib.es2024.arraybuffer.d.ts new file mode 100644 index 0000000..355165e --- /dev/null +++ b/generated/lib.es2024.arraybuffer.d.ts @@ -0,0 +1,48 @@ +/// +interface ArrayBuffer { + /** + * If this ArrayBuffer is resizable, returns the maximum byte length given during construction; returns the byte length if not. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/maxByteLength) + */ + get maxByteLength(): number; + + /** + * Returns true if this ArrayBuffer can be resized. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/resizable) + */ + get resizable(): boolean; + + /** + * Resizes the ArrayBuffer to the specified size (in bytes). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/resize) + */ + resize(newByteLength?: number): void; + + /** + * Returns a boolean indicating whether or not this buffer has been detached (transferred). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/detached) + */ + get detached(): boolean; + + /** + * Creates a new ArrayBuffer with the same byte content as this buffer, then detaches this buffer. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/transfer) + */ + transfer(newByteLength?: number): ArrayBuffer; + + /** + * Creates a new non-resizable ArrayBuffer with the same byte content as this buffer, then detaches this buffer. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/transferToFixedLength) + */ + transferToFixedLength(newByteLength?: number): ArrayBuffer; +} + +interface ArrayBufferConstructor { + new (byteLength: number, options?: { maxByteLength?: number }): ArrayBuffer; +} diff --git a/generated/lib.es2024.collection.d.ts b/generated/lib.es2024.collection.d.ts new file mode 100644 index 0000000..a3f853e --- /dev/null +++ b/generated/lib.es2024.collection.d.ts @@ -0,0 +1,12 @@ +/// +interface MapConstructor { + /** + * Groups members of an iterable according to the return value of the passed callback. + * @param items An iterable. + * @param keySelector A callback which will be invoked for each item in items. + */ + groupBy( + items: Iterable, + keySelector: (item: T, index: number) => K, + ): Map; +} diff --git a/generated/lib.es2024.d.ts b/generated/lib.es2024.d.ts new file mode 100644 index 0000000..73bdc2b --- /dev/null +++ b/generated/lib.es2024.d.ts @@ -0,0 +1,9 @@ +/// +/// +/// +/// +/// +/// +/// +/// +/// diff --git a/generated/lib.es2024.full.d.ts b/generated/lib.es2024.full.d.ts new file mode 100644 index 0000000..030724b --- /dev/null +++ b/generated/lib.es2024.full.d.ts @@ -0,0 +1,7 @@ +/// +/// +/// +/// +/// +/// +/// diff --git a/generated/lib.esnext.object.d.ts b/generated/lib.es2024.object.d.ts similarity index 100% rename from generated/lib.esnext.object.d.ts rename to generated/lib.es2024.object.d.ts diff --git a/generated/lib.esnext.promise.d.ts b/generated/lib.es2024.promise.d.ts similarity index 100% rename from generated/lib.esnext.promise.d.ts rename to generated/lib.es2024.promise.d.ts diff --git a/generated/lib.esnext.regexp.d.ts b/generated/lib.es2024.regexp.d.ts similarity index 100% rename from generated/lib.esnext.regexp.d.ts rename to generated/lib.es2024.regexp.d.ts diff --git a/generated/lib.es2022.sharedmemory.d.ts b/generated/lib.es2024.sharedmemory.d.ts similarity index 57% rename from generated/lib.es2022.sharedmemory.d.ts rename to generated/lib.es2024.sharedmemory.d.ts index 78c2e39..34c39d4 100644 --- a/generated/lib.es2022.sharedmemory.d.ts +++ b/generated/lib.es2024.sharedmemory.d.ts @@ -1,4 +1,6 @@ /// +/// + interface Atomics { /** * A non-blocking, asynchronous version of wait which is usable on the main thread. @@ -34,3 +36,33 @@ interface Atomics { | { async: false; value: "not-equal" | "timed-out" } | { async: true; value: Promise<"ok" | "timed-out"> }; } + +interface SharedArrayBuffer { + /** + * Returns true if this SharedArrayBuffer can be grown. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/growable) + */ + get growable(): boolean; + + /** + * If this SharedArrayBuffer is growable, returns the maximum byte length given during construction; returns the byte length if not. + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/maxByteLength) + */ + get maxByteLength(): number; + + /** + * Grows the SharedArrayBuffer to the specified size (in bytes). + * + * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/grow) + */ + grow(newByteLength?: number): void; +} + +interface SharedArrayBufferConstructor { + new ( + byteLength: number, + options?: { maxByteLength?: number }, + ): SharedArrayBuffer; +} diff --git a/generated/lib.esnext.string.d.ts b/generated/lib.es2024.string.d.ts similarity index 100% rename from generated/lib.esnext.string.d.ts rename to generated/lib.es2024.string.d.ts diff --git a/generated/lib.es5.d.ts b/generated/lib.es5.d.ts index d0e56c5..7dc5a5b 100644 --- a/generated/lib.es5.d.ts +++ b/generated/lib.es5.d.ts @@ -2325,7 +2325,7 @@ interface ArrayBuffer { /** * Returns a section of an ArrayBuffer. */ - slice(begin: number, end?: number): ArrayBuffer; + slice(begin?: number, end?: number): ArrayBuffer; } /** @@ -2343,25 +2343,27 @@ interface ArrayBufferConstructor { } declare var ArrayBuffer: ArrayBufferConstructor; -interface ArrayBufferView { +interface ArrayBufferView< + TArrayBuffer extends ArrayBufferLike = ArrayBufferLike, +> { /** * The ArrayBuffer instance referenced by the array. */ - buffer: ArrayBufferLike; + readonly buffer: TArrayBuffer; /** * The length in bytes of the array. */ - byteLength: number; + readonly byteLength: number; /** * The offset in bytes of the array. */ - byteOffset: number; + readonly byteOffset: number; } -interface DataView { - readonly buffer: ArrayBuffer; +interface DataView { + readonly buffer: TArrayBuffer; readonly byteLength: number; readonly byteOffset: number; /** @@ -2487,14 +2489,13 @@ interface DataView { */ setUint32(byteOffset: number, value: number, littleEndian?: boolean): void; } - interface DataViewConstructor { - readonly prototype: DataView; - new ( - buffer: ArrayBufferLike & { BYTES_PER_ELEMENT?: never }, + readonly prototype: DataView; + new ( + buffer: TArrayBuffer, byteOffset?: number, byteLength?: number, - ): DataView; + ): DataView; } declare var DataView: DataViewConstructor; @@ -2502,7 +2503,7 @@ declare var DataView: DataViewConstructor; * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested * number of bytes could not be allocated an exception is raised. */ -interface Int8Array { +interface Int8Array { /** * The size in bytes of each element in the array. */ @@ -2511,7 +2512,7 @@ interface Int8Array { /** * The ArrayBuffer instance referenced by the array. */ - readonly buffer: ArrayBufferLike; + readonly buffer: TArrayBuffer; /** * The length in bytes of the array. @@ -2730,7 +2731,7 @@ interface Int8Array { /** * Reverses the elements in an Array. */ - reverse(): Int8Array; + reverse(): this; /** * Sets a value or an array of values. @@ -2744,7 +2745,7 @@ interface Int8Array { * @param start The beginning of the specified portion of the array. * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. */ - slice(start?: number, end?: number): Int8Array; + slice(start?: number, end?: number): Int8Array; /** * Determines whether the specified callback function returns true for any element of an array. * @param predicate A function that accepts up to three arguments. The some method calls @@ -2780,7 +2781,7 @@ interface Int8Array { * @param begin The index of the beginning of the array. * @param end The index of the end of the array. */ - subarray(begin?: number, end?: number): Int8Array; + subarray(begin?: number, end?: number): Int8Array; /** * Converts a number to a string by using the current locale. @@ -2793,7 +2794,7 @@ interface Int8Array { toString(): string; /** Returns the primitive value of the specified object. */ - valueOf(): Int8Array; + valueOf(): this; [index: number]: number; } @@ -2805,7 +2806,7 @@ interface Int8Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// every(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): boolean; +// every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; // /** // * Returns the elements of an array that meet the condition specified in a callback function. // * @param predicate A function that accepts up to three arguments. The filter method calls @@ -2813,7 +2814,7 @@ interface Int8Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// filter(predicate: (value: number, index: number, array: Int8Array) => any, thisArg?: any): Int8Array; +// filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int8Array; // /** // * Returns the value of the first element in the array where predicate is true, and undefined // * otherwise. @@ -2823,7 +2824,7 @@ interface Int8Array { // * @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. // */ -// find(predicate: (value: number, index: number, obj: Int8Array) => boolean, thisArg?: any): number | undefined; +// find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; // /** // * Returns the index of the first element in the array where predicate is true, and -1 // * otherwise. @@ -2833,7 +2834,7 @@ interface Int8Array { // * @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. // */ -// findIndex(predicate: (value: number, index: number, obj: Int8Array) => boolean, thisArg?: any): number; +// findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; // /** // * Performs the specified action for each element in an array. // * @param callbackfn A function that accepts up to three arguments. forEach calls the @@ -2841,7 +2842,7 @@ interface Int8Array { // * @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. // */ -// forEach(callbackfn: (value: number, index: number, array: Int8Array) => void, thisArg?: any): void; +// forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; // /** // * Calls a defined callback function on each element of an array, and returns an array that // * contains the results. @@ -2850,7 +2851,7 @@ interface Int8Array { // * @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. // */ -// map(callbackfn: (value: number, index: number, array: Int8Array) => number, thisArg?: any): Int8Array; +// map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int8Array; // /** // * 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 @@ -2861,8 +2862,8 @@ interface Int8Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number): number; -// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue: number): number; +// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; +// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; // /** // * 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 @@ -2873,7 +2874,7 @@ interface Int8Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U; +// reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; // /** // * 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 @@ -2884,8 +2885,8 @@ interface Int8Array { // * the accumulation. The first call to the callbackfn function provides this value as an // * argument instead of an array value. // */ -// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number): number; -// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue: number): number; +// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; +// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; // /** // * 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 @@ -2896,7 +2897,7 @@ interface Int8Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U; +// reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; // /** // * Determines whether the specified callback function returns true for any element of an array. // * @param predicate A function that accepts up to three arguments. The some method calls @@ -2905,17 +2906,18 @@ interface Int8Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// some(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): boolean; +// some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; interface Int8ArrayConstructor { - readonly prototype: Int8Array; - new (length: number): Int8Array; - new (array: ArrayLike | ArrayBufferLike): Int8Array; - new ( - buffer: ArrayBufferLike, + readonly prototype: Int8Array; + new (length: number): Int8Array; + new (array: ArrayLike): Int8Array; + new ( + buffer: TArrayBuffer, byteOffset?: number, length?: number, - ): Int8Array; + ): Int8Array; + new (array: ArrayLike | ArrayBuffer): Int8Array; /** * The size in bytes of each element in the array. @@ -2926,12 +2928,12 @@ interface Int8ArrayConstructor { * Returns a new array from a set of elements. * @param items A set of elements to include in the new array object. */ - of(...items: number[]): Int8Array; + of(...items: number[]): Int8Array; /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Int8Array; + from(arrayLike: ArrayLike): Int8Array; /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. @@ -2942,20 +2944,20 @@ interface Int8ArrayConstructor { arrayLike: ArrayLike, mapfn: (this: This, v: T, k: number) => number, thisArg?: This, - ): Int8Array; + ): Int8Array; } // /** // * Creates an array from an array-like or iterable object. // * @param arrayLike An array-like or iterable object to convert to an array. // */ -// from(arrayLike: ArrayLike): Int8Array; +// from(arrayLike: ArrayLike): Int8Array; // /** // * Creates an array from an array-like or iterable object. // * @param arrayLike An array-like or iterable object to convert to an array. // * @param mapfn A mapping function to call on every element of the array. // * @param thisArg Value of 'this' used to invoke the mapfn. // */ -// from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; +// from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; declare var Int8Array: Int8ArrayConstructor; @@ -2963,7 +2965,7 @@ declare var Int8Array: Int8ArrayConstructor; * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the * requested number of bytes could not be allocated an exception is raised. */ -interface Uint8Array { +interface Uint8Array { /** * The size in bytes of each element in the array. */ @@ -2972,7 +2974,7 @@ interface Uint8Array { /** * The ArrayBuffer instance referenced by the array. */ - readonly buffer: ArrayBufferLike; + readonly buffer: TArrayBuffer; /** * The length in bytes of the array. @@ -3191,7 +3193,7 @@ interface Uint8Array { /** * Reverses the elements in an Array. */ - reverse(): Uint8Array; + reverse(): this; /** * Sets a value or an array of values. @@ -3205,7 +3207,7 @@ interface Uint8Array { * @param start The beginning of the specified portion of the array. * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. */ - slice(start?: number, end?: number): Uint8Array; + slice(start?: number, end?: number): Uint8Array; /** * Determines whether the specified callback function returns true for any element of an array. * @param predicate A function that accepts up to three arguments. The some method calls @@ -3241,7 +3243,7 @@ interface Uint8Array { * @param begin The index of the beginning of the array. * @param end The index of the end of the array. */ - subarray(begin?: number, end?: number): Uint8Array; + subarray(begin?: number, end?: number): Uint8Array; /** * Converts a number to a string by using the current locale. @@ -3254,7 +3256,7 @@ interface Uint8Array { toString(): string; /** Returns the primitive value of the specified object. */ - valueOf(): Uint8Array; + valueOf(): this; [index: number]: number; } @@ -3266,7 +3268,7 @@ interface Uint8Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// every(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): boolean; +// every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; // /** // * Returns the elements of an array that meet the condition specified in a callback function. // * @param predicate A function that accepts up to three arguments. The filter method calls @@ -3274,7 +3276,7 @@ interface Uint8Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// filter(predicate: (value: number, index: number, array: Uint8Array) => any, thisArg?: any): Uint8Array; +// filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8Array; // /** // * Returns the value of the first element in the array where predicate is true, and undefined // * otherwise. @@ -3284,7 +3286,7 @@ interface Uint8Array { // * @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. // */ -// find(predicate: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number | undefined; +// find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; // /** // * Returns the index of the first element in the array where predicate is true, and -1 // * otherwise. @@ -3294,7 +3296,7 @@ interface Uint8Array { // * @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. // */ -// findIndex(predicate: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number; +// findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; // /** // * Performs the specified action for each element in an array. // * @param callbackfn A function that accepts up to three arguments. forEach calls the @@ -3302,7 +3304,7 @@ interface Uint8Array { // * @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. // */ -// forEach(callbackfn: (value: number, index: number, array: Uint8Array) => void, thisArg?: any): void; +// forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; // /** // * Calls a defined callback function on each element of an array, and returns an array that // * contains the results. @@ -3311,7 +3313,7 @@ interface Uint8Array { // * @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. // */ -// map(callbackfn: (value: number, index: number, array: Uint8Array) => number, thisArg?: any): Uint8Array; +// map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8Array; // /** // * 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 @@ -3322,8 +3324,8 @@ interface Uint8Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number): number; -// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue: number): number; +// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; +// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; // /** // * 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 @@ -3334,7 +3336,7 @@ interface Uint8Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U; +// reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; // /** // * 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 @@ -3345,8 +3347,8 @@ interface Uint8Array { // * the accumulation. The first call to the callbackfn function provides this value as an // * argument instead of an array value. // */ -// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number): number; -// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue: number): number; +// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; +// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; // /** // * 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 @@ -3357,7 +3359,7 @@ interface Uint8Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U; +// reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; // /** // * Determines whether the specified callback function returns true for any element of an array. // * @param predicate A function that accepts up to three arguments. The some method calls @@ -3366,17 +3368,18 @@ interface Uint8Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// some(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): boolean; +// some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; interface Uint8ArrayConstructor { - readonly prototype: Uint8Array; - new (length: number): Uint8Array; - new (array: ArrayLike | ArrayBufferLike): Uint8Array; - new ( - buffer: ArrayBufferLike, + readonly prototype: Uint8Array; + new (length: number): Uint8Array; + new (array: ArrayLike): Uint8Array; + new ( + buffer: TArrayBuffer, byteOffset?: number, length?: number, - ): Uint8Array; + ): Uint8Array; + new (array: ArrayLike | ArrayBuffer): Uint8Array; /** * The size in bytes of each element in the array. @@ -3387,12 +3390,12 @@ interface Uint8ArrayConstructor { * Returns a new array from a set of elements. * @param items A set of elements to include in the new array object. */ - of(...items: number[]): Uint8Array; + of(...items: number[]): Uint8Array; /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Uint8Array; + from(arrayLike: ArrayLike): Uint8Array; /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. @@ -3403,20 +3406,20 @@ interface Uint8ArrayConstructor { arrayLike: ArrayLike, mapfn: (this: This, v: T, k: number) => number, thisArg?: This, - ): Uint8Array; + ): Uint8Array; } // /** // * Creates an array from an array-like or iterable object. // * @param arrayLike An array-like or iterable object to convert to an array. // */ -// from(arrayLike: ArrayLike): Uint8Array; +// from(arrayLike: ArrayLike): Uint8Array; // /** // * Creates an array from an array-like or iterable object. // * @param arrayLike An array-like or iterable object to convert to an array. // * @param mapfn A mapping function to call on every element of the array. // * @param thisArg Value of 'this' used to invoke the mapfn. // */ -// from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; +// from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; declare var Uint8Array: Uint8ArrayConstructor; @@ -3424,7 +3427,9 @@ declare var Uint8Array: Uint8ArrayConstructor; * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0. * If the requested number of bytes could not be allocated an exception is raised. */ -interface Uint8ClampedArray { +interface Uint8ClampedArray< + TArrayBuffer extends ArrayBufferLike = ArrayBufferLike, +> { /** * The size in bytes of each element in the array. */ @@ -3433,7 +3438,7 @@ interface Uint8ClampedArray { /** * The ArrayBuffer instance referenced by the array. */ - readonly buffer: ArrayBufferLike; + readonly buffer: TArrayBuffer; /** * The length in bytes of the array. @@ -3652,7 +3657,7 @@ interface Uint8ClampedArray { /** * Reverses the elements in an Array. */ - reverse(): Uint8ClampedArray; + reverse(): this; /** * Sets a value or an array of values. @@ -3666,7 +3671,7 @@ interface Uint8ClampedArray { * @param start The beginning of the specified portion of the array. * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. */ - slice(start?: number, end?: number): Uint8ClampedArray; + slice(start?: number, end?: number): Uint8ClampedArray; /** * Determines whether the specified callback function returns true for any element of an array. * @param predicate A function that accepts up to three arguments. The some method calls @@ -3702,7 +3707,7 @@ interface Uint8ClampedArray { * @param begin The index of the beginning of the array. * @param end The index of the end of the array. */ - subarray(begin?: number, end?: number): Uint8ClampedArray; + subarray(begin?: number, end?: number): Uint8ClampedArray; /** * Converts a number to a string by using the current locale. @@ -3715,7 +3720,7 @@ interface Uint8ClampedArray { toString(): string; /** Returns the primitive value of the specified object. */ - valueOf(): Uint8ClampedArray; + valueOf(): this; [index: number]: number; } @@ -3727,7 +3732,7 @@ interface Uint8ClampedArray { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// every(predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): boolean; +// every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; // /** // * Returns the elements of an array that meet the condition specified in a callback function. // * @param predicate A function that accepts up to three arguments. The filter method calls @@ -3735,7 +3740,7 @@ interface Uint8ClampedArray { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// filter(predicate: (value: number, index: number, array: Uint8ClampedArray) => any, thisArg?: any): Uint8ClampedArray; +// filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint8ClampedArray; // /** // * Returns the value of the first element in the array where predicate is true, and undefined // * otherwise. @@ -3745,7 +3750,7 @@ interface Uint8ClampedArray { // * @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. // */ -// find(predicate: (value: number, index: number, obj: Uint8ClampedArray) => boolean, thisArg?: any): number | undefined; +// find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; // /** // * Returns the index of the first element in the array where predicate is true, and -1 // * otherwise. @@ -3755,7 +3760,7 @@ interface Uint8ClampedArray { // * @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. // */ -// findIndex(predicate: (value: number, index: number, obj: Uint8ClampedArray) => boolean, thisArg?: any): number; +// findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; // /** // * Performs the specified action for each element in an array. // * @param callbackfn A function that accepts up to three arguments. forEach calls the @@ -3763,7 +3768,7 @@ interface Uint8ClampedArray { // * @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. // */ -// forEach(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => void, thisArg?: any): void; +// forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; // /** // * Calls a defined callback function on each element of an array, and returns an array that // * contains the results. @@ -3772,7 +3777,7 @@ interface Uint8ClampedArray { // * @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. // */ -// map(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => number, thisArg?: any): Uint8ClampedArray; +// map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint8ClampedArray; // /** // * 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 @@ -3783,8 +3788,8 @@ interface Uint8ClampedArray { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number): number; -// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue: number): number; +// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; +// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; // /** // * 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 @@ -3795,7 +3800,7 @@ interface Uint8ClampedArray { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U; +// reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; // /** // * 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 @@ -3806,8 +3811,8 @@ interface Uint8ClampedArray { // * the accumulation. The first call to the callbackfn function provides this value as an // * argument instead of an array value. // */ -// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number): number; -// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue: number): number; +// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; +// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; // /** // * 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 @@ -3818,7 +3823,7 @@ interface Uint8ClampedArray { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U; +// reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; // /** // * Determines whether the specified callback function returns true for any element of an array. // * @param predicate A function that accepts up to three arguments. The some method calls @@ -3827,17 +3832,18 @@ interface Uint8ClampedArray { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// some(predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): boolean; +// some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; interface Uint8ClampedArrayConstructor { - readonly prototype: Uint8ClampedArray; - new (length: number): Uint8ClampedArray; - new (array: ArrayLike | ArrayBufferLike): Uint8ClampedArray; - new ( - buffer: ArrayBufferLike, + readonly prototype: Uint8ClampedArray; + new (length: number): Uint8ClampedArray; + new (array: ArrayLike): Uint8ClampedArray; + new ( + buffer: TArrayBuffer, byteOffset?: number, length?: number, - ): Uint8ClampedArray; + ): Uint8ClampedArray; + new (array: ArrayLike | ArrayBuffer): Uint8ClampedArray; /** * The size in bytes of each element in the array. @@ -3848,12 +3854,12 @@ interface Uint8ClampedArrayConstructor { * Returns a new array from a set of elements. * @param items A set of elements to include in the new array object. */ - of(...items: number[]): Uint8ClampedArray; + of(...items: number[]): Uint8ClampedArray; /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Uint8ClampedArray; + from(arrayLike: ArrayLike): Uint8ClampedArray; /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. @@ -3864,20 +3870,20 @@ interface Uint8ClampedArrayConstructor { arrayLike: ArrayLike, mapfn: (this: This, v: T, k: number) => number, thisArg?: This, - ): Uint8ClampedArray; + ): Uint8ClampedArray; } // /** // * Creates an array from an array-like or iterable object. // * @param arrayLike An array-like or iterable object to convert to an array. // */ -// from(arrayLike: ArrayLike): Uint8ClampedArray; +// from(arrayLike: ArrayLike): Uint8ClampedArray; // /** // * Creates an array from an array-like or iterable object. // * @param arrayLike An array-like or iterable object to convert to an array. // * @param mapfn A mapping function to call on every element of the array. // * @param thisArg Value of 'this' used to invoke the mapfn. // */ -// from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; +// from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray; declare var Uint8ClampedArray: Uint8ClampedArrayConstructor; @@ -3885,7 +3891,7 @@ declare var Uint8ClampedArray: Uint8ClampedArrayConstructor; * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the * requested number of bytes could not be allocated an exception is raised. */ -interface Int16Array { +interface Int16Array { /** * The size in bytes of each element in the array. */ @@ -3894,7 +3900,7 @@ interface Int16Array { /** * The ArrayBuffer instance referenced by the array. */ - readonly buffer: ArrayBufferLike; + readonly buffer: TArrayBuffer; /** * The length in bytes of the array. @@ -4112,7 +4118,7 @@ interface Int16Array { /** * Reverses the elements in an Array. */ - reverse(): Int16Array; + reverse(): this; /** * Sets a value or an array of values. @@ -4126,7 +4132,7 @@ interface Int16Array { * @param start The beginning of the specified portion of the array. * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. */ - slice(start?: number, end?: number): Int16Array; + slice(start?: number, end?: number): Int16Array; /** * Determines whether the specified callback function returns true for any element of an array. * @param predicate A function that accepts up to three arguments. The some method calls @@ -4162,7 +4168,7 @@ interface Int16Array { * @param begin The index of the beginning of the array. * @param end The index of the end of the array. */ - subarray(begin?: number, end?: number): Int16Array; + subarray(begin?: number, end?: number): Int16Array; /** * Converts a number to a string by using the current locale. @@ -4175,7 +4181,7 @@ interface Int16Array { toString(): string; /** Returns the primitive value of the specified object. */ - valueOf(): Int16Array; + valueOf(): this; [index: number]: number; } @@ -4187,7 +4193,7 @@ interface Int16Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// every(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): boolean; +// every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; // /** // * Returns the elements of an array that meet the condition specified in a callback function. // * @param predicate A function that accepts up to three arguments. The filter method calls @@ -4195,7 +4201,7 @@ interface Int16Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// filter(predicate: (value: number, index: number, array: Int16Array) => any, thisArg?: any): Int16Array; +// filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int16Array; // /** // * Returns the value of the first element in the array where predicate is true, and undefined // * otherwise. @@ -4205,7 +4211,7 @@ interface Int16Array { // * @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. // */ -// find(predicate: (value: number, index: number, obj: Int16Array) => boolean, thisArg?: any): number | undefined; +// find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; // /** // * Returns the index of the first element in the array where predicate is true, and -1 // * otherwise. @@ -4215,7 +4221,7 @@ interface Int16Array { // * @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. // */ -// findIndex(predicate: (value: number, index: number, obj: Int16Array) => boolean, thisArg?: any): number; +// findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; // /** // * Performs the specified action for each element in an array. // * @param callbackfn A function that accepts up to three arguments. forEach calls the @@ -4223,7 +4229,7 @@ interface Int16Array { // * @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. // */ -// forEach(callbackfn: (value: number, index: number, array: Int16Array) => void, thisArg?: any): void; +// forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; // /** // * Calls a defined callback function on each element of an array, and returns an array that // * contains the results. @@ -4232,7 +4238,7 @@ interface Int16Array { // * @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. // */ -// map(callbackfn: (value: number, index: number, array: Int16Array) => number, thisArg?: any): Int16Array; +// map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int16Array; // /** // * 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 @@ -4243,8 +4249,8 @@ interface Int16Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number): number; -// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue: number): number; +// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; +// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; // /** // * 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 @@ -4255,7 +4261,7 @@ interface Int16Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U; +// reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; // /** // * 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 @@ -4266,8 +4272,8 @@ interface Int16Array { // * the accumulation. The first call to the callbackfn function provides this value as an // * argument instead of an array value. // */ -// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number): number; -// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue: number): number; +// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; +// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; // /** // * 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 @@ -4278,7 +4284,7 @@ interface Int16Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U; +// reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; // /** // * Determines whether the specified callback function returns true for any element of an array. // * @param predicate A function that accepts up to three arguments. The some method calls @@ -4287,17 +4293,18 @@ interface Int16Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// some(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): boolean; +// some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; interface Int16ArrayConstructor { - readonly prototype: Int16Array; - new (length: number): Int16Array; - new (array: ArrayLike | ArrayBufferLike): Int16Array; - new ( - buffer: ArrayBufferLike, + readonly prototype: Int16Array; + new (length: number): Int16Array; + new (array: ArrayLike): Int16Array; + new ( + buffer: TArrayBuffer, byteOffset?: number, length?: number, - ): Int16Array; + ): Int16Array; + new (array: ArrayLike | ArrayBuffer): Int16Array; /** * The size in bytes of each element in the array. @@ -4308,12 +4315,12 @@ interface Int16ArrayConstructor { * Returns a new array from a set of elements. * @param items A set of elements to include in the new array object. */ - of(...items: number[]): Int16Array; + of(...items: number[]): Int16Array; /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Int16Array; + from(arrayLike: ArrayLike): Int16Array; /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. @@ -4324,20 +4331,20 @@ interface Int16ArrayConstructor { arrayLike: ArrayLike, mapfn: (this: This, v: T, k: number) => number, thisArg?: This, - ): Int16Array; + ): Int16Array; } // /** // * Creates an array from an array-like or iterable object. // * @param arrayLike An array-like or iterable object to convert to an array. // */ -// from(arrayLike: ArrayLike): Int16Array; +// from(arrayLike: ArrayLike): Int16Array; // /** // * Creates an array from an array-like or iterable object. // * @param arrayLike An array-like or iterable object to convert to an array. // * @param mapfn A mapping function to call on every element of the array. // * @param thisArg Value of 'this' used to invoke the mapfn. // */ -// from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; +// from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; declare var Int16Array: Int16ArrayConstructor; @@ -4345,7 +4352,7 @@ declare var Int16Array: Int16ArrayConstructor; * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the * requested number of bytes could not be allocated an exception is raised. */ -interface Uint16Array { +interface Uint16Array { /** * The size in bytes of each element in the array. */ @@ -4354,7 +4361,7 @@ interface Uint16Array { /** * The ArrayBuffer instance referenced by the array. */ - readonly buffer: ArrayBufferLike; + readonly buffer: TArrayBuffer; /** * The length in bytes of the array. @@ -4573,7 +4580,7 @@ interface Uint16Array { /** * Reverses the elements in an Array. */ - reverse(): Uint16Array; + reverse(): this; /** * Sets a value or an array of values. @@ -4587,7 +4594,7 @@ interface Uint16Array { * @param start The beginning of the specified portion of the array. * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. */ - slice(start?: number, end?: number): Uint16Array; + slice(start?: number, end?: number): Uint16Array; /** * Determines whether the specified callback function returns true for any element of an array. * @param predicate A function that accepts up to three arguments. The some method calls @@ -4623,7 +4630,7 @@ interface Uint16Array { * @param begin The index of the beginning of the array. * @param end The index of the end of the array. */ - subarray(begin?: number, end?: number): Uint16Array; + subarray(begin?: number, end?: number): Uint16Array; /** * Converts a number to a string by using the current locale. @@ -4636,7 +4643,7 @@ interface Uint16Array { toString(): string; /** Returns the primitive value of the specified object. */ - valueOf(): Uint16Array; + valueOf(): this; [index: number]: number; } @@ -4648,7 +4655,7 @@ interface Uint16Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// every(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): boolean; +// every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; // /** // * Returns the elements of an array that meet the condition specified in a callback function. // * @param predicate A function that accepts up to three arguments. The filter method calls @@ -4656,7 +4663,7 @@ interface Uint16Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// filter(predicate: (value: number, index: number, array: Uint16Array) => any, thisArg?: any): Uint16Array; +// filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint16Array; // /** // * Returns the value of the first element in the array where predicate is true, and undefined // * otherwise. @@ -4666,7 +4673,7 @@ interface Uint16Array { // * @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. // */ -// find(predicate: (value: number, index: number, obj: Uint16Array) => boolean, thisArg?: any): number | undefined; +// find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; // /** // * Returns the index of the first element in the array where predicate is true, and -1 // * otherwise. @@ -4676,7 +4683,7 @@ interface Uint16Array { // * @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. // */ -// findIndex(predicate: (value: number, index: number, obj: Uint16Array) => boolean, thisArg?: any): number; +// findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; // /** // * Performs the specified action for each element in an array. // * @param callbackfn A function that accepts up to three arguments. forEach calls the @@ -4684,7 +4691,7 @@ interface Uint16Array { // * @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. // */ -// forEach(callbackfn: (value: number, index: number, array: Uint16Array) => void, thisArg?: any): void; +// forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; // /** // * Calls a defined callback function on each element of an array, and returns an array that // * contains the results. @@ -4693,7 +4700,7 @@ interface Uint16Array { // * @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. // */ -// map(callbackfn: (value: number, index: number, array: Uint16Array) => number, thisArg?: any): Uint16Array; +// map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint16Array; // /** // * 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 @@ -4704,8 +4711,8 @@ interface Uint16Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number): number; -// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue: number): number; +// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; +// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; // /** // * 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 @@ -4716,7 +4723,7 @@ interface Uint16Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U; +// reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; // /** // * 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 @@ -4727,8 +4734,8 @@ interface Uint16Array { // * the accumulation. The first call to the callbackfn function provides this value as an // * argument instead of an array value. // */ -// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number): number; -// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue: number): number; +// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; +// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; // /** // * 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 @@ -4739,7 +4746,7 @@ interface Uint16Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U; +// reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; // /** // * Determines whether the specified callback function returns true for any element of an array. // * @param predicate A function that accepts up to three arguments. The some method calls @@ -4748,17 +4755,18 @@ interface Uint16Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// some(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): boolean; +// some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; interface Uint16ArrayConstructor { - readonly prototype: Uint16Array; - new (length: number): Uint16Array; - new (array: ArrayLike | ArrayBufferLike): Uint16Array; - new ( - buffer: ArrayBufferLike, + readonly prototype: Uint16Array; + new (length: number): Uint16Array; + new (array: ArrayLike): Uint16Array; + new ( + buffer: TArrayBuffer, byteOffset?: number, length?: number, - ): Uint16Array; + ): Uint16Array; + new (array: ArrayLike | ArrayBuffer): Uint16Array; /** * The size in bytes of each element in the array. @@ -4769,12 +4777,12 @@ interface Uint16ArrayConstructor { * Returns a new array from a set of elements. * @param items A set of elements to include in the new array object. */ - of(...items: number[]): Uint16Array; + of(...items: number[]): Uint16Array; /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Uint16Array; + from(arrayLike: ArrayLike): Uint16Array; /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. @@ -4785,27 +4793,27 @@ interface Uint16ArrayConstructor { arrayLike: ArrayLike, mapfn: (this: This, v: T, k: number) => number, thisArg?: This, - ): Uint16Array; + ): Uint16Array; } // /** // * Creates an array from an array-like or iterable object. // * @param arrayLike An array-like or iterable object to convert to an array. // */ -// from(arrayLike: ArrayLike): Uint16Array; +// from(arrayLike: ArrayLike): Uint16Array; // /** // * Creates an array from an array-like or iterable object. // * @param arrayLike An array-like or iterable object to convert to an array. // * @param mapfn A mapping function to call on every element of the array. // * @param thisArg Value of 'this' used to invoke the mapfn. // */ -// from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; +// from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; declare var Uint16Array: Uint16ArrayConstructor; /** * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the * requested number of bytes could not be allocated an exception is raised. */ -interface Int32Array { +interface Int32Array { /** * The size in bytes of each element in the array. */ @@ -4814,7 +4822,7 @@ interface Int32Array { /** * The ArrayBuffer instance referenced by the array. */ - readonly buffer: ArrayBufferLike; + readonly buffer: TArrayBuffer; /** * The length in bytes of the array. @@ -5033,7 +5041,7 @@ interface Int32Array { /** * Reverses the elements in an Array. */ - reverse(): Int32Array; + reverse(): this; /** * Sets a value or an array of values. @@ -5047,7 +5055,7 @@ interface Int32Array { * @param start The beginning of the specified portion of the array. * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. */ - slice(start?: number, end?: number): Int32Array; + slice(start?: number, end?: number): Int32Array; /** * Determines whether the specified callback function returns true for any element of an array. * @param predicate A function that accepts up to three arguments. The some method calls @@ -5083,7 +5091,7 @@ interface Int32Array { * @param begin The index of the beginning of the array. * @param end The index of the end of the array. */ - subarray(begin?: number, end?: number): Int32Array; + subarray(begin?: number, end?: number): Int32Array; /** * Converts a number to a string by using the current locale. @@ -5096,7 +5104,7 @@ interface Int32Array { toString(): string; /** Returns the primitive value of the specified object. */ - valueOf(): Int32Array; + valueOf(): this; [index: number]: number; } @@ -5108,7 +5116,7 @@ interface Int32Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// every(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): boolean; +// every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; // /** // * Returns the elements of an array that meet the condition specified in a callback function. // * @param predicate A function that accepts up to three arguments. The filter method calls @@ -5116,7 +5124,7 @@ interface Int32Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// filter(predicate: (value: number, index: number, array: Int32Array) => any, thisArg?: any): Int32Array; +// filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Int32Array; // /** // * Returns the value of the first element in the array where predicate is true, and undefined // * otherwise. @@ -5126,7 +5134,7 @@ interface Int32Array { // * @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. // */ -// find(predicate: (value: number, index: number, obj: Int32Array) => boolean, thisArg?: any): number | undefined; +// find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; // /** // * Returns the index of the first element in the array where predicate is true, and -1 // * otherwise. @@ -5136,7 +5144,7 @@ interface Int32Array { // * @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. // */ -// findIndex(predicate: (value: number, index: number, obj: Int32Array) => boolean, thisArg?: any): number; +// findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; // /** // * Performs the specified action for each element in an array. // * @param callbackfn A function that accepts up to three arguments. forEach calls the @@ -5144,7 +5152,7 @@ interface Int32Array { // * @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. // */ -// forEach(callbackfn: (value: number, index: number, array: Int32Array) => void, thisArg?: any): void; +// forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; // /** // * Calls a defined callback function on each element of an array, and returns an array that // * contains the results. @@ -5153,7 +5161,7 @@ interface Int32Array { // * @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. // */ -// map(callbackfn: (value: number, index: number, array: Int32Array) => number, thisArg?: any): Int32Array; +// map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Int32Array; // /** // * 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 @@ -5164,8 +5172,8 @@ interface Int32Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number): number; -// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue: number): number; +// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; +// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; // /** // * 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 @@ -5176,7 +5184,7 @@ interface Int32Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U; +// reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; // /** // * 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 @@ -5187,8 +5195,8 @@ interface Int32Array { // * the accumulation. The first call to the callbackfn function provides this value as an // * argument instead of an array value. // */ -// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number): number; -// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue: number): number; +// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; +// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; // /** // * 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 @@ -5199,7 +5207,7 @@ interface Int32Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U; +// reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; // /** // * Determines whether the specified callback function returns true for any element of an array. // * @param predicate A function that accepts up to three arguments. The some method calls @@ -5208,17 +5216,18 @@ interface Int32Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// some(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): boolean; +// some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; interface Int32ArrayConstructor { - readonly prototype: Int32Array; - new (length: number): Int32Array; - new (array: ArrayLike | ArrayBufferLike): Int32Array; - new ( - buffer: ArrayBufferLike, + readonly prototype: Int32Array; + new (length: number): Int32Array; + new (array: ArrayLike): Int32Array; + new ( + buffer: TArrayBuffer, byteOffset?: number, length?: number, - ): Int32Array; + ): Int32Array; + new (array: ArrayLike | ArrayBuffer): Int32Array; /** * The size in bytes of each element in the array. @@ -5229,12 +5238,12 @@ interface Int32ArrayConstructor { * Returns a new array from a set of elements. * @param items A set of elements to include in the new array object. */ - of(...items: number[]): Int32Array; + of(...items: number[]): Int32Array; /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Int32Array; + from(arrayLike: ArrayLike): Int32Array; /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. @@ -5245,20 +5254,20 @@ interface Int32ArrayConstructor { arrayLike: ArrayLike, mapfn: (this: This, v: T, k: number) => number, thisArg?: This, - ): Int32Array; + ): Int32Array; } // /** // * Creates an array from an array-like or iterable object. // * @param arrayLike An array-like or iterable object to convert to an array. // */ -// from(arrayLike: ArrayLike): Int32Array; +// from(arrayLike: ArrayLike): Int32Array; // /** // * Creates an array from an array-like or iterable object. // * @param arrayLike An array-like or iterable object to convert to an array. // * @param mapfn A mapping function to call on every element of the array. // * @param thisArg Value of 'this' used to invoke the mapfn. // */ -// from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; +// from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; declare var Int32Array: Int32ArrayConstructor; @@ -5266,7 +5275,7 @@ declare var Int32Array: Int32ArrayConstructor; * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the * requested number of bytes could not be allocated an exception is raised. */ -interface Uint32Array { +interface Uint32Array { /** * The size in bytes of each element in the array. */ @@ -5275,7 +5284,7 @@ interface Uint32Array { /** * The ArrayBuffer instance referenced by the array. */ - readonly buffer: ArrayBufferLike; + readonly buffer: TArrayBuffer; /** * The length in bytes of the array. @@ -5493,7 +5502,7 @@ interface Uint32Array { /** * Reverses the elements in an Array. */ - reverse(): Uint32Array; + reverse(): this; /** * Sets a value or an array of values. @@ -5507,7 +5516,7 @@ interface Uint32Array { * @param start The beginning of the specified portion of the array. * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. */ - slice(start?: number, end?: number): Uint32Array; + slice(start?: number, end?: number): Uint32Array; /** * Determines whether the specified callback function returns true for any element of an array. * @param predicate A function that accepts up to three arguments. The some method calls @@ -5543,7 +5552,7 @@ interface Uint32Array { * @param begin The index of the beginning of the array. * @param end The index of the end of the array. */ - subarray(begin?: number, end?: number): Uint32Array; + subarray(begin?: number, end?: number): Uint32Array; /** * Converts a number to a string by using the current locale. @@ -5556,7 +5565,7 @@ interface Uint32Array { toString(): string; /** Returns the primitive value of the specified object. */ - valueOf(): Uint32Array; + valueOf(): this; [index: number]: number; } @@ -5568,7 +5577,7 @@ interface Uint32Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// every(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): boolean; +// every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; // /** // * Returns the elements of an array that meet the condition specified in a callback function. // * @param predicate A function that accepts up to three arguments. The filter method calls @@ -5576,7 +5585,7 @@ interface Uint32Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// filter(predicate: (value: number, index: number, array: Uint32Array) => any, thisArg?: any): Uint32Array; +// filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Uint32Array; // /** // * Returns the value of the first element in the array where predicate is true, and undefined // * otherwise. @@ -5586,7 +5595,7 @@ interface Uint32Array { // * @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. // */ -// find(predicate: (value: number, index: number, obj: Uint32Array) => boolean, thisArg?: any): number | undefined; +// find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; // /** // * Returns the index of the first element in the array where predicate is true, and -1 // * otherwise. @@ -5596,7 +5605,7 @@ interface Uint32Array { // * @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. // */ -// findIndex(predicate: (value: number, index: number, obj: Uint32Array) => boolean, thisArg?: any): number; +// findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; // /** // * Performs the specified action for each element in an array. // * @param callbackfn A function that accepts up to three arguments. forEach calls the @@ -5604,7 +5613,7 @@ interface Uint32Array { // * @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. // */ -// forEach(callbackfn: (value: number, index: number, array: Uint32Array) => void, thisArg?: any): void; +// forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; // /** // * Calls a defined callback function on each element of an array, and returns an array that // * contains the results. @@ -5613,7 +5622,7 @@ interface Uint32Array { // * @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. // */ -// map(callbackfn: (value: number, index: number, array: Uint32Array) => number, thisArg?: any): Uint32Array; +// map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Uint32Array; // /** // * 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 @@ -5624,8 +5633,8 @@ interface Uint32Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number): number; -// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue: number): number; +// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; +// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; // /** // * 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 @@ -5636,7 +5645,7 @@ interface Uint32Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U; +// reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; // /** // * 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 @@ -5647,8 +5656,8 @@ interface Uint32Array { // * the accumulation. The first call to the callbackfn function provides this value as an // * argument instead of an array value. // */ -// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number): number; -// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue: number): number; +// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; +// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; // /** // * 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 @@ -5659,7 +5668,7 @@ interface Uint32Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U; +// reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; // /** // * Determines whether the specified callback function returns true for any element of an array. // * @param predicate A function that accepts up to three arguments. The some method calls @@ -5668,17 +5677,18 @@ interface Uint32Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// some(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): boolean; +// some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; interface Uint32ArrayConstructor { - readonly prototype: Uint32Array; - new (length: number): Uint32Array; - new (array: ArrayLike | ArrayBufferLike): Uint32Array; - new ( - buffer: ArrayBufferLike, + readonly prototype: Uint32Array; + new (length: number): Uint32Array; + new (array: ArrayLike): Uint32Array; + new ( + buffer: TArrayBuffer, byteOffset?: number, length?: number, - ): Uint32Array; + ): Uint32Array; + new (array: ArrayLike | ArrayBuffer): Uint32Array; /** * The size in bytes of each element in the array. @@ -5689,12 +5699,12 @@ interface Uint32ArrayConstructor { * Returns a new array from a set of elements. * @param items A set of elements to include in the new array object. */ - of(...items: number[]): Uint32Array; + of(...items: number[]): Uint32Array; /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Uint32Array; + from(arrayLike: ArrayLike): Uint32Array; /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. @@ -5705,20 +5715,20 @@ interface Uint32ArrayConstructor { arrayLike: ArrayLike, mapfn: (this: This, v: T, k: number) => number, thisArg?: This, - ): Uint32Array; + ): Uint32Array; } // /** // * Creates an array from an array-like or iterable object. // * @param arrayLike An array-like or iterable object to convert to an array. // */ -// from(arrayLike: ArrayLike): Uint32Array; +// from(arrayLike: ArrayLike): Uint32Array; // /** // * Creates an array from an array-like or iterable object. // * @param arrayLike An array-like or iterable object to convert to an array. // * @param mapfn A mapping function to call on every element of the array. // * @param thisArg Value of 'this' used to invoke the mapfn. // */ -// from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; +// from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; declare var Uint32Array: Uint32ArrayConstructor; @@ -5726,7 +5736,7 @@ declare var Uint32Array: Uint32ArrayConstructor; * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number * of bytes could not be allocated an exception is raised. */ -interface Float32Array { +interface Float32Array { /** * The size in bytes of each element in the array. */ @@ -5735,7 +5745,7 @@ interface Float32Array { /** * The ArrayBuffer instance referenced by the array. */ - readonly buffer: ArrayBufferLike; + readonly buffer: TArrayBuffer; /** * The length in bytes of the array. @@ -5954,7 +5964,7 @@ interface Float32Array { /** * Reverses the elements in an Array. */ - reverse(): Float32Array; + reverse(): this; /** * Sets a value or an array of values. @@ -5968,7 +5978,7 @@ interface Float32Array { * @param start The beginning of the specified portion of the array. * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. */ - slice(start?: number, end?: number): Float32Array; + slice(start?: number, end?: number): Float32Array; /** * Determines whether the specified callback function returns true for any element of an array. * @param predicate A function that accepts up to three arguments. The some method calls @@ -6004,7 +6014,7 @@ interface Float32Array { * @param begin The index of the beginning of the array. * @param end The index of the end of the array. */ - subarray(begin?: number, end?: number): Float32Array; + subarray(begin?: number, end?: number): Float32Array; /** * Converts a number to a string by using the current locale. @@ -6017,7 +6027,7 @@ interface Float32Array { toString(): string; /** Returns the primitive value of the specified object. */ - valueOf(): Float32Array; + valueOf(): this; [index: number]: number; } @@ -6029,7 +6039,7 @@ interface Float32Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// every(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): boolean; +// every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; // /** // * Returns the elements of an array that meet the condition specified in a callback function. // * @param predicate A function that accepts up to three arguments. The filter method calls @@ -6037,7 +6047,7 @@ interface Float32Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// filter(predicate: (value: number, index: number, array: Float32Array) => any, thisArg?: any): Float32Array; +// filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float32Array; // /** // * Returns the value of the first element in the array where predicate is true, and undefined // * otherwise. @@ -6047,7 +6057,7 @@ interface Float32Array { // * @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. // */ -// find(predicate: (value: number, index: number, obj: Float32Array) => boolean, thisArg?: any): number | undefined; +// find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; // /** // * Returns the index of the first element in the array where predicate is true, and -1 // * otherwise. @@ -6057,7 +6067,7 @@ interface Float32Array { // * @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. // */ -// findIndex(predicate: (value: number, index: number, obj: Float32Array) => boolean, thisArg?: any): number; +// findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; // /** // * Performs the specified action for each element in an array. // * @param callbackfn A function that accepts up to three arguments. forEach calls the @@ -6065,7 +6075,7 @@ interface Float32Array { // * @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. // */ -// forEach(callbackfn: (value: number, index: number, array: Float32Array) => void, thisArg?: any): void; +// forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; // /** // * Calls a defined callback function on each element of an array, and returns an array that // * contains the results. @@ -6074,7 +6084,7 @@ interface Float32Array { // * @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. // */ -// map(callbackfn: (value: number, index: number, array: Float32Array) => number, thisArg?: any): Float32Array; +// map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float32Array; // /** // * 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 @@ -6085,8 +6095,8 @@ interface Float32Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number): number; -// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue: number): number; +// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; +// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; // /** // * 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 @@ -6097,7 +6107,7 @@ interface Float32Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U; +// reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; // /** // * 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 @@ -6108,8 +6118,8 @@ interface Float32Array { // * the accumulation. The first call to the callbackfn function provides this value as an // * argument instead of an array value. // */ -// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number): number; -// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue: number): number; +// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; +// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; // /** // * 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 @@ -6120,7 +6130,7 @@ interface Float32Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U; +// reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; // /** // * Determines whether the specified callback function returns true for any element of an array. // * @param predicate A function that accepts up to three arguments. The some method calls @@ -6129,17 +6139,18 @@ interface Float32Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// some(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): boolean; +// some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; interface Float32ArrayConstructor { - readonly prototype: Float32Array; - new (length: number): Float32Array; - new (array: ArrayLike | ArrayBufferLike): Float32Array; - new ( - buffer: ArrayBufferLike, + readonly prototype: Float32Array; + new (length: number): Float32Array; + new (array: ArrayLike): Float32Array; + new ( + buffer: TArrayBuffer, byteOffset?: number, length?: number, - ): Float32Array; + ): Float32Array; + new (array: ArrayLike | ArrayBuffer): Float32Array; /** * The size in bytes of each element in the array. @@ -6150,12 +6161,12 @@ interface Float32ArrayConstructor { * Returns a new array from a set of elements. * @param items A set of elements to include in the new array object. */ - of(...items: number[]): Float32Array; + of(...items: number[]): Float32Array; /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Float32Array; + from(arrayLike: ArrayLike): Float32Array; /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. @@ -6166,20 +6177,20 @@ interface Float32ArrayConstructor { arrayLike: ArrayLike, mapfn: (this: This, v: T, k: number) => number, thisArg?: This, - ): Float32Array; + ): Float32Array; } // /** // * Creates an array from an array-like or iterable object. // * @param arrayLike An array-like or iterable object to convert to an array. // */ -// from(arrayLike: ArrayLike): Float32Array; +// from(arrayLike: ArrayLike): Float32Array; // /** // * Creates an array from an array-like or iterable object. // * @param arrayLike An array-like or iterable object to convert to an array. // * @param mapfn A mapping function to call on every element of the array. // * @param thisArg Value of 'this' used to invoke the mapfn. // */ -// from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; +// from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; declare var Float32Array: Float32ArrayConstructor; @@ -6187,7 +6198,7 @@ declare var Float32Array: Float32ArrayConstructor; * A typed array of 64-bit float values. The contents are initialized to 0. If the requested * number of bytes could not be allocated an exception is raised. */ -interface Float64Array { +interface Float64Array { /** * The size in bytes of each element in the array. */ @@ -6196,7 +6207,7 @@ interface Float64Array { /** * The ArrayBuffer instance referenced by the array. */ - readonly buffer: ArrayBufferLike; + readonly buffer: TArrayBuffer; /** * The length in bytes of the array. @@ -6415,7 +6426,7 @@ interface Float64Array { /** * Reverses the elements in an Array. */ - reverse(): Float64Array; + reverse(): this; /** * Sets a value or an array of values. @@ -6429,7 +6440,7 @@ interface Float64Array { * @param start The beginning of the specified portion of the array. * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'. */ - slice(start?: number, end?: number): Float64Array; + slice(start?: number, end?: number): Float64Array; /** * Determines whether the specified callback function returns true for any element of an array. * @param predicate A function that accepts up to three arguments. The some method calls @@ -6465,7 +6476,7 @@ interface Float64Array { * @param begin The index of the beginning of the array. * @param end The index of the end of the array. */ - subarray(begin?: number, end?: number): Float64Array; + subarray(begin?: number, end?: number): Float64Array; /** * Converts a number to a string by using the current locale. @@ -6478,7 +6489,7 @@ interface Float64Array { toString(): string; /** Returns the primitive value of the specified object. */ - valueOf(): Float64Array; + valueOf(): this; [index: number]: number; } @@ -6490,7 +6501,7 @@ interface Float64Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// every(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): boolean; +// every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; // /** // * Returns the elements of an array that meet the condition specified in a callback function. // * @param predicate A function that accepts up to three arguments. The filter method calls @@ -6498,7 +6509,7 @@ interface Float64Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// filter(predicate: (value: number, index: number, array: Float64Array) => any, thisArg?: any): Float64Array; +// filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float64Array; // /** // * Returns the value of the first element in the array where predicate is true, and undefined // * otherwise. @@ -6508,7 +6519,7 @@ interface Float64Array { // * @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. // */ -// find(predicate: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any): number | undefined; +// find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined; // /** // * Returns the index of the first element in the array where predicate is true, and -1 // * otherwise. @@ -6518,7 +6529,7 @@ interface Float64Array { // * @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. // */ -// findIndex(predicate: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any): number; +// findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number; // /** // * Performs the specified action for each element in an array. // * @param callbackfn A function that accepts up to three arguments. forEach calls the @@ -6526,7 +6537,7 @@ interface Float64Array { // * @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. // */ -// forEach(callbackfn: (value: number, index: number, array: Float64Array) => void, thisArg?: any): void; +// forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void; // /** // * Calls a defined callback function on each element of an array, and returns an array that // * contains the results. @@ -6535,7 +6546,7 @@ interface Float64Array { // * @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. // */ -// map(callbackfn: (value: number, index: number, array: Float64Array) => number, thisArg?: any): Float64Array; +// map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float64Array; // /** // * 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 @@ -6546,8 +6557,8 @@ interface Float64Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number): number; -// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue: number): number; +// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; +// reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; // /** // * 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 @@ -6558,7 +6569,7 @@ interface Float64Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U; +// reduce(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; // /** // * 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 @@ -6569,8 +6580,8 @@ interface Float64Array { // * the accumulation. The first call to the callbackfn function provides this value as an // * argument instead of an array value. // */ -// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number): number; -// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue: number): number; +// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number; +// reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number; // /** // * 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 @@ -6581,7 +6592,7 @@ interface Float64Array { // * the accumulation. The first call to the callbackfn function provides this value as an argument // * instead of an array value. // */ -// reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U; +// reduceRight(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U; // /** // * Determines whether the specified callback function returns true for any element of an array. // * @param predicate A function that accepts up to three arguments. The some method calls @@ -6590,17 +6601,18 @@ interface Float64Array { // * @param thisArg An object to which the this keyword can refer in the predicate function. // * If thisArg is omitted, undefined is used as the this value. // */ -// some(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): boolean; +// some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean; interface Float64ArrayConstructor { - readonly prototype: Float64Array; - new (length: number): Float64Array; - new (array: ArrayLike | ArrayBufferLike): Float64Array; - new ( - buffer: ArrayBufferLike, + readonly prototype: Float64Array; + new (length: number): Float64Array; + new (array: ArrayLike): Float64Array; + new ( + buffer: TArrayBuffer, byteOffset?: number, length?: number, - ): Float64Array; + ): Float64Array; + new (array: ArrayLike | ArrayBuffer): Float64Array; /** * The size in bytes of each element in the array. @@ -6611,12 +6623,12 @@ interface Float64ArrayConstructor { * Returns a new array from a set of elements. * @param items A set of elements to include in the new array object. */ - of(...items: number[]): Float64Array; + of(...items: number[]): Float64Array; /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): Float64Array; + from(arrayLike: ArrayLike): Float64Array; /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. @@ -6627,20 +6639,20 @@ interface Float64ArrayConstructor { arrayLike: ArrayLike, mapfn: (this: This, v: T, k: number) => number, thisArg?: This, - ): Float64Array; + ): Float64Array; } // /** // * Creates an array from an array-like or iterable object. // * @param arrayLike An array-like or iterable object to convert to an array. // */ -// from(arrayLike: ArrayLike): Float64Array; +// from(arrayLike: ArrayLike): Float64Array; // /** // * Creates an array from an array-like or iterable object. // * @param arrayLike An array-like or iterable object to convert to an array. // * @param mapfn A mapping function to call on every element of the array. // * @param thisArg Value of 'this' used to invoke the mapfn. // */ -// from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; +// from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; declare var Float64Array: Float64ArrayConstructor; diff --git a/generated/lib.esnext.array.d.ts b/generated/lib.esnext.array.d.ts index b3fec56..1d7b4dc 100644 --- a/generated/lib.esnext.array.d.ts +++ b/generated/lib.esnext.array.d.ts @@ -21,7 +21,7 @@ interface ArrayConstructor { */ fromAsync( iterableOrArrayLike: AsyncIterable | Iterable | ArrayLike, - mapFn: (value: Awaited) => U, + mapFn: (value: Awaited, index: number) => U, thisArg?: any, ): Promise[]>; } diff --git a/generated/lib.esnext.collection.d.ts b/generated/lib.esnext.collection.d.ts index d838823..62b13c5 100644 --- a/generated/lib.esnext.collection.d.ts +++ b/generated/lib.esnext.collection.d.ts @@ -1,15 +1,5 @@ /// -interface MapConstructor { - /** - * Groups members of an iterable according to the return value of the passed callback. - * @param items An iterable. - * @param keySelector A callback which will be invoked for each item in items. - */ - groupBy( - items: Iterable, - keySelector: (item: T, index: number) => K, - ): Map; -} +/// interface ReadonlySetLike { /** diff --git a/generated/lib.esnext.d.ts b/generated/lib.esnext.d.ts index ea5d68f..b1b9223 100644 --- a/generated/lib.esnext.d.ts +++ b/generated/lib.esnext.d.ts @@ -1,12 +1,8 @@ /// -/// +/// /// /// /// -/// -/// /// /// -/// -/// /// diff --git a/generated/lib.webworker.d.ts b/generated/lib.webworker.d.ts index c6e52b7..dfe489e 100644 --- a/generated/lib.webworker.d.ts +++ b/generated/lib.webworker.d.ts @@ -48,6 +48,59 @@ interface AudioConfiguration { spatialRendering?: boolean; } +interface AudioDataCopyToOptions { + format?: AudioSampleFormat; + frameCount?: number; + frameOffset?: number; + planeIndex: number; +} + +interface AudioDataInit { + data: BufferSource; + format: AudioSampleFormat; + numberOfChannels: number; + numberOfFrames: number; + sampleRate: number; + timestamp: number; + transfer?: ArrayBuffer[]; +} + +interface AudioDecoderConfig { + codec: string; + description?: BufferSource; + numberOfChannels: number; + sampleRate: number; +} + +interface AudioDecoderInit { + error: WebCodecsErrorCallback; + output: AudioDataOutputCallback; +} + +interface AudioDecoderSupport { + config?: AudioDecoderConfig; + supported?: boolean; +} + +interface AudioEncoderConfig { + bitrate?: number; + bitrateMode?: BitrateMode; + codec: string; + numberOfChannels: number; + opus?: OpusEncoderConfig; + sampleRate: number; +} + +interface AudioEncoderInit { + error: WebCodecsErrorCallback; + output: EncodedAudioChunkOutputCallback; +} + +interface AudioEncoderSupport { + config?: AudioEncoderConfig; + supported?: boolean; +} + interface AvcEncoderConfig { format?: AvcBitstreamFormat; } @@ -164,6 +217,18 @@ interface EcdsaParams extends Algorithm { hash: HashAlgorithmIdentifier; } +interface EncodedAudioChunkInit { + data: AllowSharedBufferSource; + duration?: number; + timestamp: number; + transfer?: ArrayBuffer[]; + type: EncodedAudioChunkType; +} + +interface EncodedAudioChunkMetadata { + decoderConfig?: AudioDecoderConfig; +} + interface EncodedVideoChunkInit { data: AllowSharedBufferSource; duration?: number; @@ -430,6 +495,15 @@ interface NotificationOptions { tag?: string; } +interface OpusEncoderConfig { + complexity?: number; + format?: OpusBitstreamFormat; + frameDuration?: number; + packetlossperc?: number; + usedtx?: boolean; + useinbandfec?: boolean; +} + interface Pbkdf2Params extends Algorithm { hash: HashAlgorithmIdentifier; iterations: number; @@ -752,6 +826,7 @@ interface VideoConfiguration { colorGamut?: ColorGamut; contentType: string; framerate: number; + hasAlphaChannel?: boolean; hdrMetadataType?: HdrMetadataType; height: number; scalabilityMode?: string; @@ -787,6 +862,7 @@ interface VideoEncoderConfig { bitrate?: number; bitrateMode?: VideoEncoderBitrateMode; codec: string; + contentHint?: string; displayHeight?: number; displayWidth?: number; framerate?: number; @@ -798,9 +874,14 @@ interface VideoEncoderConfig { } interface VideoEncoderEncodeOptions { + avc?: VideoEncoderEncodeOptionsForAvc; keyFrame?: boolean; } +interface VideoEncoderEncodeOptionsForAvc { + quantizer?: number | null; +} + interface VideoEncoderInit { error: WebCodecsErrorCallback; output: EncodedVideoChunkOutputCallback; @@ -825,6 +906,8 @@ interface VideoFrameBufferInit { } interface VideoFrameCopyToOptions { + colorSpace?: PredefinedColorSpace; + format?: VideoPixelFormat; layout?: PlaneLayout[]; rect?: DOMRectInit; } @@ -1035,6 +1118,148 @@ interface AnimationFrameProvider { requestAnimationFrame(callback: FrameRequestCallback): number; } +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData) */ +interface AudioData { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/duration) */ + readonly duration: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/format) */ + readonly format: AudioSampleFormat | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/numberOfChannels) */ + readonly numberOfChannels: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/numberOfFrames) */ + readonly numberOfFrames: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/sampleRate) */ + readonly sampleRate: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/timestamp) */ + readonly timestamp: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/allocationSize) */ + allocationSize(options: AudioDataCopyToOptions): number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/clone) */ + clone(): AudioData; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/close) */ + close(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/copyTo) */ + copyTo( + destination: AllowSharedBufferSource, + options: AudioDataCopyToOptions, + ): void; +} + +declare var AudioData: { + prototype: AudioData; + new (init: AudioDataInit): AudioData; +}; + +interface AudioDecoderEventMap { + dequeue: Event; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder) + */ +interface AudioDecoder extends EventTarget { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/decodeQueueSize) */ + readonly decodeQueueSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/dequeue_event) */ + ondequeue: ((this: AudioDecoder, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/state) */ + readonly state: CodecState; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/close) */ + close(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/configure) */ + configure(config: AudioDecoderConfig): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/decode) */ + decode(chunk: EncodedAudioChunk): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/flush) */ + flush(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/reset) */ + reset(): void; + addEventListener( + type: K, + listener: (this: AudioDecoder, ev: AudioDecoderEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: AudioDecoder, ev: AudioDecoderEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions, + ): void; +} + +declare var AudioDecoder: { + prototype: AudioDecoder; + new (init: AudioDecoderInit): AudioDecoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/isConfigSupported_static) */ + isConfigSupported(config: AudioDecoderConfig): Promise; +}; + +interface AudioEncoderEventMap { + dequeue: Event; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder) + */ +interface AudioEncoder extends EventTarget { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/encodeQueueSize) */ + readonly encodeQueueSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/dequeue_event) */ + ondequeue: ((this: AudioEncoder, ev: Event) => any) | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/state) */ + readonly state: CodecState; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/close) */ + close(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/configure) */ + configure(config: AudioEncoderConfig): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/encode) */ + encode(data: AudioData): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/flush) */ + flush(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/reset) */ + reset(): void; + addEventListener( + type: K, + listener: (this: AudioEncoder, ev: AudioEncoderEventMap[K]) => any, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | AddEventListenerOptions, + ): void; + removeEventListener( + type: K, + listener: (this: AudioEncoder, ev: AudioEncoderEventMap[K]) => any, + options?: boolean | EventListenerOptions, + ): void; + removeEventListener( + type: string, + listener: EventListenerOrEventListenerObject, + options?: boolean | EventListenerOptions, + ): void; +} + +declare var AudioEncoder: { + prototype: AudioEncoder; + new (init: AudioEncoderInit): AudioEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/isConfigSupported_static) */ + isConfigSupported(config: AudioEncoderConfig): Promise; +}; + /** * A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system. * @@ -1047,6 +1272,8 @@ interface Blob { readonly type: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */ arrayBuffer(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/bytes) */ + bytes(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */ slice(start?: number, end?: number, contentType?: string): Blob; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */ @@ -1069,6 +1296,8 @@ interface Body { arrayBuffer(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */ blob(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bytes) */ + bytes(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */ formData(): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/json) */ @@ -2000,7 +2229,10 @@ declare var CloseEvent: { }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream) */ -interface CompressionStream extends GenericTransformStream {} +interface CompressionStream extends GenericTransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; +} declare var CompressionStream: { prototype: CompressionStream; @@ -2174,27 +2406,49 @@ declare var DOMException: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix) */ interface DOMMatrix extends DOMMatrixReadOnly { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ a: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ b: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ c: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ d: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ e: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ f: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m11: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m12: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m13: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m14: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m21: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m22: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m23: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m24: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m31: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m32: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m33: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m34: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m41: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m42: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m43: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties) */ m44: number; invertSelf(): DOMMatrix; multiplySelf(other?: DOMMatrixInit): DOMMatrix; @@ -2236,29 +2490,51 @@ declare var DOMMatrix: { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly) */ interface DOMMatrixReadOnly { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly a: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly b: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly c: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly d: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly e: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly f: number; readonly is2D: boolean; readonly isIdentity: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m11: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m12: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m13: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m14: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m21: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m22: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m23: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m24: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m31: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m32: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m33: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m34: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m41: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m42: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m43: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties) */ readonly m44: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/flipX) */ flipX(): DOMMatrix; @@ -2452,7 +2728,10 @@ declare var DOMStringList: { }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream) */ -interface DecompressionStream extends GenericTransformStream {} +interface DecompressionStream extends GenericTransformStream { + readonly readable: ReadableStream; + readonly writable: WritableStream; +} declare var DecompressionStream: { prototype: DecompressionStream; @@ -2462,7 +2741,7 @@ declare var DecompressionStream: { interface DedicatedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap { message: MessageEvent; messageerror: MessageEvent; - rtctransform: Event; + rtctransform: RTCTransformEvent; } /** @@ -2488,7 +2767,9 @@ interface DedicatedWorkerGlobalScope | ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/rtctransform_event) */ - onrtctransform: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null; + onrtctransform: + | ((this: DedicatedWorkerGlobalScope, ev: RTCTransformEvent) => any) + | null; /** * Aborts dedicatedWorkerGlobal. * @@ -2611,6 +2892,25 @@ interface EXT_texture_norm16 { readonly RGBA16_SNORM_EXT: 0x8f9b; } +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk) */ +interface EncodedAudioChunk { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk/byteLength) */ + readonly byteLength: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk/duration) */ + readonly duration: number | null; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk/timestamp) */ + readonly timestamp: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk/type) */ + readonly type: EncodedAudioChunkType; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk/copyTo) */ + copyTo(destination: AllowSharedBufferSource): void; +} + +declare var EncodedAudioChunk: { + prototype: EncodedAudioChunk; + new (init: EncodedAudioChunkInit): EncodedAudioChunk; +}; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk) */ interface EncodedVideoChunk { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk/byteLength) */ @@ -3283,25 +3583,25 @@ declare var FontFace: { prototype: FontFace; new ( family: string, - source: string | BinaryData, + source: string | BufferSource, descriptors?: FontFaceDescriptors, ): FontFace; }; interface FontFaceSetEventMap { - loading: Event; - loadingdone: Event; - loadingerror: Event; + loading: FontFaceSetLoadEvent; + loadingdone: FontFaceSetLoadEvent; + loadingerror: FontFaceSetLoadEvent; } /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet) */ interface FontFaceSet extends EventTarget { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loading_event) */ - onloading: ((this: FontFaceSet, ev: Event) => any) | null; + onloading: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loadingdone_event) */ - onloadingdone: ((this: FontFaceSet, ev: Event) => any) | null; + onloadingdone: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loadingerror_event) */ - onloadingerror: ((this: FontFaceSet, ev: Event) => any) | null; + onloadingerror: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/ready) */ readonly ready: Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/status) */ @@ -3338,7 +3638,7 @@ interface FontFaceSet extends EventTarget { declare var FontFaceSet: { prototype: FontFaceSet; - new (initialFaces: FontFace[]): FontFaceSet; + new (): FontFaceSet; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSetLoadEvent) */ @@ -4156,7 +4456,7 @@ interface IDBTransaction extends EventTarget { /** * Returns a list of the names of object stores in the transaction's scope. For an upgrade transaction this is all object stores in the database. * - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/ObjectStoreNames) + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/objectStoreNames) */ readonly objectStoreNames: DOMStringList; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/abort_event) */ @@ -4804,7 +5104,7 @@ interface OES_vertex_array_object { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/bindVertexArrayOES) */ bindVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/createVertexArrayOES) */ - createVertexArrayOES(): WebGLVertexArrayObjectOES | null; + createVertexArrayOES(): WebGLVertexArrayObjectOES; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/deleteVertexArrayOES) */ deleteVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/isVertexArrayOES) */ @@ -4937,6 +5237,7 @@ interface OffscreenCanvasRenderingContext2D CanvasText, CanvasTextDrawingStyles, CanvasTransform { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/canvas) */ readonly canvas: OffscreenCanvas; } @@ -5150,6 +5451,8 @@ interface PerformanceResourceTiming extends PerformanceEntry { readonly responseEnd: DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseStart) */ readonly responseStart: DOMHighResTimeStamp; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseStatus) */ + readonly responseStatus: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/secureConnectionStart) */ readonly secureConnectionStart: DOMHighResTimeStamp; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/serverTiming) */ @@ -5321,6 +5624,8 @@ interface PushMessageData { arrayBuffer(): ArrayBuffer; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushMessageData/blob) */ blob(): Blob; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushMessageData/bytes) */ + bytes(): Uint8Array; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushMessageData/json) */ json(): any; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushMessageData/text) */ @@ -5512,7 +5817,7 @@ interface ReadableStreamBYOBReader extends ReadableStreamGenericReader { declare var ReadableStreamBYOBReader: { prototype: ReadableStreamBYOBReader; - new (stream: ReadableStream): ReadableStreamBYOBReader; + new (stream: ReadableStream): ReadableStreamBYOBReader; }; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */ @@ -6178,7 +6483,7 @@ interface SubtleCrypto { | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, - length: number, + length?: number | null, ): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */ deriveKey( @@ -7745,13 +8050,13 @@ interface WebGL2RenderingContextBase { height: GLsizei, ): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/createQuery) */ - createQuery(): WebGLQuery | null; + createQuery(): WebGLQuery; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/createSampler) */ - createSampler(): WebGLSampler | null; + createSampler(): WebGLSampler; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/createTransformFeedback) */ - createTransformFeedback(): WebGLTransformFeedback | null; + createTransformFeedback(): WebGLTransformFeedback; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/createVertexArray) */ - createVertexArray(): WebGLVertexArrayObject | null; + createVertexArray(): WebGLVertexArrayObject; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/deleteQuery) */ deleteQuery(query: WebGLQuery | null): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/deleteSampler) */ @@ -9191,17 +9496,17 @@ interface WebGLRenderingContextBase { height: GLsizei, ): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createBuffer) */ - createBuffer(): WebGLBuffer | null; + createBuffer(): WebGLBuffer; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createFramebuffer) */ - createFramebuffer(): WebGLFramebuffer | null; + createFramebuffer(): WebGLFramebuffer; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createProgram) */ - createProgram(): WebGLProgram | null; + createProgram(): WebGLProgram; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createRenderbuffer) */ - createRenderbuffer(): WebGLRenderbuffer | null; + createRenderbuffer(): WebGLRenderbuffer; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createShader) */ createShader(type: GLenum): WebGLShader | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createTexture) */ - createTexture(): WebGLTexture | null; + createTexture(): WebGLTexture; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/cullFace) */ cullFace(mode: GLenum): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/deleteBuffer) */ @@ -10324,7 +10629,7 @@ interface WindowOrWorkerGlobalScope { sh: number, options?: ImageBitmapOptions, ): Promise; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ fetch(input: RequestInfo | URL, init?: RequestInit): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/queueMicrotask) */ queueMicrotask(callback: VoidFunction): void; @@ -10877,7 +11182,7 @@ interface Console { clear(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static) */ count(label?: string): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countreset_static) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static) */ countReset(label?: string): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static) */ debug(...data: any[]): void; @@ -10889,9 +11194,9 @@ interface Console { error(...data: any[]): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static) */ group(...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupcollapsed_static) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static) */ groupCollapsed(...data: any[]): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupend_static) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static) */ groupEnd(): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static) */ info(...data: any[]): void; @@ -10901,9 +11206,9 @@ interface Console { table(tabularData?: any, properties?: string[]): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static) */ time(label?: string): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeend_static) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static) */ timeEnd(label?: string): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timelog_static) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static) */ timeLog(label?: string, ...data: any[]): void; timeStamp(label?: string): void; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace_static) */ @@ -11083,6 +11388,14 @@ declare namespace WebAssembly { function validate(bytes: BufferSource): boolean; } +interface AudioDataOutputCallback { + (output: AudioData): void; +} + +interface EncodedAudioChunkOutputCallback { + (output: EncodedAudioChunk, metadata?: EncodedAudioChunkMetadata): void; +} + interface EncodedVideoChunkOutputCallback { (chunk: EncodedVideoChunk, metadata?: EncodedVideoChunkMetadata): void; } @@ -11191,7 +11504,7 @@ declare var onmessageerror: | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/rtctransform_event) */ declare var onrtctransform: - | ((this: DedicatedWorkerGlobalScope, ev: Event) => any) + | ((this: DedicatedWorkerGlobalScope, ev: RTCTransformEvent) => any) | null; /** * Aborts dedicatedWorkerGlobal. @@ -11310,7 +11623,7 @@ declare function createImageBitmap( sh: number, options?: ImageBitmapOptions, ): Promise; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */ declare function fetch( input: RequestInfo | URL, init?: RequestInit, @@ -11373,7 +11686,6 @@ declare function removeEventListener( type AlgorithmIdentifier = Algorithm | string; type AllowSharedBufferSource = ArrayBuffer | ArrayBufferView; type BigInteger = Uint8Array; -type BinaryData = ArrayBuffer | ArrayBufferView; type BlobPart = BufferSource | Blob | string; type BodyInit = ReadableStream | XMLHttpRequestBodyInit; type BufferSource = ArrayBufferView | ArrayBuffer; @@ -11436,6 +11748,7 @@ type Transferable = | ReadableStream | WritableStream | TransformStream + | AudioData | VideoFrame | ArrayBuffer; type Uint32List = Uint32Array | GLuint[]; @@ -11446,8 +11759,18 @@ type XMLHttpRequestBodyInit = | URLSearchParams | string; type AlphaOption = "discard" | "keep"; +type AudioSampleFormat = + | "f32" + | "f32-planar" + | "s16" + | "s16-planar" + | "s32" + | "s32-planar" + | "u8" + | "u8-planar"; type AvcBitstreamFormat = "annexb" | "avc"; type BinaryType = "arraybuffer" | "blob"; +type BitrateMode = "constant" | "variable"; type CSSMathOperator = | "clamp" | "invert" @@ -11506,6 +11829,7 @@ type ColorGamut = "p3" | "rec2020" | "srgb"; type ColorSpaceConversion = "default" | "none"; type CompressionFormat = "deflate" | "deflate-raw" | "gzip"; type DocumentVisibilityState = "hidden" | "visible"; +type EncodedAudioChunkType = "delta" | "key"; type EncodedVideoChunkType = "delta" | "key"; type EndingType = "native" | "transparent"; type FileSystemHandleKind = "directory" | "file"; @@ -11574,13 +11898,15 @@ type OffscreenRenderingContextId = | "webgl" | "webgl2" | "webgpu"; +type OpusBitstreamFormat = "ogg" | "opus"; type PermissionName = | "geolocation" + | "midi" | "notifications" | "persistent-storage" | "push" | "screen-wake-lock" - | "xr-spatial-tracking"; + | "storage-access"; type PermissionState = "denied" | "granted" | "prompt"; type PredefinedColorSpace = "display-p3" | "srgb"; type PremultiplyAlpha = "default" | "none" | "premultiply"; diff --git a/lib/lib.es2015.iterable.d.ts b/lib/lib.es2015.iterable.d.ts index 6dd63d1..8a5f518 100644 --- a/lib/lib.es2015.iterable.d.ts +++ b/lib/lib.es2015.iterable.d.ts @@ -69,7 +69,9 @@ interface TypedNumberArrayConstructor { * Creates an array from an iterable object. * @param iterable An iterable object to convert to an array. */ - from(iterable: Iterable | ArrayLike): TypedNumberArray; + from( + iterable: Iterable | ArrayLike, + ): TypedNumberArray; /** * Creates an array from an iterable object. * @param iterable An iterable object to convert to an array. @@ -80,5 +82,5 @@ interface TypedNumberArrayConstructor { iterable: Iterable | ArrayLike, mapfn: (this: This, v: T, k: number) => number, thisArg?: This, - ): TypedNumberArray; + ): TypedNumberArray; } diff --git a/lib/lib.es2020.bigint.d.ts b/lib/lib.es2020.bigint.d.ts index 1e6c041..977bfc3 100644 --- a/lib/lib.es2020.bigint.d.ts +++ b/lib/lib.es2020.bigint.d.ts @@ -1,4 +1,6 @@ -interface TypedBigIntArray { +interface TypedBigIntArray< + TArrayBuffer extends ArrayBufferLike = ArrayBufferLike, +> { /** * Determines whether all the members of an array satisfy the specified test. * @param predicate A function that accepts up to three arguments. The every method calls @@ -188,7 +190,9 @@ interface TypedBigIntArrayConstructor { * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. */ - from(arrayLike: Iterable | ArrayLike): TypedBigIntArray; + from( + arrayLike: Iterable | ArrayLike, + ): TypedBigIntArray; /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. @@ -199,5 +203,5 @@ interface TypedBigIntArrayConstructor { arrayLike: Iterable | ArrayLike, mapfn: (this: This, v: T, k: number) => bigint, thisArg?: This, - ): TypedBigIntArray; + ): TypedBigIntArray; } diff --git a/lib/lib.es5.d.ts b/lib/lib.es5.d.ts index 941891c..b808a5e 100644 --- a/lib/lib.es5.d.ts +++ b/lib/lib.es5.d.ts @@ -637,7 +637,9 @@ interface Promise extends PromiseLike { ): Promise; } -interface TypedNumberArray { +interface TypedNumberArray< + TArrayBuffer extends ArrayBufferLike = ArrayBufferLike, +> { /** * Determines whether all the members of an array satisfy the specified test. * @param predicate A function that accepts up to three arguments. The every method calls @@ -817,7 +819,7 @@ interface TypedNumberArrayConstructor { * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. */ - from(arrayLike: ArrayLike): TypedNumberArray; + from(arrayLike: ArrayLike): TypedNumberArray; /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. @@ -828,5 +830,5 @@ interface TypedNumberArrayConstructor { arrayLike: ArrayLike, mapfn: (this: This, v: T, k: number) => number, thisArg?: This, - ): TypedNumberArray; + ): TypedNumberArray; } diff --git a/package-lock.json b/package-lock.json index c82d851..dba9205 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "diff": "^5.0.0", "json5": "^2.2.3", "prettier": "^3.2.5", - "typescript": "^5.6.2" + "typescript": "^5.7.2" } }, "node_modules/@jsdevtools/ez-spawn": { @@ -241,9 +241,9 @@ } }, "node_modules/typescript": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", - "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -441,9 +441,9 @@ "dev": true }, "typescript": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", - "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", "dev": true }, "typical": { diff --git a/package.json b/package.json index 15e2a78..5aea47b 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "diff": "^5.0.0", "json5": "^2.2.3", "prettier": "^3.2.5", - "typescript": "^5.6.2" + "typescript": "^5.7.2" }, "scripts": { "build:tsc": "tsc", @@ -24,4 +24,4 @@ "keywords": [], "author": "uhyo ", "license": "Apache-2.0" -} +} \ No newline at end of file diff --git a/tests/package-lock.json b/tests/package-lock.json index 2cfd1e0..e23e004 100644 --- a/tests/package-lock.json +++ b/tests/package-lock.json @@ -19,6 +19,7 @@ "@typescript/lib-es2021": "file:../dist-package/es2021", "@typescript/lib-es2022": "file:../dist-package/es2022", "@typescript/lib-es2023": "file:../dist-package/es2023", + "@typescript/lib-es2024": "file:../dist-package/es2024", "@typescript/lib-es5": "file:../dist-package/es5", "@typescript/lib-es6": "file:../dist-package/es6", "@typescript/lib-esnext": "file:../dist-package/esnext", @@ -27,8 +28,8 @@ }, "devDependencies": { "@types/node": "^16.9.6", - "tsd": "^0.31.1", - "typescript": "^5.6.2" + "tsd": "^0.31.2", + "typescript": "^5.7.2" } }, "../dist-package/decorators": { @@ -119,6 +120,14 @@ "typescript": ">=4.5.2" } }, + "../dist-package/es2024": { + "name": "@better-typescript-lib/es2024", + "version": "2.9.0", + "license": "Apache-2.0", + "peerDependencies": { + "typescript": ">=4.5.2" + } + }, "../dist-package/es5": { "name": "@better-typescript-lib/es5", "version": "2.9.0", @@ -310,9 +319,9 @@ "dev": true }, "node_modules/@tsd/typescript": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/@tsd/typescript/-/typescript-5.6.2.tgz", - "integrity": "sha512-sk87KQtOkhxXHN8I3VQM8sZQBNO++T0dP5FVZ5dPKeHaCeA0lbis1673RsTpCeuE2wkdwDbkYocSjcKrpqBUrA==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/@tsd/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-Xuhtk1h4T35XXJWWKmufMV1UMK1C5aMA+3AYDgkQgiaR4lLS+7lNXOEC0lDancspFO9SOZzASpfOvUoATm2cPA==", "dev": true, "engines": { "node": ">=14.17" @@ -402,6 +411,10 @@ "resolved": "../dist-package/es2023", "link": true }, + "node_modules/@typescript/lib-es2024": { + "resolved": "../dist-package/es2024", + "link": true + }, "node_modules/@typescript/lib-es5": { "resolved": "../dist-package/es5", "link": true @@ -1550,9 +1563,9 @@ } }, "node_modules/tsd": { - "version": "0.31.1", - "resolved": "https://registry.npmjs.org/tsd/-/tsd-0.31.1.tgz", - "integrity": "sha512-sSL84A0SFwx2xGMWrxlGaarKFSQszWjJS2vgNDDLwatytzg2aq6ShlwHsBYxRNmjzXISODwMva5ZOdAg/4AoOA==", + "version": "0.31.2", + "resolved": "https://registry.npmjs.org/tsd/-/tsd-0.31.2.tgz", + "integrity": "sha512-VplBAQwvYrHzVihtzXiUVXu5bGcr7uH1juQZ1lmKgkuGNGT+FechUCqmx9/zk7wibcqR2xaNEwCkDyKh+VVZnQ==", "dev": true, "dependencies": { "@tsd/typescript": "~5.4.3", @@ -1583,9 +1596,9 @@ } }, "node_modules/typescript": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", - "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", "dev": true, "bin": { "tsc": "bin/tsc", diff --git a/tests/package.json b/tests/package.json index d27466f..9278fa5 100644 --- a/tests/package.json +++ b/tests/package.json @@ -14,8 +14,8 @@ }, "devDependencies": { "@types/node": "^16.9.6", - "tsd": "^0.31.1", - "typescript": "^5.6.2" + "tsd": "^0.31.2", + "typescript": "^5.7.2" }, "dependencies": { "@typescript/lib-decorators": "file:../dist-package/decorators", @@ -33,9 +33,10 @@ "@typescript/lib-es6": "file:../dist-package/es6", "@typescript/lib-esnext": "file:../dist-package/esnext", "@typescript/lib-scripthost": "file:../dist-package/scripthost", - "@typescript/lib-webworker": "file:../dist-package/webworker" + "@typescript/lib-webworker": "file:../dist-package/webworker", + "@typescript/lib-es2024": "file:../dist-package/es2024" }, "overrides": { - "@tsd/typescript": "~5.6.2" + "@tsd/typescript": "~5.7.2" } }