@soundscript/cli-darwin-arm64 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/soundscript +0 -0
- package/package.json +5 -4
- package/src/bundled/portable-web-globals.d.ts +153 -0
- package/src/bundled/sound-libs/lib.es2015.iterable.d.ts +49 -49
- package/src/bundled/sound-libs/lib.es2015.promise.d.ts +2 -2
- package/src/bundled/sound-libs/lib.es2016.array.include.d.ts +8 -8
- package/src/bundled/sound-libs/lib.es2020.bigint.d.ts +60 -60
- package/src/bundled/sound-libs/lib.es2022.array.d.ts +10 -10
- package/src/bundled/sound-libs/lib.es2023.array.d.ts +70 -70
- package/src/bundled/sound-libs/lib.es5.d.ts +210 -210
- package/src/stdlib/async.d.ts +3 -3
- package/src/stdlib/codec.d.ts +3 -2
- package/src/stdlib/decode.d.ts +6 -4
- package/src/stdlib/encode.d.ts +11 -9
- package/src/stdlib/fetch.d.ts +1 -1
- package/src/stdlib/json.d.ts +29 -2
- package/src/stdlib/numerics.d.ts +521 -43
- package/src/stdlib/result.d.ts +21 -5
- package/src/stdlib/typeclasses.d.ts +2 -2
- package/src/stdlib/value.d.ts +9 -0
- package/src/stdlib/component.d.ts +0 -40
|
@@ -1852,7 +1852,7 @@ interface TypedPropertyDescriptor<T> {
|
|
|
1852
1852
|
set?: (value: T) => void;
|
|
1853
1853
|
}
|
|
1854
1854
|
|
|
1855
|
-
declare type PromiseConstructorLike = new <T>(executor: (resolve: (value: T |
|
|
1855
|
+
declare type PromiseConstructorLike = new <T>(executor: (resolve: (value: T | Promise<T>) => void, reject: (reason?: unknown) => void) => void) => Promise<T>;
|
|
1856
1856
|
|
|
1857
1857
|
// #[variance(T: out)]
|
|
1858
1858
|
interface PromiseLike<T> {
|
|
@@ -1862,7 +1862,7 @@ interface PromiseLike<T> {
|
|
|
1862
1862
|
* @param onrejected The callback to execute when the Promise is rejected.
|
|
1863
1863
|
* @returns A Promise for the completion of which ever callback is executed.
|
|
1864
1864
|
*/
|
|
1865
|
-
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 |
|
|
1865
|
+
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | Promise<TResult1>) | undefined | null, onrejected?: ((reason: unknown) => TResult2 | Promise<TResult2>) | undefined | null): PromiseLike<TResult1 | TResult2>;
|
|
1866
1866
|
}
|
|
1867
1867
|
|
|
1868
1868
|
/**
|
|
@@ -1876,14 +1876,14 @@ interface Promise<T> extends PromiseLike<T> {
|
|
|
1876
1876
|
* @param onrejected The callback to execute when the Promise is rejected.
|
|
1877
1877
|
* @returns A Promise for the completion of which ever callback is executed.
|
|
1878
1878
|
*/
|
|
1879
|
-
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 |
|
|
1879
|
+
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | Promise<TResult1>) | undefined | null, onrejected?: ((reason: unknown) => TResult2 | Promise<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
|
|
1880
1880
|
|
|
1881
1881
|
/**
|
|
1882
1882
|
* Attaches a callback for only the rejection of the Promise.
|
|
1883
1883
|
* @param onrejected The callback to execute when the Promise is rejected.
|
|
1884
1884
|
* @returns A Promise for the completion of the callback.
|
|
1885
1885
|
*/
|
|
1886
|
-
catch<TResult = never>(onrejected?: ((reason: unknown) => TResult |
|
|
1886
|
+
catch<TResult = never>(onrejected?: ((reason: unknown) => TResult | Promise<TResult>) | undefined | null): Promise<T | TResult>;
|
|
1887
1887
|
}
|
|
1888
1888
|
|
|
1889
1889
|
/**
|
|
@@ -2076,7 +2076,7 @@ interface DataView<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2076
2076
|
* @param byteOffset The place in the buffer at which the value should be retrieved.
|
|
2077
2077
|
* @param littleEndian If false or undefined, a big-endian value should be read.
|
|
2078
2078
|
*/
|
|
2079
|
-
getFloat32(byteOffset: number, littleEndian?: boolean):
|
|
2079
|
+
getFloat32(byteOffset: number, littleEndian?: boolean): number;
|
|
2080
2080
|
|
|
2081
2081
|
/**
|
|
2082
2082
|
* Gets the Float64 value at the specified byte offset from the start of the view. There is
|
|
@@ -2091,7 +2091,7 @@ interface DataView<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2091
2091
|
* no alignment constraint; multi-byte values may be fetched from any offset.
|
|
2092
2092
|
* @param byteOffset The place in the buffer at which the value should be retrieved.
|
|
2093
2093
|
*/
|
|
2094
|
-
getInt8(byteOffset: number):
|
|
2094
|
+
getInt8(byteOffset: number): number;
|
|
2095
2095
|
|
|
2096
2096
|
/**
|
|
2097
2097
|
* Gets the Int16 value at the specified byte offset from the start of the view. There is
|
|
@@ -2099,21 +2099,21 @@ interface DataView<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2099
2099
|
* @param byteOffset The place in the buffer at which the value should be retrieved.
|
|
2100
2100
|
* @param littleEndian If false or undefined, a big-endian value should be read.
|
|
2101
2101
|
*/
|
|
2102
|
-
getInt16(byteOffset: number, littleEndian?: boolean):
|
|
2102
|
+
getInt16(byteOffset: number, littleEndian?: boolean): number;
|
|
2103
2103
|
/**
|
|
2104
2104
|
* Gets the Int32 value at the specified byte offset from the start of the view. There is
|
|
2105
2105
|
* no alignment constraint; multi-byte values may be fetched from any offset.
|
|
2106
2106
|
* @param byteOffset The place in the buffer at which the value should be retrieved.
|
|
2107
2107
|
* @param littleEndian If false or undefined, a big-endian value should be read.
|
|
2108
2108
|
*/
|
|
2109
|
-
getInt32(byteOffset: number, littleEndian?: boolean):
|
|
2109
|
+
getInt32(byteOffset: number, littleEndian?: boolean): number;
|
|
2110
2110
|
|
|
2111
2111
|
/**
|
|
2112
2112
|
* Gets the Uint8 value at the specified byte offset from the start of the view. There is
|
|
2113
2113
|
* no alignment constraint; multi-byte values may be fetched from any offset.
|
|
2114
2114
|
* @param byteOffset The place in the buffer at which the value should be retrieved.
|
|
2115
2115
|
*/
|
|
2116
|
-
getUint8(byteOffset: number):
|
|
2116
|
+
getUint8(byteOffset: number): number;
|
|
2117
2117
|
|
|
2118
2118
|
/**
|
|
2119
2119
|
* Gets the Uint16 value at the specified byte offset from the start of the view. There is
|
|
@@ -2121,7 +2121,7 @@ interface DataView<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2121
2121
|
* @param byteOffset The place in the buffer at which the value should be retrieved.
|
|
2122
2122
|
* @param littleEndian If false or undefined, a big-endian value should be read.
|
|
2123
2123
|
*/
|
|
2124
|
-
getUint16(byteOffset: number, littleEndian?: boolean):
|
|
2124
|
+
getUint16(byteOffset: number, littleEndian?: boolean): number;
|
|
2125
2125
|
|
|
2126
2126
|
/**
|
|
2127
2127
|
* Gets the Uint32 value at the specified byte offset from the start of the view. There is
|
|
@@ -2129,7 +2129,7 @@ interface DataView<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2129
2129
|
* @param byteOffset The place in the buffer at which the value should be retrieved.
|
|
2130
2130
|
* @param littleEndian If false or undefined, a big-endian value should be read.
|
|
2131
2131
|
*/
|
|
2132
|
-
getUint32(byteOffset: number, littleEndian?: boolean):
|
|
2132
|
+
getUint32(byteOffset: number, littleEndian?: boolean): number;
|
|
2133
2133
|
|
|
2134
2134
|
/**
|
|
2135
2135
|
* Stores an Float32 value at the specified byte offset from the start of the view.
|
|
@@ -2137,7 +2137,7 @@ interface DataView<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2137
2137
|
* @param value The value to set.
|
|
2138
2138
|
* @param littleEndian If false or undefined, a big-endian value should be written.
|
|
2139
2139
|
*/
|
|
2140
|
-
setFloat32(byteOffset: number, value:
|
|
2140
|
+
setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void;
|
|
2141
2141
|
|
|
2142
2142
|
/**
|
|
2143
2143
|
* Stores an Float64 value at the specified byte offset from the start of the view.
|
|
@@ -2152,7 +2152,7 @@ interface DataView<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2152
2152
|
* @param byteOffset The place in the buffer at which the value should be set.
|
|
2153
2153
|
* @param value The value to set.
|
|
2154
2154
|
*/
|
|
2155
|
-
setInt8(byteOffset: number, value:
|
|
2155
|
+
setInt8(byteOffset: number, value: number): void;
|
|
2156
2156
|
|
|
2157
2157
|
/**
|
|
2158
2158
|
* Stores an Int16 value at the specified byte offset from the start of the view.
|
|
@@ -2160,7 +2160,7 @@ interface DataView<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2160
2160
|
* @param value The value to set.
|
|
2161
2161
|
* @param littleEndian If false or undefined, a big-endian value should be written.
|
|
2162
2162
|
*/
|
|
2163
|
-
setInt16(byteOffset: number, value:
|
|
2163
|
+
setInt16(byteOffset: number, value: number, littleEndian?: boolean): void;
|
|
2164
2164
|
|
|
2165
2165
|
/**
|
|
2166
2166
|
* Stores an Int32 value at the specified byte offset from the start of the view.
|
|
@@ -2168,14 +2168,14 @@ interface DataView<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2168
2168
|
* @param value The value to set.
|
|
2169
2169
|
* @param littleEndian If false or undefined, a big-endian value should be written.
|
|
2170
2170
|
*/
|
|
2171
|
-
setInt32(byteOffset: number, value:
|
|
2171
|
+
setInt32(byteOffset: number, value: number, littleEndian?: boolean): void;
|
|
2172
2172
|
|
|
2173
2173
|
/**
|
|
2174
2174
|
* Stores an Uint8 value at the specified byte offset from the start of the view.
|
|
2175
2175
|
* @param byteOffset The place in the buffer at which the value should be set.
|
|
2176
2176
|
* @param value The value to set.
|
|
2177
2177
|
*/
|
|
2178
|
-
setUint8(byteOffset: number, value:
|
|
2178
|
+
setUint8(byteOffset: number, value: number): void;
|
|
2179
2179
|
|
|
2180
2180
|
/**
|
|
2181
2181
|
* Stores an Uint16 value at the specified byte offset from the start of the view.
|
|
@@ -2183,7 +2183,7 @@ interface DataView<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2183
2183
|
* @param value The value to set.
|
|
2184
2184
|
* @param littleEndian If false or undefined, a big-endian value should be written.
|
|
2185
2185
|
*/
|
|
2186
|
-
setUint16(byteOffset: number, value:
|
|
2186
|
+
setUint16(byteOffset: number, value: number, littleEndian?: boolean): void;
|
|
2187
2187
|
|
|
2188
2188
|
/**
|
|
2189
2189
|
* Stores an Uint32 value at the specified byte offset from the start of the view.
|
|
@@ -2191,7 +2191,7 @@ interface DataView<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2191
2191
|
* @param value The value to set.
|
|
2192
2192
|
* @param littleEndian If false or undefined, a big-endian value should be written.
|
|
2193
2193
|
*/
|
|
2194
|
-
setUint32(byteOffset: number, value:
|
|
2194
|
+
setUint32(byteOffset: number, value: number, littleEndian?: boolean): void;
|
|
2195
2195
|
}
|
|
2196
2196
|
interface DataViewConstructor {
|
|
2197
2197
|
readonly prototype: DataView<ArrayBufferLike>;
|
|
@@ -2243,7 +2243,7 @@ interface Int8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2243
2243
|
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
2244
2244
|
* If thisArg is omitted, undefined is used as the this value.
|
|
2245
2245
|
*/
|
|
2246
|
-
every(predicate: (value:
|
|
2246
|
+
every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: unknown): boolean;
|
|
2247
2247
|
|
|
2248
2248
|
/**
|
|
2249
2249
|
* Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
|
@@ -2253,7 +2253,7 @@ interface Int8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2253
2253
|
* @param end index to stop filling the array at. If end is negative, it is treated as
|
|
2254
2254
|
* length+end.
|
|
2255
2255
|
*/
|
|
2256
|
-
fill(value:
|
|
2256
|
+
fill(value: number, start?: number, end?: number): this;
|
|
2257
2257
|
|
|
2258
2258
|
/**
|
|
2259
2259
|
* Returns the elements of an array that meet the condition specified in a callback function.
|
|
@@ -2262,7 +2262,7 @@ interface Int8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2262
2262
|
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
2263
2263
|
* If thisArg is omitted, undefined is used as the this value.
|
|
2264
2264
|
*/
|
|
2265
|
-
filter(predicate: (value:
|
|
2265
|
+
filter(predicate: (value: number, index: number, array: this) => unknown, thisArg?: unknown): Int8Array<ArrayBuffer>;
|
|
2266
2266
|
|
|
2267
2267
|
/**
|
|
2268
2268
|
* Returns the value of the first element in the array where predicate is true, and undefined
|
|
@@ -2273,7 +2273,7 @@ interface Int8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2273
2273
|
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
2274
2274
|
* predicate. If it is not provided, undefined is used instead.
|
|
2275
2275
|
*/
|
|
2276
|
-
find(predicate: (value:
|
|
2276
|
+
find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: unknown): number | undefined;
|
|
2277
2277
|
|
|
2278
2278
|
/**
|
|
2279
2279
|
* Returns the index of the first element in the array where predicate is true, and -1
|
|
@@ -2284,7 +2284,7 @@ interface Int8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2284
2284
|
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
2285
2285
|
* predicate. If it is not provided, undefined is used instead.
|
|
2286
2286
|
*/
|
|
2287
|
-
findIndex(predicate: (value:
|
|
2287
|
+
findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: unknown): number;
|
|
2288
2288
|
|
|
2289
2289
|
/**
|
|
2290
2290
|
* Performs the specified action for each element in an array.
|
|
@@ -2293,7 +2293,7 @@ interface Int8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2293
2293
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
|
2294
2294
|
* If thisArg is omitted, undefined is used as the this value.
|
|
2295
2295
|
*/
|
|
2296
|
-
forEach(callbackfn: (value:
|
|
2296
|
+
forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: unknown): void;
|
|
2297
2297
|
|
|
2298
2298
|
/**
|
|
2299
2299
|
* Returns the index of the first occurrence of a value in an array.
|
|
@@ -2301,7 +2301,7 @@ interface Int8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2301
2301
|
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
|
2302
2302
|
* search starts at index 0.
|
|
2303
2303
|
*/
|
|
2304
|
-
indexOf(searchElement:
|
|
2304
|
+
indexOf(searchElement: number, fromIndex?: number): number;
|
|
2305
2305
|
|
|
2306
2306
|
/**
|
|
2307
2307
|
* Adds all the elements of an array separated by the specified separator string.
|
|
@@ -2316,7 +2316,7 @@ interface Int8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2316
2316
|
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
|
2317
2317
|
* search starts at index 0.
|
|
2318
2318
|
*/
|
|
2319
|
-
lastIndexOf(searchElement:
|
|
2319
|
+
lastIndexOf(searchElement: number, fromIndex?: number): number;
|
|
2320
2320
|
|
|
2321
2321
|
/**
|
|
2322
2322
|
* The length of the array.
|
|
@@ -2331,7 +2331,7 @@ interface Int8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2331
2331
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
|
2332
2332
|
* If thisArg is omitted, undefined is used as the this value.
|
|
2333
2333
|
*/
|
|
2334
|
-
map(callbackfn: (value:
|
|
2334
|
+
map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: unknown): Int8Array<ArrayBuffer>;
|
|
2335
2335
|
|
|
2336
2336
|
/**
|
|
2337
2337
|
* Calls the specified callback function for all the elements in an array. The return value of
|
|
@@ -2343,8 +2343,8 @@ interface Int8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2343
2343
|
* the accumulation. The first call to the callbackfn function provides this value as an argument
|
|
2344
2344
|
* instead of an array value.
|
|
2345
2345
|
*/
|
|
2346
|
-
reduce(callbackfn: (previousValue:
|
|
2347
|
-
reduce(callbackfn: (previousValue:
|
|
2346
|
+
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
|
|
2347
|
+
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
|
|
2348
2348
|
|
|
2349
2349
|
/**
|
|
2350
2350
|
* Calls the specified callback function for all the elements in an array. The return value of
|
|
@@ -2356,7 +2356,7 @@ interface Int8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2356
2356
|
* the accumulation. The first call to the callbackfn function provides this value as an argument
|
|
2357
2357
|
* instead of an array value.
|
|
2358
2358
|
*/
|
|
2359
|
-
reduce<U>(callbackfn: (previousValue: U, currentValue:
|
|
2359
|
+
reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
|
|
2360
2360
|
|
|
2361
2361
|
/**
|
|
2362
2362
|
* Calls the specified callback function for all the elements in an array, in descending order.
|
|
@@ -2368,8 +2368,8 @@ interface Int8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2368
2368
|
* the accumulation. The first call to the callbackfn function provides this value as an
|
|
2369
2369
|
* argument instead of an array value.
|
|
2370
2370
|
*/
|
|
2371
|
-
reduceRight(callbackfn: (previousValue:
|
|
2372
|
-
reduceRight(callbackfn: (previousValue:
|
|
2371
|
+
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
|
|
2372
|
+
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
|
|
2373
2373
|
|
|
2374
2374
|
/**
|
|
2375
2375
|
* Calls the specified callback function for all the elements in an array, in descending order.
|
|
@@ -2381,7 +2381,7 @@ interface Int8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2381
2381
|
* the accumulation. The first call to the callbackfn function provides this value as an argument
|
|
2382
2382
|
* instead of an array value.
|
|
2383
2383
|
*/
|
|
2384
|
-
reduceRight<U>(callbackfn: (previousValue: U, currentValue:
|
|
2384
|
+
reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
|
|
2385
2385
|
|
|
2386
2386
|
/**
|
|
2387
2387
|
* Reverses the elements in an Array.
|
|
@@ -2393,7 +2393,7 @@ interface Int8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2393
2393
|
* @param array A typed or untyped array of values to set.
|
|
2394
2394
|
* @param offset The index in the current array at which the values are to be written.
|
|
2395
2395
|
*/
|
|
2396
|
-
set(array: ArrayLike<
|
|
2396
|
+
set(array: ArrayLike<number>, offset?: number): void;
|
|
2397
2397
|
|
|
2398
2398
|
/**
|
|
2399
2399
|
* Returns a section of an array.
|
|
@@ -2410,7 +2410,7 @@ interface Int8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2410
2410
|
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
2411
2411
|
* If thisArg is omitted, undefined is used as the this value.
|
|
2412
2412
|
*/
|
|
2413
|
-
some(predicate: (value:
|
|
2413
|
+
some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: unknown): boolean;
|
|
2414
2414
|
|
|
2415
2415
|
/**
|
|
2416
2416
|
* Sorts an array.
|
|
@@ -2421,7 +2421,7 @@ interface Int8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2421
2421
|
* [11,2,22,1].sort((a, b) => a - b)
|
|
2422
2422
|
* ```
|
|
2423
2423
|
*/
|
|
2424
|
-
sort(compareFn?: (a:
|
|
2424
|
+
sort(compareFn?: (a: number, b: number) => number): this;
|
|
2425
2425
|
|
|
2426
2426
|
/**
|
|
2427
2427
|
* Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements
|
|
@@ -2444,15 +2444,15 @@ interface Int8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2444
2444
|
/** Returns the primitive value of the specified object. */
|
|
2445
2445
|
valueOf(): this;
|
|
2446
2446
|
|
|
2447
|
-
[index: number]:
|
|
2447
|
+
[index: number]: number;
|
|
2448
2448
|
}
|
|
2449
2449
|
interface Int8ArrayConstructor {
|
|
2450
2450
|
readonly prototype: Int8Array<ArrayBufferLike>;
|
|
2451
2451
|
new (length: number): Int8Array<ArrayBuffer>;
|
|
2452
|
-
new (array: ArrayLike<
|
|
2452
|
+
new (array: ArrayLike<number>): Int8Array<ArrayBuffer>;
|
|
2453
2453
|
new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): Int8Array<TArrayBuffer>;
|
|
2454
2454
|
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array<ArrayBuffer>;
|
|
2455
|
-
new (array: ArrayLike<
|
|
2455
|
+
new (array: ArrayLike<number> | ArrayBuffer): Int8Array<ArrayBuffer>;
|
|
2456
2456
|
|
|
2457
2457
|
/**
|
|
2458
2458
|
* The size in bytes of each element in the array.
|
|
@@ -2463,13 +2463,13 @@ interface Int8ArrayConstructor {
|
|
|
2463
2463
|
* Returns a new array from a set of elements.
|
|
2464
2464
|
* @param items A set of elements to include in the new array object.
|
|
2465
2465
|
*/
|
|
2466
|
-
of(...items:
|
|
2466
|
+
of(...items: number[]): Int8Array<ArrayBuffer>;
|
|
2467
2467
|
|
|
2468
2468
|
/**
|
|
2469
2469
|
* Creates an array from an array-like or iterable object.
|
|
2470
2470
|
* @param arrayLike An array-like object to convert to an array.
|
|
2471
2471
|
*/
|
|
2472
|
-
from(arrayLike: ArrayLike<
|
|
2472
|
+
from(arrayLike: ArrayLike<number>): Int8Array<ArrayBuffer>;
|
|
2473
2473
|
|
|
2474
2474
|
/**
|
|
2475
2475
|
* Creates an array from an array-like or iterable object.
|
|
@@ -2477,7 +2477,7 @@ interface Int8ArrayConstructor {
|
|
|
2477
2477
|
* @param mapfn A mapping function to call on every element of the array.
|
|
2478
2478
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
2479
2479
|
*/
|
|
2480
|
-
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) =>
|
|
2480
|
+
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: unknown): Int8Array<ArrayBuffer>;
|
|
2481
2481
|
}
|
|
2482
2482
|
declare var Int8Array: Int8ArrayConstructor;
|
|
2483
2483
|
|
|
@@ -2525,7 +2525,7 @@ interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2525
2525
|
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
2526
2526
|
* If thisArg is omitted, undefined is used as the this value.
|
|
2527
2527
|
*/
|
|
2528
|
-
every(predicate: (value:
|
|
2528
|
+
every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: unknown): boolean;
|
|
2529
2529
|
|
|
2530
2530
|
/**
|
|
2531
2531
|
* Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
|
@@ -2535,7 +2535,7 @@ interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2535
2535
|
* @param end index to stop filling the array at. If end is negative, it is treated as
|
|
2536
2536
|
* length+end.
|
|
2537
2537
|
*/
|
|
2538
|
-
fill(value:
|
|
2538
|
+
fill(value: number, start?: number, end?: number): this;
|
|
2539
2539
|
|
|
2540
2540
|
/**
|
|
2541
2541
|
* Returns the elements of an array that meet the condition specified in a callback function.
|
|
@@ -2544,7 +2544,7 @@ interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2544
2544
|
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
2545
2545
|
* If thisArg is omitted, undefined is used as the this value.
|
|
2546
2546
|
*/
|
|
2547
|
-
filter(predicate: (value:
|
|
2547
|
+
filter(predicate: (value: number, index: number, array: this) => unknown, thisArg?: unknown): Uint8Array<ArrayBuffer>;
|
|
2548
2548
|
|
|
2549
2549
|
/**
|
|
2550
2550
|
* Returns the value of the first element in the array where predicate is true, and undefined
|
|
@@ -2555,7 +2555,7 @@ interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2555
2555
|
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
2556
2556
|
* predicate. If it is not provided, undefined is used instead.
|
|
2557
2557
|
*/
|
|
2558
|
-
find(predicate: (value:
|
|
2558
|
+
find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: unknown): number | undefined;
|
|
2559
2559
|
|
|
2560
2560
|
/**
|
|
2561
2561
|
* Returns the index of the first element in the array where predicate is true, and -1
|
|
@@ -2566,7 +2566,7 @@ interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2566
2566
|
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
2567
2567
|
* predicate. If it is not provided, undefined is used instead.
|
|
2568
2568
|
*/
|
|
2569
|
-
findIndex(predicate: (value:
|
|
2569
|
+
findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: unknown): number;
|
|
2570
2570
|
|
|
2571
2571
|
/**
|
|
2572
2572
|
* Performs the specified action for each element in an array.
|
|
@@ -2575,7 +2575,7 @@ interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2575
2575
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
|
2576
2576
|
* If thisArg is omitted, undefined is used as the this value.
|
|
2577
2577
|
*/
|
|
2578
|
-
forEach(callbackfn: (value:
|
|
2578
|
+
forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: unknown): void;
|
|
2579
2579
|
|
|
2580
2580
|
/**
|
|
2581
2581
|
* Returns the index of the first occurrence of a value in an array.
|
|
@@ -2583,7 +2583,7 @@ interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2583
2583
|
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
|
2584
2584
|
* search starts at index 0.
|
|
2585
2585
|
*/
|
|
2586
|
-
indexOf(searchElement:
|
|
2586
|
+
indexOf(searchElement: number, fromIndex?: number): number;
|
|
2587
2587
|
|
|
2588
2588
|
/**
|
|
2589
2589
|
* Adds all the elements of an array separated by the specified separator string.
|
|
@@ -2598,7 +2598,7 @@ interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2598
2598
|
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
|
2599
2599
|
* search starts at index 0.
|
|
2600
2600
|
*/
|
|
2601
|
-
lastIndexOf(searchElement:
|
|
2601
|
+
lastIndexOf(searchElement: number, fromIndex?: number): number;
|
|
2602
2602
|
|
|
2603
2603
|
/**
|
|
2604
2604
|
* The length of the array.
|
|
@@ -2613,7 +2613,7 @@ interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2613
2613
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
|
2614
2614
|
* If thisArg is omitted, undefined is used as the this value.
|
|
2615
2615
|
*/
|
|
2616
|
-
map(callbackfn: (value:
|
|
2616
|
+
map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: unknown): Uint8Array<ArrayBuffer>;
|
|
2617
2617
|
|
|
2618
2618
|
/**
|
|
2619
2619
|
* Calls the specified callback function for all the elements in an array. The return value of
|
|
@@ -2625,8 +2625,8 @@ interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2625
2625
|
* the accumulation. The first call to the callbackfn function provides this value as an argument
|
|
2626
2626
|
* instead of an array value.
|
|
2627
2627
|
*/
|
|
2628
|
-
reduce(callbackfn: (previousValue:
|
|
2629
|
-
reduce(callbackfn: (previousValue:
|
|
2628
|
+
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
|
|
2629
|
+
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
|
|
2630
2630
|
|
|
2631
2631
|
/**
|
|
2632
2632
|
* Calls the specified callback function for all the elements in an array. The return value of
|
|
@@ -2638,7 +2638,7 @@ interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2638
2638
|
* the accumulation. The first call to the callbackfn function provides this value as an argument
|
|
2639
2639
|
* instead of an array value.
|
|
2640
2640
|
*/
|
|
2641
|
-
reduce<U>(callbackfn: (previousValue: U, currentValue:
|
|
2641
|
+
reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
|
|
2642
2642
|
|
|
2643
2643
|
/**
|
|
2644
2644
|
* Calls the specified callback function for all the elements in an array, in descending order.
|
|
@@ -2650,8 +2650,8 @@ interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2650
2650
|
* the accumulation. The first call to the callbackfn function provides this value as an
|
|
2651
2651
|
* argument instead of an array value.
|
|
2652
2652
|
*/
|
|
2653
|
-
reduceRight(callbackfn: (previousValue:
|
|
2654
|
-
reduceRight(callbackfn: (previousValue:
|
|
2653
|
+
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
|
|
2654
|
+
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
|
|
2655
2655
|
|
|
2656
2656
|
/**
|
|
2657
2657
|
* Calls the specified callback function for all the elements in an array, in descending order.
|
|
@@ -2663,7 +2663,7 @@ interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2663
2663
|
* the accumulation. The first call to the callbackfn function provides this value as an argument
|
|
2664
2664
|
* instead of an array value.
|
|
2665
2665
|
*/
|
|
2666
|
-
reduceRight<U>(callbackfn: (previousValue: U, currentValue:
|
|
2666
|
+
reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
|
|
2667
2667
|
|
|
2668
2668
|
/**
|
|
2669
2669
|
* Reverses the elements in an Array.
|
|
@@ -2675,7 +2675,7 @@ interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2675
2675
|
* @param array A typed or untyped array of values to set.
|
|
2676
2676
|
* @param offset The index in the current array at which the values are to be written.
|
|
2677
2677
|
*/
|
|
2678
|
-
set(array: ArrayLike<
|
|
2678
|
+
set(array: ArrayLike<number>, offset?: number): void;
|
|
2679
2679
|
|
|
2680
2680
|
/**
|
|
2681
2681
|
* Returns a section of an array.
|
|
@@ -2692,7 +2692,7 @@ interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2692
2692
|
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
2693
2693
|
* If thisArg is omitted, undefined is used as the this value.
|
|
2694
2694
|
*/
|
|
2695
|
-
some(predicate: (value:
|
|
2695
|
+
some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: unknown): boolean;
|
|
2696
2696
|
|
|
2697
2697
|
/**
|
|
2698
2698
|
* Sorts an array.
|
|
@@ -2703,7 +2703,7 @@ interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2703
2703
|
* [11,2,22,1].sort((a, b) => a - b)
|
|
2704
2704
|
* ```
|
|
2705
2705
|
*/
|
|
2706
|
-
sort(compareFn?: (a:
|
|
2706
|
+
sort(compareFn?: (a: number, b: number) => number): this;
|
|
2707
2707
|
|
|
2708
2708
|
/**
|
|
2709
2709
|
* Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements
|
|
@@ -2726,15 +2726,15 @@ interface Uint8Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
2726
2726
|
/** Returns the primitive value of the specified object. */
|
|
2727
2727
|
valueOf(): this;
|
|
2728
2728
|
|
|
2729
|
-
[index: number]:
|
|
2729
|
+
[index: number]: number;
|
|
2730
2730
|
}
|
|
2731
2731
|
interface Uint8ArrayConstructor {
|
|
2732
2732
|
readonly prototype: Uint8Array<ArrayBufferLike>;
|
|
2733
2733
|
new (length: number): Uint8Array<ArrayBuffer>;
|
|
2734
|
-
new (array: ArrayLike<
|
|
2734
|
+
new (array: ArrayLike<number>): Uint8Array<ArrayBuffer>;
|
|
2735
2735
|
new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8Array<TArrayBuffer>;
|
|
2736
2736
|
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array<ArrayBuffer>;
|
|
2737
|
-
new (array: ArrayLike<
|
|
2737
|
+
new (array: ArrayLike<number> | ArrayBuffer): Uint8Array<ArrayBuffer>;
|
|
2738
2738
|
|
|
2739
2739
|
/**
|
|
2740
2740
|
* The size in bytes of each element in the array.
|
|
@@ -2745,13 +2745,13 @@ interface Uint8ArrayConstructor {
|
|
|
2745
2745
|
* Returns a new array from a set of elements.
|
|
2746
2746
|
* @param items A set of elements to include in the new array object.
|
|
2747
2747
|
*/
|
|
2748
|
-
of(...items:
|
|
2748
|
+
of(...items: number[]): Uint8Array<ArrayBuffer>;
|
|
2749
2749
|
|
|
2750
2750
|
/**
|
|
2751
2751
|
* Creates an array from an array-like or iterable object.
|
|
2752
2752
|
* @param arrayLike An array-like object to convert to an array.
|
|
2753
2753
|
*/
|
|
2754
|
-
from(arrayLike: ArrayLike<
|
|
2754
|
+
from(arrayLike: ArrayLike<number>): Uint8Array<ArrayBuffer>;
|
|
2755
2755
|
|
|
2756
2756
|
/**
|
|
2757
2757
|
* Creates an array from an array-like or iterable object.
|
|
@@ -2759,7 +2759,7 @@ interface Uint8ArrayConstructor {
|
|
|
2759
2759
|
* @param mapfn A mapping function to call on every element of the array.
|
|
2760
2760
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
2761
2761
|
*/
|
|
2762
|
-
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) =>
|
|
2762
|
+
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: unknown): Uint8Array<ArrayBuffer>;
|
|
2763
2763
|
}
|
|
2764
2764
|
declare var Uint8Array: Uint8ArrayConstructor;
|
|
2765
2765
|
|
|
@@ -2807,7 +2807,7 @@ interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLi
|
|
|
2807
2807
|
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
2808
2808
|
* If thisArg is omitted, undefined is used as the this value.
|
|
2809
2809
|
*/
|
|
2810
|
-
every(predicate: (value:
|
|
2810
|
+
every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: unknown): boolean;
|
|
2811
2811
|
|
|
2812
2812
|
/**
|
|
2813
2813
|
* Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
|
@@ -2817,7 +2817,7 @@ interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLi
|
|
|
2817
2817
|
* @param end index to stop filling the array at. If end is negative, it is treated as
|
|
2818
2818
|
* length+end.
|
|
2819
2819
|
*/
|
|
2820
|
-
fill(value:
|
|
2820
|
+
fill(value: number, start?: number, end?: number): this;
|
|
2821
2821
|
|
|
2822
2822
|
/**
|
|
2823
2823
|
* Returns the elements of an array that meet the condition specified in a callback function.
|
|
@@ -2826,7 +2826,7 @@ interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLi
|
|
|
2826
2826
|
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
2827
2827
|
* If thisArg is omitted, undefined is used as the this value.
|
|
2828
2828
|
*/
|
|
2829
|
-
filter(predicate: (value:
|
|
2829
|
+
filter(predicate: (value: number, index: number, array: this) => unknown, thisArg?: unknown): Uint8ClampedArray<ArrayBuffer>;
|
|
2830
2830
|
|
|
2831
2831
|
/**
|
|
2832
2832
|
* Returns the value of the first element in the array where predicate is true, and undefined
|
|
@@ -2837,7 +2837,7 @@ interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLi
|
|
|
2837
2837
|
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
2838
2838
|
* predicate. If it is not provided, undefined is used instead.
|
|
2839
2839
|
*/
|
|
2840
|
-
find(predicate: (value:
|
|
2840
|
+
find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: unknown): number | undefined;
|
|
2841
2841
|
|
|
2842
2842
|
/**
|
|
2843
2843
|
* Returns the index of the first element in the array where predicate is true, and -1
|
|
@@ -2848,7 +2848,7 @@ interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLi
|
|
|
2848
2848
|
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
2849
2849
|
* predicate. If it is not provided, undefined is used instead.
|
|
2850
2850
|
*/
|
|
2851
|
-
findIndex(predicate: (value:
|
|
2851
|
+
findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: unknown): number;
|
|
2852
2852
|
|
|
2853
2853
|
/**
|
|
2854
2854
|
* Performs the specified action for each element in an array.
|
|
@@ -2857,7 +2857,7 @@ interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLi
|
|
|
2857
2857
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
|
2858
2858
|
* If thisArg is omitted, undefined is used as the this value.
|
|
2859
2859
|
*/
|
|
2860
|
-
forEach(callbackfn: (value:
|
|
2860
|
+
forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: unknown): void;
|
|
2861
2861
|
|
|
2862
2862
|
/**
|
|
2863
2863
|
* Returns the index of the first occurrence of a value in an array.
|
|
@@ -2865,7 +2865,7 @@ interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLi
|
|
|
2865
2865
|
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
|
2866
2866
|
* search starts at index 0.
|
|
2867
2867
|
*/
|
|
2868
|
-
indexOf(searchElement:
|
|
2868
|
+
indexOf(searchElement: number, fromIndex?: number): number;
|
|
2869
2869
|
|
|
2870
2870
|
/**
|
|
2871
2871
|
* Adds all the elements of an array separated by the specified separator string.
|
|
@@ -2880,7 +2880,7 @@ interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLi
|
|
|
2880
2880
|
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
|
2881
2881
|
* search starts at index 0.
|
|
2882
2882
|
*/
|
|
2883
|
-
lastIndexOf(searchElement:
|
|
2883
|
+
lastIndexOf(searchElement: number, fromIndex?: number): number;
|
|
2884
2884
|
|
|
2885
2885
|
/**
|
|
2886
2886
|
* The length of the array.
|
|
@@ -2895,7 +2895,7 @@ interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLi
|
|
|
2895
2895
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
|
2896
2896
|
* If thisArg is omitted, undefined is used as the this value.
|
|
2897
2897
|
*/
|
|
2898
|
-
map(callbackfn: (value:
|
|
2898
|
+
map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: unknown): Uint8ClampedArray<ArrayBuffer>;
|
|
2899
2899
|
|
|
2900
2900
|
/**
|
|
2901
2901
|
* Calls the specified callback function for all the elements in an array. The return value of
|
|
@@ -2907,8 +2907,8 @@ interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLi
|
|
|
2907
2907
|
* the accumulation. The first call to the callbackfn function provides this value as an argument
|
|
2908
2908
|
* instead of an array value.
|
|
2909
2909
|
*/
|
|
2910
|
-
reduce(callbackfn: (previousValue:
|
|
2911
|
-
reduce(callbackfn: (previousValue:
|
|
2910
|
+
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
|
|
2911
|
+
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
|
|
2912
2912
|
|
|
2913
2913
|
/**
|
|
2914
2914
|
* Calls the specified callback function for all the elements in an array. The return value of
|
|
@@ -2920,7 +2920,7 @@ interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLi
|
|
|
2920
2920
|
* the accumulation. The first call to the callbackfn function provides this value as an argument
|
|
2921
2921
|
* instead of an array value.
|
|
2922
2922
|
*/
|
|
2923
|
-
reduce<U>(callbackfn: (previousValue: U, currentValue:
|
|
2923
|
+
reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
|
|
2924
2924
|
|
|
2925
2925
|
/**
|
|
2926
2926
|
* Calls the specified callback function for all the elements in an array, in descending order.
|
|
@@ -2932,8 +2932,8 @@ interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLi
|
|
|
2932
2932
|
* the accumulation. The first call to the callbackfn function provides this value as an
|
|
2933
2933
|
* argument instead of an array value.
|
|
2934
2934
|
*/
|
|
2935
|
-
reduceRight(callbackfn: (previousValue:
|
|
2936
|
-
reduceRight(callbackfn: (previousValue:
|
|
2935
|
+
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
|
|
2936
|
+
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
|
|
2937
2937
|
|
|
2938
2938
|
/**
|
|
2939
2939
|
* Calls the specified callback function for all the elements in an array, in descending order.
|
|
@@ -2945,7 +2945,7 @@ interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLi
|
|
|
2945
2945
|
* the accumulation. The first call to the callbackfn function provides this value as an argument
|
|
2946
2946
|
* instead of an array value.
|
|
2947
2947
|
*/
|
|
2948
|
-
reduceRight<U>(callbackfn: (previousValue: U, currentValue:
|
|
2948
|
+
reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
|
|
2949
2949
|
|
|
2950
2950
|
/**
|
|
2951
2951
|
* Reverses the elements in an Array.
|
|
@@ -2957,7 +2957,7 @@ interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLi
|
|
|
2957
2957
|
* @param array A typed or untyped array of values to set.
|
|
2958
2958
|
* @param offset The index in the current array at which the values are to be written.
|
|
2959
2959
|
*/
|
|
2960
|
-
set(array: ArrayLike<
|
|
2960
|
+
set(array: ArrayLike<number>, offset?: number): void;
|
|
2961
2961
|
|
|
2962
2962
|
/**
|
|
2963
2963
|
* Returns a section of an array.
|
|
@@ -2974,7 +2974,7 @@ interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLi
|
|
|
2974
2974
|
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
2975
2975
|
* If thisArg is omitted, undefined is used as the this value.
|
|
2976
2976
|
*/
|
|
2977
|
-
some(predicate: (value:
|
|
2977
|
+
some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: unknown): boolean;
|
|
2978
2978
|
|
|
2979
2979
|
/**
|
|
2980
2980
|
* Sorts an array.
|
|
@@ -2985,7 +2985,7 @@ interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLi
|
|
|
2985
2985
|
* [11,2,22,1].sort((a, b) => a - b)
|
|
2986
2986
|
* ```
|
|
2987
2987
|
*/
|
|
2988
|
-
sort(compareFn?: (a:
|
|
2988
|
+
sort(compareFn?: (a: number, b: number) => number): this;
|
|
2989
2989
|
|
|
2990
2990
|
/**
|
|
2991
2991
|
* Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements
|
|
@@ -3008,15 +3008,15 @@ interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLi
|
|
|
3008
3008
|
/** Returns the primitive value of the specified object. */
|
|
3009
3009
|
valueOf(): this;
|
|
3010
3010
|
|
|
3011
|
-
[index: number]:
|
|
3011
|
+
[index: number]: number;
|
|
3012
3012
|
}
|
|
3013
3013
|
interface Uint8ClampedArrayConstructor {
|
|
3014
3014
|
readonly prototype: Uint8ClampedArray<ArrayBufferLike>;
|
|
3015
3015
|
new (length: number): Uint8ClampedArray<ArrayBuffer>;
|
|
3016
|
-
new (array: ArrayLike<
|
|
3016
|
+
new (array: ArrayLike<number>): Uint8ClampedArray<ArrayBuffer>;
|
|
3017
3017
|
new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray<TArrayBuffer>;
|
|
3018
3018
|
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray<ArrayBuffer>;
|
|
3019
|
-
new (array: ArrayLike<
|
|
3019
|
+
new (array: ArrayLike<number> | ArrayBuffer): Uint8ClampedArray<ArrayBuffer>;
|
|
3020
3020
|
|
|
3021
3021
|
/**
|
|
3022
3022
|
* The size in bytes of each element in the array.
|
|
@@ -3027,13 +3027,13 @@ interface Uint8ClampedArrayConstructor {
|
|
|
3027
3027
|
* Returns a new array from a set of elements.
|
|
3028
3028
|
* @param items A set of elements to include in the new array object.
|
|
3029
3029
|
*/
|
|
3030
|
-
of(...items:
|
|
3030
|
+
of(...items: number[]): Uint8ClampedArray<ArrayBuffer>;
|
|
3031
3031
|
|
|
3032
3032
|
/**
|
|
3033
3033
|
* Creates an array from an array-like or iterable object.
|
|
3034
3034
|
* @param arrayLike An array-like object to convert to an array.
|
|
3035
3035
|
*/
|
|
3036
|
-
from(arrayLike: ArrayLike<
|
|
3036
|
+
from(arrayLike: ArrayLike<number>): Uint8ClampedArray<ArrayBuffer>;
|
|
3037
3037
|
|
|
3038
3038
|
/**
|
|
3039
3039
|
* Creates an array from an array-like or iterable object.
|
|
@@ -3041,7 +3041,7 @@ interface Uint8ClampedArrayConstructor {
|
|
|
3041
3041
|
* @param mapfn A mapping function to call on every element of the array.
|
|
3042
3042
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
3043
3043
|
*/
|
|
3044
|
-
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) =>
|
|
3044
|
+
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: unknown): Uint8ClampedArray<ArrayBuffer>;
|
|
3045
3045
|
}
|
|
3046
3046
|
declare var Uint8ClampedArray: Uint8ClampedArrayConstructor;
|
|
3047
3047
|
|
|
@@ -3089,7 +3089,7 @@ interface Int16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3089
3089
|
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
3090
3090
|
* If thisArg is omitted, undefined is used as the this value.
|
|
3091
3091
|
*/
|
|
3092
|
-
every(predicate: (value:
|
|
3092
|
+
every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: unknown): boolean;
|
|
3093
3093
|
|
|
3094
3094
|
/**
|
|
3095
3095
|
* Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
|
@@ -3099,7 +3099,7 @@ interface Int16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3099
3099
|
* @param end index to stop filling the array at. If end is negative, it is treated as
|
|
3100
3100
|
* length+end.
|
|
3101
3101
|
*/
|
|
3102
|
-
fill(value:
|
|
3102
|
+
fill(value: number, start?: number, end?: number): this;
|
|
3103
3103
|
|
|
3104
3104
|
/**
|
|
3105
3105
|
* Returns the elements of an array that meet the condition specified in a callback function.
|
|
@@ -3108,7 +3108,7 @@ interface Int16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3108
3108
|
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
3109
3109
|
* If thisArg is omitted, undefined is used as the this value.
|
|
3110
3110
|
*/
|
|
3111
|
-
filter(predicate: (value:
|
|
3111
|
+
filter(predicate: (value: number, index: number, array: this) => unknown, thisArg?: unknown): Int16Array<ArrayBuffer>;
|
|
3112
3112
|
|
|
3113
3113
|
/**
|
|
3114
3114
|
* Returns the value of the first element in the array where predicate is true, and undefined
|
|
@@ -3119,7 +3119,7 @@ interface Int16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3119
3119
|
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
3120
3120
|
* predicate. If it is not provided, undefined is used instead.
|
|
3121
3121
|
*/
|
|
3122
|
-
find(predicate: (value:
|
|
3122
|
+
find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: unknown): number | undefined;
|
|
3123
3123
|
|
|
3124
3124
|
/**
|
|
3125
3125
|
* Returns the index of the first element in the array where predicate is true, and -1
|
|
@@ -3130,7 +3130,7 @@ interface Int16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3130
3130
|
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
3131
3131
|
* predicate. If it is not provided, undefined is used instead.
|
|
3132
3132
|
*/
|
|
3133
|
-
findIndex(predicate: (value:
|
|
3133
|
+
findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: unknown): number;
|
|
3134
3134
|
|
|
3135
3135
|
/**
|
|
3136
3136
|
* Performs the specified action for each element in an array.
|
|
@@ -3139,14 +3139,14 @@ interface Int16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3139
3139
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
|
3140
3140
|
* If thisArg is omitted, undefined is used as the this value.
|
|
3141
3141
|
*/
|
|
3142
|
-
forEach(callbackfn: (value:
|
|
3142
|
+
forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: unknown): void;
|
|
3143
3143
|
/**
|
|
3144
3144
|
* Returns the index of the first occurrence of a value in an array.
|
|
3145
3145
|
* @param searchElement The value to locate in the array.
|
|
3146
3146
|
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
|
3147
3147
|
* search starts at index 0.
|
|
3148
3148
|
*/
|
|
3149
|
-
indexOf(searchElement:
|
|
3149
|
+
indexOf(searchElement: number, fromIndex?: number): number;
|
|
3150
3150
|
|
|
3151
3151
|
/**
|
|
3152
3152
|
* Adds all the elements of an array separated by the specified separator string.
|
|
@@ -3161,7 +3161,7 @@ interface Int16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3161
3161
|
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
|
3162
3162
|
* search starts at index 0.
|
|
3163
3163
|
*/
|
|
3164
|
-
lastIndexOf(searchElement:
|
|
3164
|
+
lastIndexOf(searchElement: number, fromIndex?: number): number;
|
|
3165
3165
|
|
|
3166
3166
|
/**
|
|
3167
3167
|
* The length of the array.
|
|
@@ -3176,7 +3176,7 @@ interface Int16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3176
3176
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
|
3177
3177
|
* If thisArg is omitted, undefined is used as the this value.
|
|
3178
3178
|
*/
|
|
3179
|
-
map(callbackfn: (value:
|
|
3179
|
+
map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: unknown): Int16Array<ArrayBuffer>;
|
|
3180
3180
|
|
|
3181
3181
|
/**
|
|
3182
3182
|
* Calls the specified callback function for all the elements in an array. The return value of
|
|
@@ -3188,8 +3188,8 @@ interface Int16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3188
3188
|
* the accumulation. The first call to the callbackfn function provides this value as an argument
|
|
3189
3189
|
* instead of an array value.
|
|
3190
3190
|
*/
|
|
3191
|
-
reduce(callbackfn: (previousValue:
|
|
3192
|
-
reduce(callbackfn: (previousValue:
|
|
3191
|
+
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
|
|
3192
|
+
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
|
|
3193
3193
|
|
|
3194
3194
|
/**
|
|
3195
3195
|
* Calls the specified callback function for all the elements in an array. The return value of
|
|
@@ -3201,7 +3201,7 @@ interface Int16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3201
3201
|
* the accumulation. The first call to the callbackfn function provides this value as an argument
|
|
3202
3202
|
* instead of an array value.
|
|
3203
3203
|
*/
|
|
3204
|
-
reduce<U>(callbackfn: (previousValue: U, currentValue:
|
|
3204
|
+
reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
|
|
3205
3205
|
|
|
3206
3206
|
/**
|
|
3207
3207
|
* Calls the specified callback function for all the elements in an array, in descending order.
|
|
@@ -3213,8 +3213,8 @@ interface Int16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3213
3213
|
* the accumulation. The first call to the callbackfn function provides this value as an
|
|
3214
3214
|
* argument instead of an array value.
|
|
3215
3215
|
*/
|
|
3216
|
-
reduceRight(callbackfn: (previousValue:
|
|
3217
|
-
reduceRight(callbackfn: (previousValue:
|
|
3216
|
+
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
|
|
3217
|
+
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
|
|
3218
3218
|
|
|
3219
3219
|
/**
|
|
3220
3220
|
* Calls the specified callback function for all the elements in an array, in descending order.
|
|
@@ -3226,7 +3226,7 @@ interface Int16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3226
3226
|
* the accumulation. The first call to the callbackfn function provides this value as an argument
|
|
3227
3227
|
* instead of an array value.
|
|
3228
3228
|
*/
|
|
3229
|
-
reduceRight<U>(callbackfn: (previousValue: U, currentValue:
|
|
3229
|
+
reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
|
|
3230
3230
|
|
|
3231
3231
|
/**
|
|
3232
3232
|
* Reverses the elements in an Array.
|
|
@@ -3238,7 +3238,7 @@ interface Int16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3238
3238
|
* @param array A typed or untyped array of values to set.
|
|
3239
3239
|
* @param offset The index in the current array at which the values are to be written.
|
|
3240
3240
|
*/
|
|
3241
|
-
set(array: ArrayLike<
|
|
3241
|
+
set(array: ArrayLike<number>, offset?: number): void;
|
|
3242
3242
|
|
|
3243
3243
|
/**
|
|
3244
3244
|
* Returns a section of an array.
|
|
@@ -3255,7 +3255,7 @@ interface Int16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3255
3255
|
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
3256
3256
|
* If thisArg is omitted, undefined is used as the this value.
|
|
3257
3257
|
*/
|
|
3258
|
-
some(predicate: (value:
|
|
3258
|
+
some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: unknown): boolean;
|
|
3259
3259
|
|
|
3260
3260
|
/**
|
|
3261
3261
|
* Sorts an array.
|
|
@@ -3266,7 +3266,7 @@ interface Int16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3266
3266
|
* [11,2,22,1].sort((a, b) => a - b)
|
|
3267
3267
|
* ```
|
|
3268
3268
|
*/
|
|
3269
|
-
sort(compareFn?: (a:
|
|
3269
|
+
sort(compareFn?: (a: number, b: number) => number): this;
|
|
3270
3270
|
|
|
3271
3271
|
/**
|
|
3272
3272
|
* Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements
|
|
@@ -3289,15 +3289,15 @@ interface Int16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3289
3289
|
/** Returns the primitive value of the specified object. */
|
|
3290
3290
|
valueOf(): this;
|
|
3291
3291
|
|
|
3292
|
-
[index: number]:
|
|
3292
|
+
[index: number]: number;
|
|
3293
3293
|
}
|
|
3294
3294
|
interface Int16ArrayConstructor {
|
|
3295
3295
|
readonly prototype: Int16Array<ArrayBufferLike>;
|
|
3296
3296
|
new (length: number): Int16Array<ArrayBuffer>;
|
|
3297
|
-
new (array: ArrayLike<
|
|
3297
|
+
new (array: ArrayLike<number>): Int16Array<ArrayBuffer>;
|
|
3298
3298
|
new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): Int16Array<TArrayBuffer>;
|
|
3299
3299
|
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array<ArrayBuffer>;
|
|
3300
|
-
new (array: ArrayLike<
|
|
3300
|
+
new (array: ArrayLike<number> | ArrayBuffer): Int16Array<ArrayBuffer>;
|
|
3301
3301
|
|
|
3302
3302
|
/**
|
|
3303
3303
|
* The size in bytes of each element in the array.
|
|
@@ -3308,13 +3308,13 @@ interface Int16ArrayConstructor {
|
|
|
3308
3308
|
* Returns a new array from a set of elements.
|
|
3309
3309
|
* @param items A set of elements to include in the new array object.
|
|
3310
3310
|
*/
|
|
3311
|
-
of(...items:
|
|
3311
|
+
of(...items: number[]): Int16Array<ArrayBuffer>;
|
|
3312
3312
|
|
|
3313
3313
|
/**
|
|
3314
3314
|
* Creates an array from an array-like or iterable object.
|
|
3315
3315
|
* @param arrayLike An array-like object to convert to an array.
|
|
3316
3316
|
*/
|
|
3317
|
-
from(arrayLike: ArrayLike<
|
|
3317
|
+
from(arrayLike: ArrayLike<number>): Int16Array<ArrayBuffer>;
|
|
3318
3318
|
|
|
3319
3319
|
/**
|
|
3320
3320
|
* Creates an array from an array-like or iterable object.
|
|
@@ -3322,7 +3322,7 @@ interface Int16ArrayConstructor {
|
|
|
3322
3322
|
* @param mapfn A mapping function to call on every element of the array.
|
|
3323
3323
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
3324
3324
|
*/
|
|
3325
|
-
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) =>
|
|
3325
|
+
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: unknown): Int16Array<ArrayBuffer>;
|
|
3326
3326
|
}
|
|
3327
3327
|
declare var Int16Array: Int16ArrayConstructor;
|
|
3328
3328
|
|
|
@@ -3370,7 +3370,7 @@ interface Uint16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3370
3370
|
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
3371
3371
|
* If thisArg is omitted, undefined is used as the this value.
|
|
3372
3372
|
*/
|
|
3373
|
-
every(predicate: (value:
|
|
3373
|
+
every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: unknown): boolean;
|
|
3374
3374
|
|
|
3375
3375
|
/**
|
|
3376
3376
|
* Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
|
@@ -3380,7 +3380,7 @@ interface Uint16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3380
3380
|
* @param end index to stop filling the array at. If end is negative, it is treated as
|
|
3381
3381
|
* length+end.
|
|
3382
3382
|
*/
|
|
3383
|
-
fill(value:
|
|
3383
|
+
fill(value: number, start?: number, end?: number): this;
|
|
3384
3384
|
|
|
3385
3385
|
/**
|
|
3386
3386
|
* Returns the elements of an array that meet the condition specified in a callback function.
|
|
@@ -3389,7 +3389,7 @@ interface Uint16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3389
3389
|
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
3390
3390
|
* If thisArg is omitted, undefined is used as the this value.
|
|
3391
3391
|
*/
|
|
3392
|
-
filter(predicate: (value:
|
|
3392
|
+
filter(predicate: (value: number, index: number, array: this) => unknown, thisArg?: unknown): Uint16Array<ArrayBuffer>;
|
|
3393
3393
|
|
|
3394
3394
|
/**
|
|
3395
3395
|
* Returns the value of the first element in the array where predicate is true, and undefined
|
|
@@ -3400,7 +3400,7 @@ interface Uint16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3400
3400
|
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
3401
3401
|
* predicate. If it is not provided, undefined is used instead.
|
|
3402
3402
|
*/
|
|
3403
|
-
find(predicate: (value:
|
|
3403
|
+
find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: unknown): number | undefined;
|
|
3404
3404
|
|
|
3405
3405
|
/**
|
|
3406
3406
|
* Returns the index of the first element in the array where predicate is true, and -1
|
|
@@ -3411,7 +3411,7 @@ interface Uint16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3411
3411
|
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
3412
3412
|
* predicate. If it is not provided, undefined is used instead.
|
|
3413
3413
|
*/
|
|
3414
|
-
findIndex(predicate: (value:
|
|
3414
|
+
findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: unknown): number;
|
|
3415
3415
|
|
|
3416
3416
|
/**
|
|
3417
3417
|
* Performs the specified action for each element in an array.
|
|
@@ -3420,7 +3420,7 @@ interface Uint16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3420
3420
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
|
3421
3421
|
* If thisArg is omitted, undefined is used as the this value.
|
|
3422
3422
|
*/
|
|
3423
|
-
forEach(callbackfn: (value:
|
|
3423
|
+
forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: unknown): void;
|
|
3424
3424
|
|
|
3425
3425
|
/**
|
|
3426
3426
|
* Returns the index of the first occurrence of a value in an array.
|
|
@@ -3428,7 +3428,7 @@ interface Uint16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3428
3428
|
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
|
3429
3429
|
* search starts at index 0.
|
|
3430
3430
|
*/
|
|
3431
|
-
indexOf(searchElement:
|
|
3431
|
+
indexOf(searchElement: number, fromIndex?: number): number;
|
|
3432
3432
|
|
|
3433
3433
|
/**
|
|
3434
3434
|
* Adds all the elements of an array separated by the specified separator string.
|
|
@@ -3443,7 +3443,7 @@ interface Uint16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3443
3443
|
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
|
3444
3444
|
* search starts at index 0.
|
|
3445
3445
|
*/
|
|
3446
|
-
lastIndexOf(searchElement:
|
|
3446
|
+
lastIndexOf(searchElement: number, fromIndex?: number): number;
|
|
3447
3447
|
|
|
3448
3448
|
/**
|
|
3449
3449
|
* The length of the array.
|
|
@@ -3458,7 +3458,7 @@ interface Uint16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3458
3458
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
|
3459
3459
|
* If thisArg is omitted, undefined is used as the this value.
|
|
3460
3460
|
*/
|
|
3461
|
-
map(callbackfn: (value:
|
|
3461
|
+
map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: unknown): Uint16Array<ArrayBuffer>;
|
|
3462
3462
|
|
|
3463
3463
|
/**
|
|
3464
3464
|
* Calls the specified callback function for all the elements in an array. The return value of
|
|
@@ -3470,8 +3470,8 @@ interface Uint16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3470
3470
|
* the accumulation. The first call to the callbackfn function provides this value as an argument
|
|
3471
3471
|
* instead of an array value.
|
|
3472
3472
|
*/
|
|
3473
|
-
reduce(callbackfn: (previousValue:
|
|
3474
|
-
reduce(callbackfn: (previousValue:
|
|
3473
|
+
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
|
|
3474
|
+
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
|
|
3475
3475
|
|
|
3476
3476
|
/**
|
|
3477
3477
|
* Calls the specified callback function for all the elements in an array. The return value of
|
|
@@ -3483,7 +3483,7 @@ interface Uint16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3483
3483
|
* the accumulation. The first call to the callbackfn function provides this value as an argument
|
|
3484
3484
|
* instead of an array value.
|
|
3485
3485
|
*/
|
|
3486
|
-
reduce<U>(callbackfn: (previousValue: U, currentValue:
|
|
3486
|
+
reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
|
|
3487
3487
|
|
|
3488
3488
|
/**
|
|
3489
3489
|
* Calls the specified callback function for all the elements in an array, in descending order.
|
|
@@ -3495,8 +3495,8 @@ interface Uint16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3495
3495
|
* the accumulation. The first call to the callbackfn function provides this value as an
|
|
3496
3496
|
* argument instead of an array value.
|
|
3497
3497
|
*/
|
|
3498
|
-
reduceRight(callbackfn: (previousValue:
|
|
3499
|
-
reduceRight(callbackfn: (previousValue:
|
|
3498
|
+
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
|
|
3499
|
+
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
|
|
3500
3500
|
|
|
3501
3501
|
/**
|
|
3502
3502
|
* Calls the specified callback function for all the elements in an array, in descending order.
|
|
@@ -3508,7 +3508,7 @@ interface Uint16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3508
3508
|
* the accumulation. The first call to the callbackfn function provides this value as an argument
|
|
3509
3509
|
* instead of an array value.
|
|
3510
3510
|
*/
|
|
3511
|
-
reduceRight<U>(callbackfn: (previousValue: U, currentValue:
|
|
3511
|
+
reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
|
|
3512
3512
|
|
|
3513
3513
|
/**
|
|
3514
3514
|
* Reverses the elements in an Array.
|
|
@@ -3520,7 +3520,7 @@ interface Uint16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3520
3520
|
* @param array A typed or untyped array of values to set.
|
|
3521
3521
|
* @param offset The index in the current array at which the values are to be written.
|
|
3522
3522
|
*/
|
|
3523
|
-
set(array: ArrayLike<
|
|
3523
|
+
set(array: ArrayLike<number>, offset?: number): void;
|
|
3524
3524
|
|
|
3525
3525
|
/**
|
|
3526
3526
|
* Returns a section of an array.
|
|
@@ -3537,7 +3537,7 @@ interface Uint16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3537
3537
|
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
3538
3538
|
* If thisArg is omitted, undefined is used as the this value.
|
|
3539
3539
|
*/
|
|
3540
|
-
some(predicate: (value:
|
|
3540
|
+
some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: unknown): boolean;
|
|
3541
3541
|
|
|
3542
3542
|
/**
|
|
3543
3543
|
* Sorts an array.
|
|
@@ -3548,7 +3548,7 @@ interface Uint16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3548
3548
|
* [11,2,22,1].sort((a, b) => a - b)
|
|
3549
3549
|
* ```
|
|
3550
3550
|
*/
|
|
3551
|
-
sort(compareFn?: (a:
|
|
3551
|
+
sort(compareFn?: (a: number, b: number) => number): this;
|
|
3552
3552
|
|
|
3553
3553
|
/**
|
|
3554
3554
|
* Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements
|
|
@@ -3571,15 +3571,15 @@ interface Uint16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3571
3571
|
/** Returns the primitive value of the specified object. */
|
|
3572
3572
|
valueOf(): this;
|
|
3573
3573
|
|
|
3574
|
-
[index: number]:
|
|
3574
|
+
[index: number]: number;
|
|
3575
3575
|
}
|
|
3576
3576
|
interface Uint16ArrayConstructor {
|
|
3577
3577
|
readonly prototype: Uint16Array<ArrayBufferLike>;
|
|
3578
3578
|
new (length: number): Uint16Array<ArrayBuffer>;
|
|
3579
|
-
new (array: ArrayLike<
|
|
3579
|
+
new (array: ArrayLike<number>): Uint16Array<ArrayBuffer>;
|
|
3580
3580
|
new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint16Array<TArrayBuffer>;
|
|
3581
3581
|
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array<ArrayBuffer>;
|
|
3582
|
-
new (array: ArrayLike<
|
|
3582
|
+
new (array: ArrayLike<number> | ArrayBuffer): Uint16Array<ArrayBuffer>;
|
|
3583
3583
|
|
|
3584
3584
|
/**
|
|
3585
3585
|
* The size in bytes of each element in the array.
|
|
@@ -3590,13 +3590,13 @@ interface Uint16ArrayConstructor {
|
|
|
3590
3590
|
* Returns a new array from a set of elements.
|
|
3591
3591
|
* @param items A set of elements to include in the new array object.
|
|
3592
3592
|
*/
|
|
3593
|
-
of(...items:
|
|
3593
|
+
of(...items: number[]): Uint16Array<ArrayBuffer>;
|
|
3594
3594
|
|
|
3595
3595
|
/**
|
|
3596
3596
|
* Creates an array from an array-like or iterable object.
|
|
3597
3597
|
* @param arrayLike An array-like object to convert to an array.
|
|
3598
3598
|
*/
|
|
3599
|
-
from(arrayLike: ArrayLike<
|
|
3599
|
+
from(arrayLike: ArrayLike<number>): Uint16Array<ArrayBuffer>;
|
|
3600
3600
|
|
|
3601
3601
|
/**
|
|
3602
3602
|
* Creates an array from an array-like or iterable object.
|
|
@@ -3604,7 +3604,7 @@ interface Uint16ArrayConstructor {
|
|
|
3604
3604
|
* @param mapfn A mapping function to call on every element of the array.
|
|
3605
3605
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
3606
3606
|
*/
|
|
3607
|
-
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) =>
|
|
3607
|
+
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: unknown): Uint16Array<ArrayBuffer>;
|
|
3608
3608
|
}
|
|
3609
3609
|
declare var Uint16Array: Uint16ArrayConstructor;
|
|
3610
3610
|
/**
|
|
@@ -3651,7 +3651,7 @@ interface Int32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3651
3651
|
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
3652
3652
|
* If thisArg is omitted, undefined is used as the this value.
|
|
3653
3653
|
*/
|
|
3654
|
-
every(predicate: (value:
|
|
3654
|
+
every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: unknown): boolean;
|
|
3655
3655
|
|
|
3656
3656
|
/**
|
|
3657
3657
|
* Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
|
@@ -3661,7 +3661,7 @@ interface Int32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3661
3661
|
* @param end index to stop filling the array at. If end is negative, it is treated as
|
|
3662
3662
|
* length+end.
|
|
3663
3663
|
*/
|
|
3664
|
-
fill(value:
|
|
3664
|
+
fill(value: number, start?: number, end?: number): this;
|
|
3665
3665
|
|
|
3666
3666
|
/**
|
|
3667
3667
|
* Returns the elements of an array that meet the condition specified in a callback function.
|
|
@@ -3670,7 +3670,7 @@ interface Int32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3670
3670
|
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
3671
3671
|
* If thisArg is omitted, undefined is used as the this value.
|
|
3672
3672
|
*/
|
|
3673
|
-
filter(predicate: (value:
|
|
3673
|
+
filter(predicate: (value: number, index: number, array: this) => unknown, thisArg?: unknown): Int32Array<ArrayBuffer>;
|
|
3674
3674
|
|
|
3675
3675
|
/**
|
|
3676
3676
|
* Returns the value of the first element in the array where predicate is true, and undefined
|
|
@@ -3681,7 +3681,7 @@ interface Int32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3681
3681
|
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
3682
3682
|
* predicate. If it is not provided, undefined is used instead.
|
|
3683
3683
|
*/
|
|
3684
|
-
find(predicate: (value:
|
|
3684
|
+
find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: unknown): number | undefined;
|
|
3685
3685
|
|
|
3686
3686
|
/**
|
|
3687
3687
|
* Returns the index of the first element in the array where predicate is true, and -1
|
|
@@ -3692,7 +3692,7 @@ interface Int32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3692
3692
|
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
3693
3693
|
* predicate. If it is not provided, undefined is used instead.
|
|
3694
3694
|
*/
|
|
3695
|
-
findIndex(predicate: (value:
|
|
3695
|
+
findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: unknown): number;
|
|
3696
3696
|
|
|
3697
3697
|
/**
|
|
3698
3698
|
* Performs the specified action for each element in an array.
|
|
@@ -3701,7 +3701,7 @@ interface Int32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3701
3701
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
|
3702
3702
|
* If thisArg is omitted, undefined is used as the this value.
|
|
3703
3703
|
*/
|
|
3704
|
-
forEach(callbackfn: (value:
|
|
3704
|
+
forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: unknown): void;
|
|
3705
3705
|
|
|
3706
3706
|
/**
|
|
3707
3707
|
* Returns the index of the first occurrence of a value in an array.
|
|
@@ -3709,7 +3709,7 @@ interface Int32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3709
3709
|
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
|
3710
3710
|
* search starts at index 0.
|
|
3711
3711
|
*/
|
|
3712
|
-
indexOf(searchElement:
|
|
3712
|
+
indexOf(searchElement: number, fromIndex?: number): number;
|
|
3713
3713
|
|
|
3714
3714
|
/**
|
|
3715
3715
|
* Adds all the elements of an array separated by the specified separator string.
|
|
@@ -3724,7 +3724,7 @@ interface Int32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3724
3724
|
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
|
3725
3725
|
* search starts at index 0.
|
|
3726
3726
|
*/
|
|
3727
|
-
lastIndexOf(searchElement:
|
|
3727
|
+
lastIndexOf(searchElement: number, fromIndex?: number): number;
|
|
3728
3728
|
|
|
3729
3729
|
/**
|
|
3730
3730
|
* The length of the array.
|
|
@@ -3739,7 +3739,7 @@ interface Int32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3739
3739
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
|
3740
3740
|
* If thisArg is omitted, undefined is used as the this value.
|
|
3741
3741
|
*/
|
|
3742
|
-
map(callbackfn: (value:
|
|
3742
|
+
map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: unknown): Int32Array<ArrayBuffer>;
|
|
3743
3743
|
|
|
3744
3744
|
/**
|
|
3745
3745
|
* Calls the specified callback function for all the elements in an array. The return value of
|
|
@@ -3751,8 +3751,8 @@ interface Int32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3751
3751
|
* the accumulation. The first call to the callbackfn function provides this value as an argument
|
|
3752
3752
|
* instead of an array value.
|
|
3753
3753
|
*/
|
|
3754
|
-
reduce(callbackfn: (previousValue:
|
|
3755
|
-
reduce(callbackfn: (previousValue:
|
|
3754
|
+
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
|
|
3755
|
+
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
|
|
3756
3756
|
|
|
3757
3757
|
/**
|
|
3758
3758
|
* Calls the specified callback function for all the elements in an array. The return value of
|
|
@@ -3764,7 +3764,7 @@ interface Int32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3764
3764
|
* the accumulation. The first call to the callbackfn function provides this value as an argument
|
|
3765
3765
|
* instead of an array value.
|
|
3766
3766
|
*/
|
|
3767
|
-
reduce<U>(callbackfn: (previousValue: U, currentValue:
|
|
3767
|
+
reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
|
|
3768
3768
|
|
|
3769
3769
|
/**
|
|
3770
3770
|
* Calls the specified callback function for all the elements in an array, in descending order.
|
|
@@ -3776,8 +3776,8 @@ interface Int32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3776
3776
|
* the accumulation. The first call to the callbackfn function provides this value as an
|
|
3777
3777
|
* argument instead of an array value.
|
|
3778
3778
|
*/
|
|
3779
|
-
reduceRight(callbackfn: (previousValue:
|
|
3780
|
-
reduceRight(callbackfn: (previousValue:
|
|
3779
|
+
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
|
|
3780
|
+
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
|
|
3781
3781
|
|
|
3782
3782
|
/**
|
|
3783
3783
|
* Calls the specified callback function for all the elements in an array, in descending order.
|
|
@@ -3789,7 +3789,7 @@ interface Int32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3789
3789
|
* the accumulation. The first call to the callbackfn function provides this value as an argument
|
|
3790
3790
|
* instead of an array value.
|
|
3791
3791
|
*/
|
|
3792
|
-
reduceRight<U>(callbackfn: (previousValue: U, currentValue:
|
|
3792
|
+
reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
|
|
3793
3793
|
|
|
3794
3794
|
/**
|
|
3795
3795
|
* Reverses the elements in an Array.
|
|
@@ -3801,7 +3801,7 @@ interface Int32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3801
3801
|
* @param array A typed or untyped array of values to set.
|
|
3802
3802
|
* @param offset The index in the current array at which the values are to be written.
|
|
3803
3803
|
*/
|
|
3804
|
-
set(array: ArrayLike<
|
|
3804
|
+
set(array: ArrayLike<number>, offset?: number): void;
|
|
3805
3805
|
|
|
3806
3806
|
/**
|
|
3807
3807
|
* Returns a section of an array.
|
|
@@ -3818,7 +3818,7 @@ interface Int32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3818
3818
|
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
3819
3819
|
* If thisArg is omitted, undefined is used as the this value.
|
|
3820
3820
|
*/
|
|
3821
|
-
some(predicate: (value:
|
|
3821
|
+
some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: unknown): boolean;
|
|
3822
3822
|
|
|
3823
3823
|
/**
|
|
3824
3824
|
* Sorts an array.
|
|
@@ -3829,7 +3829,7 @@ interface Int32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3829
3829
|
* [11,2,22,1].sort((a, b) => a - b)
|
|
3830
3830
|
* ```
|
|
3831
3831
|
*/
|
|
3832
|
-
sort(compareFn?: (a:
|
|
3832
|
+
sort(compareFn?: (a: number, b: number) => number): this;
|
|
3833
3833
|
|
|
3834
3834
|
/**
|
|
3835
3835
|
* Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements
|
|
@@ -3852,15 +3852,15 @@ interface Int32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3852
3852
|
/** Returns the primitive value of the specified object. */
|
|
3853
3853
|
valueOf(): this;
|
|
3854
3854
|
|
|
3855
|
-
[index: number]:
|
|
3855
|
+
[index: number]: number;
|
|
3856
3856
|
}
|
|
3857
3857
|
interface Int32ArrayConstructor {
|
|
3858
3858
|
readonly prototype: Int32Array<ArrayBufferLike>;
|
|
3859
3859
|
new (length: number): Int32Array<ArrayBuffer>;
|
|
3860
|
-
new (array: ArrayLike<
|
|
3860
|
+
new (array: ArrayLike<number>): Int32Array<ArrayBuffer>;
|
|
3861
3861
|
new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): Int32Array<TArrayBuffer>;
|
|
3862
3862
|
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array<ArrayBuffer>;
|
|
3863
|
-
new (array: ArrayLike<
|
|
3863
|
+
new (array: ArrayLike<number> | ArrayBuffer): Int32Array<ArrayBuffer>;
|
|
3864
3864
|
|
|
3865
3865
|
/**
|
|
3866
3866
|
* The size in bytes of each element in the array.
|
|
@@ -3871,13 +3871,13 @@ interface Int32ArrayConstructor {
|
|
|
3871
3871
|
* Returns a new array from a set of elements.
|
|
3872
3872
|
* @param items A set of elements to include in the new array object.
|
|
3873
3873
|
*/
|
|
3874
|
-
of(...items:
|
|
3874
|
+
of(...items: number[]): Int32Array<ArrayBuffer>;
|
|
3875
3875
|
|
|
3876
3876
|
/**
|
|
3877
3877
|
* Creates an array from an array-like or iterable object.
|
|
3878
3878
|
* @param arrayLike An array-like object to convert to an array.
|
|
3879
3879
|
*/
|
|
3880
|
-
from(arrayLike: ArrayLike<
|
|
3880
|
+
from(arrayLike: ArrayLike<number>): Int32Array<ArrayBuffer>;
|
|
3881
3881
|
|
|
3882
3882
|
/**
|
|
3883
3883
|
* Creates an array from an array-like or iterable object.
|
|
@@ -3885,7 +3885,7 @@ interface Int32ArrayConstructor {
|
|
|
3885
3885
|
* @param mapfn A mapping function to call on every element of the array.
|
|
3886
3886
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
3887
3887
|
*/
|
|
3888
|
-
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) =>
|
|
3888
|
+
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: unknown): Int32Array<ArrayBuffer>;
|
|
3889
3889
|
}
|
|
3890
3890
|
declare var Int32Array: Int32ArrayConstructor;
|
|
3891
3891
|
|
|
@@ -3933,7 +3933,7 @@ interface Uint32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3933
3933
|
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
3934
3934
|
* If thisArg is omitted, undefined is used as the this value.
|
|
3935
3935
|
*/
|
|
3936
|
-
every(predicate: (value:
|
|
3936
|
+
every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: unknown): boolean;
|
|
3937
3937
|
|
|
3938
3938
|
/**
|
|
3939
3939
|
* Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
|
@@ -3943,7 +3943,7 @@ interface Uint32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3943
3943
|
* @param end index to stop filling the array at. If end is negative, it is treated as
|
|
3944
3944
|
* length+end.
|
|
3945
3945
|
*/
|
|
3946
|
-
fill(value:
|
|
3946
|
+
fill(value: number, start?: number, end?: number): this;
|
|
3947
3947
|
|
|
3948
3948
|
/**
|
|
3949
3949
|
* Returns the elements of an array that meet the condition specified in a callback function.
|
|
@@ -3952,7 +3952,7 @@ interface Uint32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3952
3952
|
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
3953
3953
|
* If thisArg is omitted, undefined is used as the this value.
|
|
3954
3954
|
*/
|
|
3955
|
-
filter(predicate: (value:
|
|
3955
|
+
filter(predicate: (value: number, index: number, array: this) => unknown, thisArg?: unknown): Uint32Array<ArrayBuffer>;
|
|
3956
3956
|
|
|
3957
3957
|
/**
|
|
3958
3958
|
* Returns the value of the first element in the array where predicate is true, and undefined
|
|
@@ -3963,7 +3963,7 @@ interface Uint32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3963
3963
|
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
3964
3964
|
* predicate. If it is not provided, undefined is used instead.
|
|
3965
3965
|
*/
|
|
3966
|
-
find(predicate: (value:
|
|
3966
|
+
find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: unknown): number | undefined;
|
|
3967
3967
|
|
|
3968
3968
|
/**
|
|
3969
3969
|
* Returns the index of the first element in the array where predicate is true, and -1
|
|
@@ -3974,7 +3974,7 @@ interface Uint32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3974
3974
|
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
3975
3975
|
* predicate. If it is not provided, undefined is used instead.
|
|
3976
3976
|
*/
|
|
3977
|
-
findIndex(predicate: (value:
|
|
3977
|
+
findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: unknown): number;
|
|
3978
3978
|
|
|
3979
3979
|
/**
|
|
3980
3980
|
* Performs the specified action for each element in an array.
|
|
@@ -3983,14 +3983,14 @@ interface Uint32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
3983
3983
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
|
3984
3984
|
* If thisArg is omitted, undefined is used as the this value.
|
|
3985
3985
|
*/
|
|
3986
|
-
forEach(callbackfn: (value:
|
|
3986
|
+
forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: unknown): void;
|
|
3987
3987
|
/**
|
|
3988
3988
|
* Returns the index of the first occurrence of a value in an array.
|
|
3989
3989
|
* @param searchElement The value to locate in the array.
|
|
3990
3990
|
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
|
3991
3991
|
* search starts at index 0.
|
|
3992
3992
|
*/
|
|
3993
|
-
indexOf(searchElement:
|
|
3993
|
+
indexOf(searchElement: number, fromIndex?: number): number;
|
|
3994
3994
|
|
|
3995
3995
|
/**
|
|
3996
3996
|
* Adds all the elements of an array separated by the specified separator string.
|
|
@@ -4005,7 +4005,7 @@ interface Uint32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4005
4005
|
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
|
4006
4006
|
* search starts at index 0.
|
|
4007
4007
|
*/
|
|
4008
|
-
lastIndexOf(searchElement:
|
|
4008
|
+
lastIndexOf(searchElement: number, fromIndex?: number): number;
|
|
4009
4009
|
|
|
4010
4010
|
/**
|
|
4011
4011
|
* The length of the array.
|
|
@@ -4020,7 +4020,7 @@ interface Uint32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4020
4020
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
|
4021
4021
|
* If thisArg is omitted, undefined is used as the this value.
|
|
4022
4022
|
*/
|
|
4023
|
-
map(callbackfn: (value:
|
|
4023
|
+
map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: unknown): Uint32Array<ArrayBuffer>;
|
|
4024
4024
|
|
|
4025
4025
|
/**
|
|
4026
4026
|
* Calls the specified callback function for all the elements in an array. The return value of
|
|
@@ -4032,8 +4032,8 @@ interface Uint32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4032
4032
|
* the accumulation. The first call to the callbackfn function provides this value as an argument
|
|
4033
4033
|
* instead of an array value.
|
|
4034
4034
|
*/
|
|
4035
|
-
reduce(callbackfn: (previousValue:
|
|
4036
|
-
reduce(callbackfn: (previousValue:
|
|
4035
|
+
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
|
|
4036
|
+
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
|
|
4037
4037
|
|
|
4038
4038
|
/**
|
|
4039
4039
|
* Calls the specified callback function for all the elements in an array. The return value of
|
|
@@ -4045,7 +4045,7 @@ interface Uint32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4045
4045
|
* the accumulation. The first call to the callbackfn function provides this value as an argument
|
|
4046
4046
|
* instead of an array value.
|
|
4047
4047
|
*/
|
|
4048
|
-
reduce<U>(callbackfn: (previousValue: U, currentValue:
|
|
4048
|
+
reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
|
|
4049
4049
|
|
|
4050
4050
|
/**
|
|
4051
4051
|
* Calls the specified callback function for all the elements in an array, in descending order.
|
|
@@ -4057,8 +4057,8 @@ interface Uint32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4057
4057
|
* the accumulation. The first call to the callbackfn function provides this value as an
|
|
4058
4058
|
* argument instead of an array value.
|
|
4059
4059
|
*/
|
|
4060
|
-
reduceRight(callbackfn: (previousValue:
|
|
4061
|
-
reduceRight(callbackfn: (previousValue:
|
|
4060
|
+
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
|
|
4061
|
+
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
|
|
4062
4062
|
|
|
4063
4063
|
/**
|
|
4064
4064
|
* Calls the specified callback function for all the elements in an array, in descending order.
|
|
@@ -4070,7 +4070,7 @@ interface Uint32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4070
4070
|
* the accumulation. The first call to the callbackfn function provides this value as an argument
|
|
4071
4071
|
* instead of an array value.
|
|
4072
4072
|
*/
|
|
4073
|
-
reduceRight<U>(callbackfn: (previousValue: U, currentValue:
|
|
4073
|
+
reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
|
|
4074
4074
|
|
|
4075
4075
|
/**
|
|
4076
4076
|
* Reverses the elements in an Array.
|
|
@@ -4082,7 +4082,7 @@ interface Uint32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4082
4082
|
* @param array A typed or untyped array of values to set.
|
|
4083
4083
|
* @param offset The index in the current array at which the values are to be written.
|
|
4084
4084
|
*/
|
|
4085
|
-
set(array: ArrayLike<
|
|
4085
|
+
set(array: ArrayLike<number>, offset?: number): void;
|
|
4086
4086
|
|
|
4087
4087
|
/**
|
|
4088
4088
|
* Returns a section of an array.
|
|
@@ -4099,7 +4099,7 @@ interface Uint32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4099
4099
|
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
4100
4100
|
* If thisArg is omitted, undefined is used as the this value.
|
|
4101
4101
|
*/
|
|
4102
|
-
some(predicate: (value:
|
|
4102
|
+
some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: unknown): boolean;
|
|
4103
4103
|
|
|
4104
4104
|
/**
|
|
4105
4105
|
* Sorts an array.
|
|
@@ -4110,7 +4110,7 @@ interface Uint32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4110
4110
|
* [11,2,22,1].sort((a, b) => a - b)
|
|
4111
4111
|
* ```
|
|
4112
4112
|
*/
|
|
4113
|
-
sort(compareFn?: (a:
|
|
4113
|
+
sort(compareFn?: (a: number, b: number) => number): this;
|
|
4114
4114
|
|
|
4115
4115
|
/**
|
|
4116
4116
|
* Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements
|
|
@@ -4133,15 +4133,15 @@ interface Uint32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4133
4133
|
/** Returns the primitive value of the specified object. */
|
|
4134
4134
|
valueOf(): this;
|
|
4135
4135
|
|
|
4136
|
-
[index: number]:
|
|
4136
|
+
[index: number]: number;
|
|
4137
4137
|
}
|
|
4138
4138
|
interface Uint32ArrayConstructor {
|
|
4139
4139
|
readonly prototype: Uint32Array<ArrayBufferLike>;
|
|
4140
4140
|
new (length: number): Uint32Array<ArrayBuffer>;
|
|
4141
|
-
new (array: ArrayLike<
|
|
4141
|
+
new (array: ArrayLike<number>): Uint32Array<ArrayBuffer>;
|
|
4142
4142
|
new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): Uint32Array<TArrayBuffer>;
|
|
4143
4143
|
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array<ArrayBuffer>;
|
|
4144
|
-
new (array: ArrayLike<
|
|
4144
|
+
new (array: ArrayLike<number> | ArrayBuffer): Uint32Array<ArrayBuffer>;
|
|
4145
4145
|
|
|
4146
4146
|
/**
|
|
4147
4147
|
* The size in bytes of each element in the array.
|
|
@@ -4152,13 +4152,13 @@ interface Uint32ArrayConstructor {
|
|
|
4152
4152
|
* Returns a new array from a set of elements.
|
|
4153
4153
|
* @param items A set of elements to include in the new array object.
|
|
4154
4154
|
*/
|
|
4155
|
-
of(...items:
|
|
4155
|
+
of(...items: number[]): Uint32Array<ArrayBuffer>;
|
|
4156
4156
|
|
|
4157
4157
|
/**
|
|
4158
4158
|
* Creates an array from an array-like or iterable object.
|
|
4159
4159
|
* @param arrayLike An array-like object to convert to an array.
|
|
4160
4160
|
*/
|
|
4161
|
-
from(arrayLike: ArrayLike<
|
|
4161
|
+
from(arrayLike: ArrayLike<number>): Uint32Array<ArrayBuffer>;
|
|
4162
4162
|
|
|
4163
4163
|
/**
|
|
4164
4164
|
* Creates an array from an array-like or iterable object.
|
|
@@ -4166,7 +4166,7 @@ interface Uint32ArrayConstructor {
|
|
|
4166
4166
|
* @param mapfn A mapping function to call on every element of the array.
|
|
4167
4167
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
4168
4168
|
*/
|
|
4169
|
-
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) =>
|
|
4169
|
+
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: unknown): Uint32Array<ArrayBuffer>;
|
|
4170
4170
|
}
|
|
4171
4171
|
declare var Uint32Array: Uint32ArrayConstructor;
|
|
4172
4172
|
|
|
@@ -4214,7 +4214,7 @@ interface Float32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4214
4214
|
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
4215
4215
|
* If thisArg is omitted, undefined is used as the this value.
|
|
4216
4216
|
*/
|
|
4217
|
-
every(predicate: (value:
|
|
4217
|
+
every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: unknown): boolean;
|
|
4218
4218
|
|
|
4219
4219
|
/**
|
|
4220
4220
|
* Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
|
@@ -4224,7 +4224,7 @@ interface Float32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4224
4224
|
* @param end index to stop filling the array at. If end is negative, it is treated as
|
|
4225
4225
|
* length+end.
|
|
4226
4226
|
*/
|
|
4227
|
-
fill(value:
|
|
4227
|
+
fill(value: number, start?: number, end?: number): this;
|
|
4228
4228
|
|
|
4229
4229
|
/**
|
|
4230
4230
|
* Returns the elements of an array that meet the condition specified in a callback function.
|
|
@@ -4233,7 +4233,7 @@ interface Float32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4233
4233
|
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
4234
4234
|
* If thisArg is omitted, undefined is used as the this value.
|
|
4235
4235
|
*/
|
|
4236
|
-
filter(predicate: (value:
|
|
4236
|
+
filter(predicate: (value: number, index: number, array: this) => unknown, thisArg?: unknown): Float32Array<ArrayBuffer>;
|
|
4237
4237
|
|
|
4238
4238
|
/**
|
|
4239
4239
|
* Returns the value of the first element in the array where predicate is true, and undefined
|
|
@@ -4244,7 +4244,7 @@ interface Float32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4244
4244
|
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
4245
4245
|
* predicate. If it is not provided, undefined is used instead.
|
|
4246
4246
|
*/
|
|
4247
|
-
find(predicate: (value:
|
|
4247
|
+
find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: unknown): number | undefined;
|
|
4248
4248
|
|
|
4249
4249
|
/**
|
|
4250
4250
|
* Returns the index of the first element in the array where predicate is true, and -1
|
|
@@ -4255,7 +4255,7 @@ interface Float32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4255
4255
|
* @param thisArg If provided, it will be used as the this value for each invocation of
|
|
4256
4256
|
* predicate. If it is not provided, undefined is used instead.
|
|
4257
4257
|
*/
|
|
4258
|
-
findIndex(predicate: (value:
|
|
4258
|
+
findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: unknown): number;
|
|
4259
4259
|
|
|
4260
4260
|
/**
|
|
4261
4261
|
* Performs the specified action for each element in an array.
|
|
@@ -4264,7 +4264,7 @@ interface Float32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4264
4264
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
|
4265
4265
|
* If thisArg is omitted, undefined is used as the this value.
|
|
4266
4266
|
*/
|
|
4267
|
-
forEach(callbackfn: (value:
|
|
4267
|
+
forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: unknown): void;
|
|
4268
4268
|
|
|
4269
4269
|
/**
|
|
4270
4270
|
* Returns the index of the first occurrence of a value in an array.
|
|
@@ -4272,7 +4272,7 @@ interface Float32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4272
4272
|
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
|
4273
4273
|
* search starts at index 0.
|
|
4274
4274
|
*/
|
|
4275
|
-
indexOf(searchElement:
|
|
4275
|
+
indexOf(searchElement: number, fromIndex?: number): number;
|
|
4276
4276
|
|
|
4277
4277
|
/**
|
|
4278
4278
|
* Adds all the elements of an array separated by the specified separator string.
|
|
@@ -4287,7 +4287,7 @@ interface Float32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4287
4287
|
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
|
|
4288
4288
|
* search starts at index 0.
|
|
4289
4289
|
*/
|
|
4290
|
-
lastIndexOf(searchElement:
|
|
4290
|
+
lastIndexOf(searchElement: number, fromIndex?: number): number;
|
|
4291
4291
|
|
|
4292
4292
|
/**
|
|
4293
4293
|
* The length of the array.
|
|
@@ -4302,7 +4302,7 @@ interface Float32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4302
4302
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
|
|
4303
4303
|
* If thisArg is omitted, undefined is used as the this value.
|
|
4304
4304
|
*/
|
|
4305
|
-
map(callbackfn: (value:
|
|
4305
|
+
map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: unknown): Float32Array<ArrayBuffer>;
|
|
4306
4306
|
|
|
4307
4307
|
/**
|
|
4308
4308
|
* Calls the specified callback function for all the elements in an array. The return value of
|
|
@@ -4314,8 +4314,8 @@ interface Float32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4314
4314
|
* the accumulation. The first call to the callbackfn function provides this value as an argument
|
|
4315
4315
|
* instead of an array value.
|
|
4316
4316
|
*/
|
|
4317
|
-
reduce(callbackfn: (previousValue:
|
|
4318
|
-
reduce(callbackfn: (previousValue:
|
|
4317
|
+
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
|
|
4318
|
+
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
|
|
4319
4319
|
|
|
4320
4320
|
/**
|
|
4321
4321
|
* Calls the specified callback function for all the elements in an array. The return value of
|
|
@@ -4327,7 +4327,7 @@ interface Float32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4327
4327
|
* the accumulation. The first call to the callbackfn function provides this value as an argument
|
|
4328
4328
|
* instead of an array value.
|
|
4329
4329
|
*/
|
|
4330
|
-
reduce<U>(callbackfn: (previousValue: U, currentValue:
|
|
4330
|
+
reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
|
|
4331
4331
|
|
|
4332
4332
|
/**
|
|
4333
4333
|
* Calls the specified callback function for all the elements in an array, in descending order.
|
|
@@ -4339,8 +4339,8 @@ interface Float32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4339
4339
|
* the accumulation. The first call to the callbackfn function provides this value as an
|
|
4340
4340
|
* argument instead of an array value.
|
|
4341
4341
|
*/
|
|
4342
|
-
reduceRight(callbackfn: (previousValue:
|
|
4343
|
-
reduceRight(callbackfn: (previousValue:
|
|
4342
|
+
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number): number;
|
|
4343
|
+
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
|
|
4344
4344
|
|
|
4345
4345
|
/**
|
|
4346
4346
|
* Calls the specified callback function for all the elements in an array, in descending order.
|
|
@@ -4352,7 +4352,7 @@ interface Float32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4352
4352
|
* the accumulation. The first call to the callbackfn function provides this value as an argument
|
|
4353
4353
|
* instead of an array value.
|
|
4354
4354
|
*/
|
|
4355
|
-
reduceRight<U>(callbackfn: (previousValue: U, currentValue:
|
|
4355
|
+
reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U, initialValue: U): U;
|
|
4356
4356
|
|
|
4357
4357
|
/**
|
|
4358
4358
|
* Reverses the elements in an Array.
|
|
@@ -4364,7 +4364,7 @@ interface Float32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4364
4364
|
* @param array A typed or untyped array of values to set.
|
|
4365
4365
|
* @param offset The index in the current array at which the values are to be written.
|
|
4366
4366
|
*/
|
|
4367
|
-
set(array: ArrayLike<
|
|
4367
|
+
set(array: ArrayLike<number>, offset?: number): void;
|
|
4368
4368
|
|
|
4369
4369
|
/**
|
|
4370
4370
|
* Returns a section of an array.
|
|
@@ -4381,7 +4381,7 @@ interface Float32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4381
4381
|
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
4382
4382
|
* If thisArg is omitted, undefined is used as the this value.
|
|
4383
4383
|
*/
|
|
4384
|
-
some(predicate: (value:
|
|
4384
|
+
some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: unknown): boolean;
|
|
4385
4385
|
|
|
4386
4386
|
/**
|
|
4387
4387
|
* Sorts an array.
|
|
@@ -4392,7 +4392,7 @@ interface Float32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4392
4392
|
* [11,2,22,1].sort((a, b) => a - b)
|
|
4393
4393
|
* ```
|
|
4394
4394
|
*/
|
|
4395
|
-
sort(compareFn?: (a:
|
|
4395
|
+
sort(compareFn?: (a: number, b: number) => number): this;
|
|
4396
4396
|
|
|
4397
4397
|
/**
|
|
4398
4398
|
* Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements
|
|
@@ -4415,15 +4415,15 @@ interface Float32Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
|
4415
4415
|
/** Returns the primitive value of the specified object. */
|
|
4416
4416
|
valueOf(): this;
|
|
4417
4417
|
|
|
4418
|
-
[index: number]:
|
|
4418
|
+
[index: number]: number;
|
|
4419
4419
|
}
|
|
4420
4420
|
interface Float32ArrayConstructor {
|
|
4421
4421
|
readonly prototype: Float32Array<ArrayBufferLike>;
|
|
4422
4422
|
new (length: number): Float32Array<ArrayBuffer>;
|
|
4423
|
-
new (array: ArrayLike<
|
|
4423
|
+
new (array: ArrayLike<number>): Float32Array<ArrayBuffer>;
|
|
4424
4424
|
new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): Float32Array<TArrayBuffer>;
|
|
4425
4425
|
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array<ArrayBuffer>;
|
|
4426
|
-
new (array: ArrayLike<
|
|
4426
|
+
new (array: ArrayLike<number> | ArrayBuffer): Float32Array<ArrayBuffer>;
|
|
4427
4427
|
|
|
4428
4428
|
/**
|
|
4429
4429
|
* The size in bytes of each element in the array.
|
|
@@ -4434,13 +4434,13 @@ interface Float32ArrayConstructor {
|
|
|
4434
4434
|
* Returns a new array from a set of elements.
|
|
4435
4435
|
* @param items A set of elements to include in the new array object.
|
|
4436
4436
|
*/
|
|
4437
|
-
of(...items:
|
|
4437
|
+
of(...items: number[]): Float32Array<ArrayBuffer>;
|
|
4438
4438
|
|
|
4439
4439
|
/**
|
|
4440
4440
|
* Creates an array from an array-like or iterable object.
|
|
4441
4441
|
* @param arrayLike An array-like object to convert to an array.
|
|
4442
4442
|
*/
|
|
4443
|
-
from(arrayLike: ArrayLike<
|
|
4443
|
+
from(arrayLike: ArrayLike<number>): Float32Array<ArrayBuffer>;
|
|
4444
4444
|
|
|
4445
4445
|
/**
|
|
4446
4446
|
* Creates an array from an array-like or iterable object.
|
|
@@ -4448,7 +4448,7 @@ interface Float32ArrayConstructor {
|
|
|
4448
4448
|
* @param mapfn A mapping function to call on every element of the array.
|
|
4449
4449
|
* @param thisArg Value of 'this' used to invoke the mapfn.
|
|
4450
4450
|
*/
|
|
4451
|
-
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) =>
|
|
4451
|
+
from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: unknown): Float32Array<ArrayBuffer>;
|
|
4452
4452
|
}
|
|
4453
4453
|
declare var Float32Array: Float32ArrayConstructor;
|
|
4454
4454
|
|