@dcl/sdk 7.0.0-2536021667.commit-17c845c

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.
Files changed (45) hide show
  1. package/LICENSE +201 -0
  2. package/dist/ecs7/index.d.ts +1721 -0
  3. package/dist/ecs7/index.js +6173 -0
  4. package/dist/ecs7/index.min.js +1 -0
  5. package/dist/ecs7/index.min.js.map +1 -0
  6. package/dist/ecs7/proto-definitions/AudioSource.proto +13 -0
  7. package/dist/ecs7/proto-definitions/AudioStream.proto +10 -0
  8. package/dist/ecs7/proto-definitions/BoxShape.proto +11 -0
  9. package/dist/ecs7/proto-definitions/CylinderShape.proto +12 -0
  10. package/dist/ecs7/proto-definitions/NFTShape.proto +16 -0
  11. package/dist/ecs7/proto-definitions/PlaneShape.proto +11 -0
  12. package/dist/ecs7/proto-definitions/README.md +32 -0
  13. package/dist/ecs7/proto-definitions/SphereShape.proto +10 -0
  14. package/dist/ecs7/proto-definitions/TextShape.proto +33 -0
  15. package/dist/ecs7/proto-definitions/Transform.md +25 -0
  16. package/dist/ecs7/proto-definitions/common/Color3.proto +8 -0
  17. package/dist/ecs7/proto-definitions/common/id.md +2 -0
  18. package/dist/ecs7/proto-definitions/common/id.proto +7 -0
  19. package/package.json +42 -0
  20. package/src/cli/mock-catalyst/index.js +170 -0
  21. package/src/cli/setupUtils.js +345 -0
  22. package/src/cli/wearables.js +145 -0
  23. package/src/setupExport.js +43 -0
  24. package/src/setupProxy.js +165 -0
  25. package/types/@decentraland/CommunicationsController/index.d.ts +7 -0
  26. package/types/@decentraland/EnvironmentAPI/index.d.ts +45 -0
  27. package/types/@decentraland/EthereumController/index.d.ts +47 -0
  28. package/types/@decentraland/Identity/index.d.ts +42 -0
  29. package/types/@decentraland/ParcelIdentity/index.d.ts +49 -0
  30. package/types/@decentraland/Players/index.d.ts +47 -0
  31. package/types/@decentraland/PortableExperiences/index.d.ts +39 -0
  32. package/types/@decentraland/RestrictedActions/index.d.ts +41 -0
  33. package/types/@decentraland/SignedFetch/index.d.ts +16 -0
  34. package/types/@decentraland/SocialController/index.d.ts +1 -0
  35. package/types/@decentraland/web3-provider/index.d.ts +7 -0
  36. package/types/dcl/decentraland-ecs.api.json +61732 -0
  37. package/types/dcl/decentraland-ecs.api.md +2717 -0
  38. package/types/ecs7/index.d.ts +1721 -0
  39. package/types/ecs7-env/es2015.iterable.d.ts +486 -0
  40. package/types/ecs7-env/es2015.symbol.d.ts +46 -0
  41. package/types/ecs7-env/index.d.ts +19 -0
  42. package/types/env/es5.d.ts +4565 -0
  43. package/types/env/index.d.ts +411 -0
  44. package/types/tsconfig.ecs7.json +27 -0
  45. package/types/tsconfig.ecs7.strict.json +13 -0
@@ -0,0 +1,4565 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */
15
+
16
+ /// <reference no-default-lib="true"/>
17
+
18
+ /////////////////////////////
19
+ /// ECMAScript APIs
20
+ /////////////////////////////
21
+
22
+ declare var NaN: number
23
+ declare var Infinity: number
24
+
25
+ /**
26
+ * Evaluates JavaScript code and executes it.
27
+ * @param x A String value that contains valid JavaScript code.
28
+ */
29
+ declare function eval(x: string): any
30
+
31
+ /**
32
+ * Converts a string to an integer.
33
+ * @param s A string to convert into a number.
34
+ * @param radix A value between 2 and 36 that specifies the base of the number in numString.
35
+ * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
36
+ * All other strings are considered decimal.
37
+ */
38
+ declare function parseInt(s: string, radix?: number): number
39
+
40
+ /**
41
+ * Converts a string to a floating-point number.
42
+ * @param string A string that contains a floating-point number.
43
+ */
44
+ declare function parseFloat(string: string): number
45
+
46
+ /**
47
+ * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number).
48
+ * @param number A numeric value.
49
+ */
50
+ declare function isNaN(number: number): boolean
51
+
52
+ /**
53
+ * Determines whether a supplied number is finite.
54
+ * @param number Any numeric value.
55
+ */
56
+ declare function isFinite(number: number): boolean
57
+
58
+ /**
59
+ * Gets the unencoded version of an encoded Uniform Resource Identifier (URI).
60
+ * @param encodedURI A value representing an encoded URI.
61
+ */
62
+ declare function decodeURI(encodedURI: string): string
63
+
64
+ /**
65
+ * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).
66
+ * @param encodedURIComponent A value representing an encoded URI component.
67
+ */
68
+ declare function decodeURIComponent(encodedURIComponent: string): string
69
+
70
+ /**
71
+ * Encodes a text string as a valid Uniform Resource Identifier (URI)
72
+ * @param uri A value representing an encoded URI.
73
+ */
74
+ declare function encodeURI(uri: string): string
75
+
76
+ /**
77
+ * Encodes a text string as a valid component of a Uniform Resource Identifier (URI).
78
+ * @param uriComponent A value representing an encoded URI component.
79
+ */
80
+ declare function encodeURIComponent(uriComponent: string | number | boolean): string
81
+
82
+ /**
83
+ * Computes a new string in which certain characters have been replaced by a hexadecimal escape sequence.
84
+ * @param string A string value
85
+ */
86
+ declare function escape(string: string): string
87
+
88
+ /**
89
+ * Computes a new string in which hexadecimal escape sequences are replaced with the character that it represents.
90
+ * @param string A string value
91
+ */
92
+ declare function unescape(string: string): string
93
+
94
+ interface Symbol {
95
+ /** Returns a string representation of an object. */
96
+ toString(): string
97
+
98
+ /** Returns the primitive value of the specified object. */
99
+ valueOf(): symbol
100
+ }
101
+
102
+ declare type PropertyKey = string | number | symbol
103
+
104
+ interface PropertyDescriptor {
105
+ configurable?: boolean
106
+ enumerable?: boolean
107
+ value?: any
108
+ writable?: boolean
109
+ get?(): any
110
+ set?(v: any): void
111
+ }
112
+
113
+ interface PropertyDescriptorMap {
114
+ [s: string]: PropertyDescriptor
115
+ }
116
+
117
+ interface Object {
118
+ /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */
119
+ constructor: Function
120
+
121
+ /** Returns a string representation of an object. */
122
+ toString(): string
123
+
124
+ /** Returns a date converted to a string using the current locale. */
125
+ toLocaleString(): string
126
+
127
+ /** Returns the primitive value of the specified object. */
128
+ valueOf(): Object
129
+
130
+ /**
131
+ * Determines whether an object has a property with the specified name.
132
+ * @param v A property name.
133
+ */
134
+ hasOwnProperty(v: PropertyKey): boolean
135
+
136
+ /**
137
+ * Determines whether an object exists in another object's prototype chain.
138
+ * @param v Another object whose prototype chain is to be checked.
139
+ */
140
+ isPrototypeOf(v: Object): boolean
141
+
142
+ /**
143
+ * Determines whether a specified property is enumerable.
144
+ * @param v A property name.
145
+ */
146
+ propertyIsEnumerable(v: PropertyKey): boolean
147
+ }
148
+
149
+ interface ObjectConstructor {
150
+ new (value?: any): Object
151
+ (): any
152
+ (value: any): any
153
+
154
+ /** A reference to the prototype for a class of objects. */
155
+ readonly prototype: Object
156
+
157
+ /**
158
+ * Returns the prototype of an object.
159
+ * @param o The object that references the prototype.
160
+ */
161
+ getPrototypeOf(o: any): any
162
+
163
+ /**
164
+ * Gets the own property descriptor of the specified object.
165
+ * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
166
+ * @param o Object that contains the property.
167
+ * @param p Name of the property.
168
+ */
169
+ getOwnPropertyDescriptor(o: any, p: PropertyKey): PropertyDescriptor | undefined
170
+
171
+ /**
172
+ * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly
173
+ * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
174
+ * @param o Object that contains the own properties.
175
+ */
176
+ getOwnPropertyNames(o: any): string[]
177
+
178
+ /**
179
+ * Creates an object that has the specified prototype or that has null prototype.
180
+ * @param o Object to use as a prototype. May be null.
181
+ */
182
+ create(o: object | null): any
183
+
184
+ /**
185
+ * Creates an object that has the specified prototype, and that optionally contains specified properties.
186
+ * @param o Object to use as a prototype. May be null
187
+ * @param properties JavaScript object that contains one or more property descriptors.
188
+ */
189
+ create(o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any
190
+
191
+ /**
192
+ * Adds a property to an object, or modifies attributes of an existing property.
193
+ * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.
194
+ * @param p The property name.
195
+ * @param attributes Descriptor for the property. It can be for a data property or an accessor property.
196
+ */
197
+ defineProperty(o: any, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>): any
198
+
199
+ /**
200
+ * Adds one or more properties to an object, and/or modifies attributes of existing properties.
201
+ * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.
202
+ * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.
203
+ */
204
+ defineProperties(o: any, properties: PropertyDescriptorMap & ThisType<any>): any
205
+
206
+ /**
207
+ * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
208
+ * @param o Object on which to lock the attributes.
209
+ */
210
+ seal<T>(o: T): T
211
+
212
+ /**
213
+ * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
214
+ * @param o Object on which to lock the attributes.
215
+ */
216
+ freeze<T>(a: T[]): readonly T[]
217
+
218
+ /**
219
+ * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
220
+ * @param o Object on which to lock the attributes.
221
+ */
222
+ freeze<T extends Function>(f: T): T
223
+
224
+ /**
225
+ * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
226
+ * @param o Object on which to lock the attributes.
227
+ */
228
+ freeze<T>(o: T): Readonly<T>
229
+
230
+ /**
231
+ * Prevents the addition of new properties to an object.
232
+ * @param o Object to make non-extensible.
233
+ */
234
+ preventExtensions<T>(o: T): T
235
+
236
+ /**
237
+ * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
238
+ * @param o Object to test.
239
+ */
240
+ isSealed(o: any): boolean
241
+
242
+ /**
243
+ * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
244
+ * @param o Object to test.
245
+ */
246
+ isFrozen(o: any): boolean
247
+
248
+ /**
249
+ * Returns a value that indicates whether new properties can be added to an object.
250
+ * @param o Object to test.
251
+ */
252
+ isExtensible(o: any): boolean
253
+
254
+ /**
255
+ * Returns the names of the enumerable string properties and methods of an object.
256
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
257
+ */
258
+ keys(o: object): string[]
259
+ }
260
+
261
+ /**
262
+ * Provides functionality common to all JavaScript objects.
263
+ */
264
+ declare var Object: ObjectConstructor
265
+
266
+ /**
267
+ * Creates a new function.
268
+ */
269
+ interface Function {
270
+ /**
271
+ * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.
272
+ * @param thisArg The object to be used as the this object.
273
+ * @param argArray A set of arguments to be passed to the function.
274
+ */
275
+ apply(this: Function, thisArg: any, argArray?: any): any
276
+
277
+ /**
278
+ * Calls a method of an object, substituting another object for the current object.
279
+ * @param thisArg The object to be used as the current object.
280
+ * @param argArray A list of arguments to be passed to the method.
281
+ */
282
+ call(this: Function, thisArg: any, ...argArray: any[]): any
283
+
284
+ /**
285
+ * For a given function, creates a bound function that has the same body as the original function.
286
+ * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
287
+ * @param thisArg An object to which the this keyword can refer inside the new function.
288
+ * @param argArray A list of arguments to be passed to the new function.
289
+ */
290
+ bind(this: Function, thisArg: any, ...argArray: any[]): any
291
+
292
+ /** Returns a string representation of a function. */
293
+ toString(): string
294
+
295
+ prototype: any
296
+ readonly length: number
297
+
298
+ // Non-standard extensions
299
+ arguments: any
300
+ caller: Function
301
+ }
302
+
303
+ interface FunctionConstructor {
304
+ /**
305
+ * Creates a new function.
306
+ * @param args A list of arguments the function accepts.
307
+ */
308
+ new (...args: string[]): Function
309
+ (...args: string[]): Function
310
+ readonly prototype: Function
311
+ }
312
+
313
+ declare var Function: FunctionConstructor
314
+
315
+ /**
316
+ * Extracts the type of the 'this' parameter of a function type, or 'unknown' if the function type has no 'this' parameter.
317
+ */
318
+ type ThisParameterType<T> = T extends (this: infer U, ...args: any[]) => any ? U : unknown
319
+
320
+ /**
321
+ * Removes the 'this' parameter from a function type.
322
+ */
323
+ type OmitThisParameter<T> = unknown extends ThisParameterType<T>
324
+ ? T
325
+ : T extends (...args: infer A) => infer R
326
+ ? (...args: A) => R
327
+ : T
328
+
329
+ interface CallableFunction extends Function {
330
+ /**
331
+ * Calls the function with the specified object as the this value and the elements of specified array as the arguments.
332
+ * @param thisArg The object to be used as the this object.
333
+ * @param args An array of argument values to be passed to the function.
334
+ */
335
+ apply<T, R>(this: (this: T) => R, thisArg: T): R
336
+ apply<T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R
337
+
338
+ /**
339
+ * Calls the function with the specified object as the this value and the specified rest arguments as the arguments.
340
+ * @param thisArg The object to be used as the this object.
341
+ * @param args Argument values to be passed to the function.
342
+ */
343
+ call<T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R
344
+
345
+ /**
346
+ * For a given function, creates a bound function that has the same body as the original function.
347
+ * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
348
+ * @param thisArg The object to be used as the this object.
349
+ * @param args Arguments to bind to the parameters of the function.
350
+ */
351
+ bind<T>(this: T, thisArg: ThisParameterType<T>): OmitThisParameter<T>
352
+ bind<T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R
353
+ bind<T, A0, A1, A extends any[], R>(
354
+ this: (this: T, arg0: A0, arg1: A1, ...args: A) => R,
355
+ thisArg: T,
356
+ arg0: A0,
357
+ arg1: A1
358
+ ): (...args: A) => R
359
+ bind<T, A0, A1, A2, A extends any[], R>(
360
+ this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R,
361
+ thisArg: T,
362
+ arg0: A0,
363
+ arg1: A1,
364
+ arg2: A2
365
+ ): (...args: A) => R
366
+ bind<T, A0, A1, A2, A3, A extends any[], R>(
367
+ this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R,
368
+ thisArg: T,
369
+ arg0: A0,
370
+ arg1: A1,
371
+ arg2: A2,
372
+ arg3: A3
373
+ ): (...args: A) => R
374
+ bind<T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R
375
+ }
376
+
377
+ interface NewableFunction extends Function {
378
+ /**
379
+ * Calls the function with the specified object as the this value and the elements of specified array as the arguments.
380
+ * @param thisArg The object to be used as the this object.
381
+ * @param args An array of argument values to be passed to the function.
382
+ */
383
+ apply<T>(this: new () => T, thisArg: T): void
384
+ apply<T, A extends any[]>(this: new (...args: A) => T, thisArg: T, args: A): void
385
+
386
+ /**
387
+ * Calls the function with the specified object as the this value and the specified rest arguments as the arguments.
388
+ * @param thisArg The object to be used as the this object.
389
+ * @param args Argument values to be passed to the function.
390
+ */
391
+ call<T, A extends any[]>(this: new (...args: A) => T, thisArg: T, ...args: A): void
392
+
393
+ /**
394
+ * For a given function, creates a bound function that has the same body as the original function.
395
+ * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
396
+ * @param thisArg The object to be used as the this object.
397
+ * @param args Arguments to bind to the parameters of the function.
398
+ */
399
+ bind<T>(this: T, thisArg: any): T
400
+ bind<A0, A extends any[], R>(this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R
401
+ bind<A0, A1, A extends any[], R>(
402
+ this: new (arg0: A0, arg1: A1, ...args: A) => R,
403
+ thisArg: any,
404
+ arg0: A0,
405
+ arg1: A1
406
+ ): new (...args: A) => R
407
+ bind<A0, A1, A2, A extends any[], R>(
408
+ this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R,
409
+ thisArg: any,
410
+ arg0: A0,
411
+ arg1: A1,
412
+ arg2: A2
413
+ ): new (...args: A) => R
414
+ bind<A0, A1, A2, A3, A extends any[], R>(
415
+ this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R,
416
+ thisArg: any,
417
+ arg0: A0,
418
+ arg1: A1,
419
+ arg2: A2,
420
+ arg3: A3
421
+ ): new (...args: A) => R
422
+ bind<AX, R>(this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R
423
+ }
424
+
425
+ interface IArguments {
426
+ [index: number]: any
427
+ length: number
428
+ callee: Function
429
+ }
430
+
431
+ interface String {
432
+ /** Returns a string representation of a string. */
433
+ toString(): string
434
+
435
+ /**
436
+ * Returns the character at the specified index.
437
+ * @param pos The zero-based index of the desired character.
438
+ */
439
+ charAt(pos: number): string
440
+
441
+ /**
442
+ * Returns the Unicode value of the character at the specified location.
443
+ * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.
444
+ */
445
+ charCodeAt(index: number): number
446
+
447
+ /**
448
+ * Returns a string that contains the concatenation of two or more strings.
449
+ * @param strings The strings to append to the end of the string.
450
+ */
451
+ concat(...strings: string[]): string
452
+
453
+ /**
454
+ * Returns the position of the first occurrence of a substring.
455
+ * @param searchString The substring to search for in the string
456
+ * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
457
+ */
458
+ indexOf(searchString: string, position?: number): number
459
+
460
+ /**
461
+ * Returns the last occurrence of a substring in the string.
462
+ * @param searchString The substring to search for.
463
+ * @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
464
+ */
465
+ lastIndexOf(searchString: string, position?: number): number
466
+
467
+ /**
468
+ * Determines whether two strings are equivalent in the current locale.
469
+ * @param that String to compare to target string
470
+ */
471
+ localeCompare(that: string): number
472
+
473
+ /**
474
+ * Matches a string with a regular expression, and returns an array containing the results of that search.
475
+ * @param regexp A variable name or string literal containing the regular expression pattern and flags.
476
+ */
477
+ match(regexp: string | RegExp): RegExpMatchArray | null
478
+
479
+ /**
480
+ * Replaces text in a string, using a regular expression or search string.
481
+ * @param searchValue A string to search for.
482
+ * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
483
+ */
484
+ replace(searchValue: string | RegExp, replaceValue: string): string
485
+
486
+ /**
487
+ * Replaces text in a string, using a regular expression or search string.
488
+ * @param searchValue A string to search for.
489
+ * @param replacer A function that returns the replacement text.
490
+ */
491
+ replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string
492
+
493
+ /**
494
+ * Finds the first substring match in a regular expression search.
495
+ * @param regexp The regular expression pattern and applicable flags.
496
+ */
497
+ search(regexp: string | RegExp): number
498
+
499
+ /**
500
+ * Returns a section of a string.
501
+ * @param start The index to the beginning of the specified portion of stringObj.
502
+ * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.
503
+ * If this value is not specified, the substring continues to the end of stringObj.
504
+ */
505
+ slice(start?: number, end?: number): string
506
+
507
+ /**
508
+ * Split a string into substrings using the specified separator and return them as an array.
509
+ * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.
510
+ * @param limit A value used to limit the number of elements returned in the array.
511
+ */
512
+ split(separator: string | RegExp, limit?: number): string[]
513
+
514
+ /**
515
+ * Returns the substring at the specified location within a String object.
516
+ * @param start The zero-based index number indicating the beginning of the substring.
517
+ * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.
518
+ * If end is omitted, the characters from start through the end of the original string are returned.
519
+ */
520
+ substring(start: number, end?: number): string
521
+
522
+ /** Converts all the alphabetic characters in a string to lowercase. */
523
+ toLowerCase(): string
524
+
525
+ /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
526
+ toLocaleLowerCase(locales?: string | string[]): string
527
+
528
+ /** Converts all the alphabetic characters in a string to uppercase. */
529
+ toUpperCase(): string
530
+
531
+ /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */
532
+ toLocaleUpperCase(locales?: string | string[]): string
533
+
534
+ /** Removes the leading and trailing white space and line terminator characters from a string. */
535
+ trim(): string
536
+
537
+ /** Returns the length of a String object. */
538
+ readonly length: number
539
+
540
+ // IE extensions
541
+ /**
542
+ * Gets a substring beginning at the specified location and having the specified length.
543
+ * @param from The starting position of the desired substring. The index of the first character in the string is zero.
544
+ * @param length The number of characters to include in the returned substring.
545
+ */
546
+ substr(from: number, length?: number): string
547
+
548
+ /** Returns the primitive value of the specified object. */
549
+ valueOf(): string
550
+
551
+ readonly [index: number]: string
552
+ }
553
+
554
+ interface StringConstructor {
555
+ new (value?: any): String
556
+ (value?: any): string
557
+ readonly prototype: String
558
+ fromCharCode(...codes: number[]): string
559
+ }
560
+
561
+ /**
562
+ * Allows manipulation and formatting of text strings and determination and location of substrings within strings.
563
+ */
564
+ declare var String: StringConstructor
565
+
566
+ interface Boolean {
567
+ /** Returns the primitive value of the specified object. */
568
+ valueOf(): boolean
569
+ }
570
+
571
+ interface BooleanConstructor {
572
+ new (value?: any): Boolean
573
+ <T>(value?: T): boolean
574
+ readonly prototype: Boolean
575
+ }
576
+
577
+ declare var Boolean: BooleanConstructor
578
+
579
+ interface Number {
580
+ /**
581
+ * Returns a string representation of an object.
582
+ * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.
583
+ */
584
+ toString(radix?: number): string
585
+
586
+ /**
587
+ * Returns a string representing a number in fixed-point notation.
588
+ * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
589
+ */
590
+ toFixed(fractionDigits?: number): string
591
+
592
+ /**
593
+ * Returns a string containing a number represented in exponential notation.
594
+ * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
595
+ */
596
+ toExponential(fractionDigits?: number): string
597
+
598
+ /**
599
+ * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
600
+ * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
601
+ */
602
+ toPrecision(precision?: number): string
603
+
604
+ /** Returns the primitive value of the specified object. */
605
+ valueOf(): number
606
+ }
607
+
608
+ interface NumberConstructor {
609
+ new (value?: any): Number
610
+ (value?: any): number
611
+ readonly prototype: Number
612
+
613
+ /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */
614
+ readonly MAX_VALUE: number
615
+
616
+ /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */
617
+ readonly MIN_VALUE: number
618
+
619
+ /**
620
+ * A value that is not a number.
621
+ * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.
622
+ */
623
+ readonly NaN: number
624
+
625
+ /**
626
+ * A value that is less than the largest negative number that can be represented in JavaScript.
627
+ * JavaScript displays NEGATIVE_INFINITY values as -infinity.
628
+ */
629
+ readonly NEGATIVE_INFINITY: number
630
+
631
+ /**
632
+ * A value greater than the largest number that can be represented in JavaScript.
633
+ * JavaScript displays POSITIVE_INFINITY values as infinity.
634
+ */
635
+ readonly POSITIVE_INFINITY: number
636
+ }
637
+
638
+ /** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */
639
+ declare var Number: NumberConstructor
640
+
641
+ interface TemplateStringsArray extends ReadonlyArray<string> {
642
+ readonly raw: readonly string[]
643
+ }
644
+
645
+ /**
646
+ * The type of `import.meta`.
647
+ *
648
+ * If you need to declare that a given property exists on `import.meta`,
649
+ * this type may be augmented via interface merging.
650
+ */
651
+ interface ImportMeta {}
652
+
653
+ interface Math {
654
+ /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */
655
+ readonly E: number
656
+ /** The natural logarithm of 10. */
657
+ readonly LN10: number
658
+ /** The natural logarithm of 2. */
659
+ readonly LN2: number
660
+ /** The base-2 logarithm of e. */
661
+ readonly LOG2E: number
662
+ /** The base-10 logarithm of e. */
663
+ readonly LOG10E: number
664
+ /** Pi. This is the ratio of the circumference of a circle to its diameter. */
665
+ readonly PI: number
666
+ /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */
667
+ readonly SQRT1_2: number
668
+ /** The square root of 2. */
669
+ readonly SQRT2: number
670
+ /**
671
+ * Returns the absolute value of a number (the value without regard to whether it is positive or negative).
672
+ * For example, the absolute value of -5 is the same as the absolute value of 5.
673
+ * @param x A numeric expression for which the absolute value is needed.
674
+ */
675
+ abs(x: number): number
676
+ /**
677
+ * Returns the arc cosine (or inverse cosine) of a number.
678
+ * @param x A numeric expression.
679
+ */
680
+ acos(x: number): number
681
+ /**
682
+ * Returns the arcsine of a number.
683
+ * @param x A numeric expression.
684
+ */
685
+ asin(x: number): number
686
+ /**
687
+ * Returns the arctangent of a number.
688
+ * @param x A numeric expression for which the arctangent is needed.
689
+ */
690
+ atan(x: number): number
691
+ /**
692
+ * Returns the angle (in radians) from the X axis to a point.
693
+ * @param y A numeric expression representing the cartesian y-coordinate.
694
+ * @param x A numeric expression representing the cartesian x-coordinate.
695
+ */
696
+ atan2(y: number, x: number): number
697
+ /**
698
+ * Returns the smallest integer greater than or equal to its numeric argument.
699
+ * @param x A numeric expression.
700
+ */
701
+ ceil(x: number): number
702
+ /**
703
+ * Returns the cosine of a number.
704
+ * @param x A numeric expression that contains an angle measured in radians.
705
+ */
706
+ cos(x: number): number
707
+ /**
708
+ * Returns e (the base of natural logarithms) raised to a power.
709
+ * @param x A numeric expression representing the power of e.
710
+ */
711
+ exp(x: number): number
712
+ /**
713
+ * Returns the greatest integer less than or equal to its numeric argument.
714
+ * @param x A numeric expression.
715
+ */
716
+ floor(x: number): number
717
+ /**
718
+ * Returns the natural logarithm (base e) of a number.
719
+ * @param x A numeric expression.
720
+ */
721
+ log(x: number): number
722
+ /**
723
+ * Returns the larger of a set of supplied numeric expressions.
724
+ * @param values Numeric expressions to be evaluated.
725
+ */
726
+ max(...values: number[]): number
727
+ /**
728
+ * Returns the smaller of a set of supplied numeric expressions.
729
+ * @param values Numeric expressions to be evaluated.
730
+ */
731
+ min(...values: number[]): number
732
+ /**
733
+ * Returns the value of a base expression taken to a specified power.
734
+ * @param x The base value of the expression.
735
+ * @param y The exponent value of the expression.
736
+ */
737
+ pow(x: number, y: number): number
738
+ /** Returns a pseudorandom number between 0 and 1. */
739
+ random(): number
740
+ /**
741
+ * Returns a supplied numeric expression rounded to the nearest integer.
742
+ * @param x The value to be rounded to the nearest integer.
743
+ */
744
+ round(x: number): number
745
+ /**
746
+ * Returns the sine of a number.
747
+ * @param x A numeric expression that contains an angle measured in radians.
748
+ */
749
+ sin(x: number): number
750
+ /**
751
+ * Returns the square root of a number.
752
+ * @param x A numeric expression.
753
+ */
754
+ sqrt(x: number): number
755
+ /**
756
+ * Returns the tangent of a number.
757
+ * @param x A numeric expression that contains an angle measured in radians.
758
+ */
759
+ tan(x: number): number
760
+ }
761
+ /** An intrinsic object that provides basic mathematics functionality and constants. */
762
+ declare var Math: Math
763
+
764
+ /** Enables basic storage and retrieval of dates and times. */
765
+ interface Date {
766
+ /** Returns a string representation of a date. The format of the string depends on the locale. */
767
+ toString(): string
768
+ /** Returns a date as a string value. */
769
+ toDateString(): string
770
+ /** Returns a time as a string value. */
771
+ toTimeString(): string
772
+ /** Returns a value as a string value appropriate to the host environment's current locale. */
773
+ toLocaleString(): string
774
+ /** Returns a date as a string value appropriate to the host environment's current locale. */
775
+ toLocaleDateString(): string
776
+ /** Returns a time as a string value appropriate to the host environment's current locale. */
777
+ toLocaleTimeString(): string
778
+ /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */
779
+ valueOf(): number
780
+ /** Gets the time value in milliseconds. */
781
+ getTime(): number
782
+ /** Gets the year, using local time. */
783
+ getFullYear(): number
784
+ /** Gets the year using Universal Coordinated Time (UTC). */
785
+ getUTCFullYear(): number
786
+ /** Gets the month, using local time. */
787
+ getMonth(): number
788
+ /** Gets the month of a Date object using Universal Coordinated Time (UTC). */
789
+ getUTCMonth(): number
790
+ /** Gets the day-of-the-month, using local time. */
791
+ getDate(): number
792
+ /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */
793
+ getUTCDate(): number
794
+ /** Gets the day of the week, using local time. */
795
+ getDay(): number
796
+ /** Gets the day of the week using Universal Coordinated Time (UTC). */
797
+ getUTCDay(): number
798
+ /** Gets the hours in a date, using local time. */
799
+ getHours(): number
800
+ /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */
801
+ getUTCHours(): number
802
+ /** Gets the minutes of a Date object, using local time. */
803
+ getMinutes(): number
804
+ /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */
805
+ getUTCMinutes(): number
806
+ /** Gets the seconds of a Date object, using local time. */
807
+ getSeconds(): number
808
+ /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */
809
+ getUTCSeconds(): number
810
+ /** Gets the milliseconds of a Date, using local time. */
811
+ getMilliseconds(): number
812
+ /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */
813
+ getUTCMilliseconds(): number
814
+ /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */
815
+ getTimezoneOffset(): number
816
+ /**
817
+ * Sets the date and time value in the Date object.
818
+ * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
819
+ */
820
+ setTime(time: number): number
821
+ /**
822
+ * Sets the milliseconds value in the Date object using local time.
823
+ * @param ms A numeric value equal to the millisecond value.
824
+ */
825
+ setMilliseconds(ms: number): number
826
+ /**
827
+ * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
828
+ * @param ms A numeric value equal to the millisecond value.
829
+ */
830
+ setUTCMilliseconds(ms: number): number
831
+
832
+ /**
833
+ * Sets the seconds value in the Date object using local time.
834
+ * @param sec A numeric value equal to the seconds value.
835
+ * @param ms A numeric value equal to the milliseconds value.
836
+ */
837
+ setSeconds(sec: number, ms?: number): number
838
+ /**
839
+ * Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
840
+ * @param sec A numeric value equal to the seconds value.
841
+ * @param ms A numeric value equal to the milliseconds value.
842
+ */
843
+ setUTCSeconds(sec: number, ms?: number): number
844
+ /**
845
+ * Sets the minutes value in the Date object using local time.
846
+ * @param min A numeric value equal to the minutes value.
847
+ * @param sec A numeric value equal to the seconds value.
848
+ * @param ms A numeric value equal to the milliseconds value.
849
+ */
850
+ setMinutes(min: number, sec?: number, ms?: number): number
851
+ /**
852
+ * Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
853
+ * @param min A numeric value equal to the minutes value.
854
+ * @param sec A numeric value equal to the seconds value.
855
+ * @param ms A numeric value equal to the milliseconds value.
856
+ */
857
+ setUTCMinutes(min: number, sec?: number, ms?: number): number
858
+ /**
859
+ * Sets the hour value in the Date object using local time.
860
+ * @param hours A numeric value equal to the hours value.
861
+ * @param min A numeric value equal to the minutes value.
862
+ * @param sec A numeric value equal to the seconds value.
863
+ * @param ms A numeric value equal to the milliseconds value.
864
+ */
865
+ setHours(hours: number, min?: number, sec?: number, ms?: number): number
866
+ /**
867
+ * Sets the hours value in the Date object using Universal Coordinated Time (UTC).
868
+ * @param hours A numeric value equal to the hours value.
869
+ * @param min A numeric value equal to the minutes value.
870
+ * @param sec A numeric value equal to the seconds value.
871
+ * @param ms A numeric value equal to the milliseconds value.
872
+ */
873
+ setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number
874
+ /**
875
+ * Sets the numeric day-of-the-month value of the Date object using local time.
876
+ * @param date A numeric value equal to the day of the month.
877
+ */
878
+ setDate(date: number): number
879
+ /**
880
+ * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
881
+ * @param date A numeric value equal to the day of the month.
882
+ */
883
+ setUTCDate(date: number): number
884
+ /**
885
+ * Sets the month value in the Date object using local time.
886
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
887
+ * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.
888
+ */
889
+ setMonth(month: number, date?: number): number
890
+ /**
891
+ * Sets the month value in the Date object using Universal Coordinated Time (UTC).
892
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
893
+ * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.
894
+ */
895
+ setUTCMonth(month: number, date?: number): number
896
+ /**
897
+ * Sets the year of the Date object using local time.
898
+ * @param year A numeric value for the year.
899
+ * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
900
+ * @param date A numeric value equal for the day of the month.
901
+ */
902
+ setFullYear(year: number, month?: number, date?: number): number
903
+ /**
904
+ * Sets the year value in the Date object using Universal Coordinated Time (UTC).
905
+ * @param year A numeric value equal to the year.
906
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.
907
+ * @param date A numeric value equal to the day of the month.
908
+ */
909
+ setUTCFullYear(year: number, month?: number, date?: number): number
910
+ /** Returns a date converted to a string using Universal Coordinated Time (UTC). */
911
+ toUTCString(): string
912
+ /** Returns a date as a string value in ISO format. */
913
+ toISOString(): string
914
+ /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */
915
+ toJSON(key?: any): string
916
+ }
917
+
918
+ interface DateConstructor {
919
+ new (): Date
920
+ new (value: number | string): Date
921
+ new (
922
+ year: number,
923
+ month: number,
924
+ date?: number,
925
+ hours?: number,
926
+ minutes?: number,
927
+ seconds?: number,
928
+ ms?: number
929
+ ): Date
930
+ (): string
931
+ readonly prototype: Date
932
+ /**
933
+ * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.
934
+ * @param s A date string
935
+ */
936
+ parse(s: string): number
937
+ /**
938
+ * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
939
+ * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
940
+ * @param month The month as a number between 0 and 11 (January to December).
941
+ * @param date The date as a number between 1 and 31.
942
+ * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.
943
+ * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.
944
+ * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.
945
+ * @param ms A number from 0 to 999 that specifies the milliseconds.
946
+ */
947
+ UTC(
948
+ year: number,
949
+ month: number,
950
+ date?: number,
951
+ hours?: number,
952
+ minutes?: number,
953
+ seconds?: number,
954
+ ms?: number
955
+ ): number
956
+ now(): number
957
+ }
958
+
959
+ declare var Date: DateConstructor
960
+
961
+ interface RegExpMatchArray extends Array<string> {
962
+ index?: number
963
+ input?: string
964
+ }
965
+
966
+ interface RegExpExecArray extends Array<string> {
967
+ index: number
968
+ input: string
969
+ }
970
+
971
+ interface RegExp {
972
+ /**
973
+ * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.
974
+ * @param string The String object or string literal on which to perform the search.
975
+ */
976
+ exec(string: string): RegExpExecArray | null
977
+
978
+ /**
979
+ * Returns a Boolean value that indicates whether or not a pattern exists in a searched string.
980
+ * @param string String on which to perform the search.
981
+ */
982
+ test(string: string): boolean
983
+
984
+ /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */
985
+ readonly source: string
986
+
987
+ /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */
988
+ readonly global: boolean
989
+
990
+ /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */
991
+ readonly ignoreCase: boolean
992
+
993
+ /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */
994
+ readonly multiline: boolean
995
+
996
+ lastIndex: number
997
+
998
+ // Non-standard extensions
999
+ compile(): this
1000
+ }
1001
+
1002
+ interface RegExpConstructor {
1003
+ new (pattern: RegExp | string): RegExp
1004
+ new (pattern: string, flags?: string): RegExp
1005
+ (pattern: RegExp | string): RegExp
1006
+ (pattern: string, flags?: string): RegExp
1007
+ readonly prototype: RegExp
1008
+
1009
+ // Non-standard extensions
1010
+ $1: string
1011
+ $2: string
1012
+ $3: string
1013
+ $4: string
1014
+ $5: string
1015
+ $6: string
1016
+ $7: string
1017
+ $8: string
1018
+ $9: string
1019
+ lastMatch: string
1020
+ }
1021
+
1022
+ declare var RegExp: RegExpConstructor
1023
+
1024
+ interface Error {
1025
+ name: string
1026
+ message: string
1027
+ stack?: string
1028
+ }
1029
+
1030
+ interface ErrorConstructor {
1031
+ new (message?: string): Error
1032
+ (message?: string): Error
1033
+ readonly prototype: Error
1034
+ }
1035
+
1036
+ declare var Error: ErrorConstructor
1037
+
1038
+ interface EvalError extends Error {}
1039
+
1040
+ interface EvalErrorConstructor extends ErrorConstructor {
1041
+ new (message?: string): EvalError
1042
+ (message?: string): EvalError
1043
+ readonly prototype: EvalError
1044
+ }
1045
+
1046
+ declare var EvalError: EvalErrorConstructor
1047
+
1048
+ interface RangeError extends Error {}
1049
+
1050
+ interface RangeErrorConstructor extends ErrorConstructor {
1051
+ new (message?: string): RangeError
1052
+ (message?: string): RangeError
1053
+ readonly prototype: RangeError
1054
+ }
1055
+
1056
+ declare var RangeError: RangeErrorConstructor
1057
+
1058
+ interface ReferenceError extends Error {}
1059
+
1060
+ interface ReferenceErrorConstructor extends ErrorConstructor {
1061
+ new (message?: string): ReferenceError
1062
+ (message?: string): ReferenceError
1063
+ readonly prototype: ReferenceError
1064
+ }
1065
+
1066
+ declare var ReferenceError: ReferenceErrorConstructor
1067
+
1068
+ interface SyntaxError extends Error {}
1069
+
1070
+ interface SyntaxErrorConstructor extends ErrorConstructor {
1071
+ new (message?: string): SyntaxError
1072
+ (message?: string): SyntaxError
1073
+ readonly prototype: SyntaxError
1074
+ }
1075
+
1076
+ declare var SyntaxError: SyntaxErrorConstructor
1077
+
1078
+ interface TypeError extends Error {}
1079
+
1080
+ interface TypeErrorConstructor extends ErrorConstructor {
1081
+ new (message?: string): TypeError
1082
+ (message?: string): TypeError
1083
+ readonly prototype: TypeError
1084
+ }
1085
+
1086
+ declare var TypeError: TypeErrorConstructor
1087
+
1088
+ interface URIError extends Error {}
1089
+
1090
+ interface URIErrorConstructor extends ErrorConstructor {
1091
+ new (message?: string): URIError
1092
+ (message?: string): URIError
1093
+ readonly prototype: URIError
1094
+ }
1095
+
1096
+ declare var URIError: URIErrorConstructor
1097
+
1098
+ interface JSON {
1099
+ /**
1100
+ * Converts a JavaScript Object Notation (JSON) string into an object.
1101
+ * @param text A valid JSON string.
1102
+ * @param reviver A function that transforms the results. This function is called for each member of the object.
1103
+ * If a member contains nested objects, the nested objects are transformed before the parent object is.
1104
+ */
1105
+ parse(text: string, reviver?: (this: any, key: string, value: any) => any): any
1106
+ /**
1107
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
1108
+ * @param value A JavaScript value, usually an object or array, to be converted.
1109
+ * @param replacer A function that transforms the results.
1110
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
1111
+ */
1112
+ stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string
1113
+ /**
1114
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
1115
+ * @param value A JavaScript value, usually an object or array, to be converted.
1116
+ * @param replacer An array of strings and numbers that acts as a approved list for selecting the object properties that will be stringified.
1117
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
1118
+ */
1119
+ stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string
1120
+ }
1121
+
1122
+ /**
1123
+ * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
1124
+ */
1125
+ declare var JSON: JSON
1126
+
1127
+ /////////////////////////////
1128
+ /// ECMAScript Array API (specially handled by compiler)
1129
+ /////////////////////////////
1130
+
1131
+ interface ReadonlyArray<T> {
1132
+ /**
1133
+ * Gets the length of the array. This is a number one higher than the highest element defined in an array.
1134
+ */
1135
+ readonly length: number
1136
+ /**
1137
+ * Returns a string representation of an array.
1138
+ */
1139
+ toString(): string
1140
+ /**
1141
+ * Returns a string representation of an array. The elements are converted to string using their toLocalString methods.
1142
+ */
1143
+ toLocaleString(): string
1144
+ /**
1145
+ * Combines two or more arrays.
1146
+ * @param items Additional items to add to the end of array1.
1147
+ */
1148
+ concat(...items: ConcatArray<T>[]): T[]
1149
+ /**
1150
+ * Combines two or more arrays.
1151
+ * @param items Additional items to add to the end of array1.
1152
+ */
1153
+ concat(...items: (T | ConcatArray<T>)[]): T[]
1154
+ /**
1155
+ * Adds all the elements of an array separated by the specified separator string.
1156
+ * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
1157
+ */
1158
+ join(separator?: string): string
1159
+ /**
1160
+ * Returns a section of an array.
1161
+ * @param start The beginning of the specified portion of the array.
1162
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
1163
+ */
1164
+ slice(start?: number, end?: number): T[]
1165
+ /**
1166
+ * Returns the index of the first occurrence of a value in an array.
1167
+ * @param searchElement The value to locate in the array.
1168
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
1169
+ */
1170
+ indexOf(searchElement: T, fromIndex?: number): number
1171
+ /**
1172
+ * Returns the index of the last occurrence of a specified value in an array.
1173
+ * @param searchElement The value to locate in the array.
1174
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
1175
+ */
1176
+ lastIndexOf(searchElement: T, fromIndex?: number): number
1177
+ /**
1178
+ * Determines whether all the members of an array satisfy the specified test.
1179
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
1180
+ * the callbackfn function for each element in the array until the callbackfn returns a value
1181
+ * which is coercible to the Boolean value false, or until the end of the array.
1182
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
1183
+ * If thisArg is omitted, undefined is used as the this value.
1184
+ */
1185
+ every(callbackfn: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean
1186
+ /**
1187
+ * Determines whether the specified callback function returns true for any element of an array.
1188
+ * @param callbackfn A function that accepts up to three arguments. The some method calls
1189
+ * the callbackfn function for each element in the array until the callbackfn returns a value
1190
+ * which is coercible to the Boolean value true, or until the end of the array.
1191
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
1192
+ * If thisArg is omitted, undefined is used as the this value.
1193
+ */
1194
+ some(callbackfn: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean
1195
+ /**
1196
+ * Performs the specified action for each element in an array.
1197
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
1198
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
1199
+ */
1200
+ forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void
1201
+ /**
1202
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
1203
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
1204
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
1205
+ */
1206
+ map<U>(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[]
1207
+ /**
1208
+ * Returns the elements of an array that meet the condition specified in a callback function.
1209
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
1210
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
1211
+ */
1212
+ filter<S extends T>(callbackfn: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[]
1213
+ /**
1214
+ * Returns the elements of an array that meet the condition specified in a callback function.
1215
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
1216
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
1217
+ */
1218
+ filter(callbackfn: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[]
1219
+ /**
1220
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
1221
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
1222
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1223
+ */
1224
+ reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T
1225
+ reduce(
1226
+ callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T,
1227
+ initialValue: T
1228
+ ): T
1229
+ /**
1230
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
1231
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
1232
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1233
+ */
1234
+ reduce<U>(
1235
+ callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U,
1236
+ initialValue: U
1237
+ ): U
1238
+ /**
1239
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
1240
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
1241
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1242
+ */
1243
+ reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T
1244
+ reduceRight(
1245
+ callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T,
1246
+ initialValue: T
1247
+ ): T
1248
+ /**
1249
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
1250
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
1251
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1252
+ */
1253
+ reduceRight<U>(
1254
+ callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U,
1255
+ initialValue: U
1256
+ ): U
1257
+
1258
+ readonly [n: number]: T
1259
+ }
1260
+
1261
+ interface ConcatArray<T> {
1262
+ readonly length: number
1263
+ readonly [n: number]: T
1264
+ join(separator?: string): string
1265
+ slice(start?: number, end?: number): T[]
1266
+ }
1267
+
1268
+ interface Array<T> {
1269
+ /**
1270
+ * Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.
1271
+ */
1272
+ length: number
1273
+ /**
1274
+ * Returns a string representation of an array.
1275
+ */
1276
+ toString(): string
1277
+ /**
1278
+ * Returns a string representation of an array. The elements are converted to string using their toLocalString methods.
1279
+ */
1280
+ toLocaleString(): string
1281
+ /**
1282
+ * Removes the last element from an array and returns it.
1283
+ */
1284
+ pop(): T | undefined
1285
+ /**
1286
+ * Appends new elements to an array, and returns the new length of the array.
1287
+ * @param items New elements of the Array.
1288
+ */
1289
+ push(...items: T[]): number
1290
+ /**
1291
+ * Combines two or more arrays.
1292
+ * @param items Additional items to add to the end of array1.
1293
+ */
1294
+ concat(...items: ConcatArray<T>[]): T[]
1295
+ /**
1296
+ * Combines two or more arrays.
1297
+ * @param items Additional items to add to the end of array1.
1298
+ */
1299
+ concat(...items: (T | ConcatArray<T>)[]): T[]
1300
+ /**
1301
+ * Adds all the elements of an array separated by the specified separator string.
1302
+ * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
1303
+ */
1304
+ join(separator?: string): string
1305
+ /**
1306
+ * Reverses the elements in an Array.
1307
+ */
1308
+ reverse(): T[]
1309
+ /**
1310
+ * Removes the first element from an array and returns it.
1311
+ */
1312
+ shift(): T | undefined
1313
+ /**
1314
+ * Returns a section of an array.
1315
+ * @param start The beginning of the specified portion of the array.
1316
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
1317
+ */
1318
+ slice(start?: number, end?: number): T[]
1319
+ /**
1320
+ * Sorts an array.
1321
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
1322
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
1323
+ * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
1324
+ * ```ts
1325
+ * [11,2,22,1].sort((a, b) => a - b)
1326
+ * ```
1327
+ */
1328
+ sort(compareFn?: (a: T, b: T) => number): this
1329
+ /**
1330
+ * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
1331
+ * @param start The zero-based location in the array from which to start removing elements.
1332
+ * @param deleteCount The number of elements to remove.
1333
+ */
1334
+ splice(start: number, deleteCount?: number): T[]
1335
+ /**
1336
+ * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
1337
+ * @param start The zero-based location in the array from which to start removing elements.
1338
+ * @param deleteCount The number of elements to remove.
1339
+ * @param items Elements to insert into the array in place of the deleted elements.
1340
+ */
1341
+ splice(start: number, deleteCount: number, ...items: T[]): T[]
1342
+ /**
1343
+ * Inserts new elements at the start of an array.
1344
+ * @param items Elements to insert at the start of the Array.
1345
+ */
1346
+ unshift(...items: T[]): number
1347
+ /**
1348
+ * Returns the index of the first occurrence of a value in an array.
1349
+ * @param searchElement The value to locate in the array.
1350
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
1351
+ */
1352
+ indexOf(searchElement: T, fromIndex?: number): number
1353
+ /**
1354
+ * Returns the index of the last occurrence of a specified value in an array.
1355
+ * @param searchElement The value to locate in the array.
1356
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
1357
+ */
1358
+ lastIndexOf(searchElement: T, fromIndex?: number): number
1359
+ /**
1360
+ * Determines whether all the members of an array satisfy the specified test.
1361
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
1362
+ * the callbackfn function for each element in the array until the callbackfn returns a value
1363
+ * which is coercible to the Boolean value false, or until the end of the array.
1364
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
1365
+ * If thisArg is omitted, undefined is used as the this value.
1366
+ */
1367
+ every(callbackfn: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean
1368
+ /**
1369
+ * Determines whether the specified callback function returns true for any element of an array.
1370
+ * @param callbackfn A function that accepts up to three arguments. The some method calls
1371
+ * the callbackfn function for each element in the array until the callbackfn returns a value
1372
+ * which is coercible to the Boolean value true, or until the end of the array.
1373
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
1374
+ * If thisArg is omitted, undefined is used as the this value.
1375
+ */
1376
+ some(callbackfn: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean
1377
+ /**
1378
+ * Performs the specified action for each element in an array.
1379
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
1380
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
1381
+ */
1382
+ forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void
1383
+ /**
1384
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
1385
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
1386
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
1387
+ */
1388
+ map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]
1389
+ /**
1390
+ * Returns the elements of an array that meet the condition specified in a callback function.
1391
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
1392
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
1393
+ */
1394
+ filter<S extends T>(callbackfn: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]
1395
+ /**
1396
+ * Returns the elements of an array that meet the condition specified in a callback function.
1397
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
1398
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
1399
+ */
1400
+ filter(callbackfn: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[]
1401
+ /**
1402
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
1403
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
1404
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1405
+ */
1406
+ reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T
1407
+ reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T
1408
+ /**
1409
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
1410
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
1411
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1412
+ */
1413
+ reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U
1414
+ /**
1415
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
1416
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
1417
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1418
+ */
1419
+ reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T
1420
+ reduceRight(
1421
+ callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T,
1422
+ initialValue: T
1423
+ ): T
1424
+ /**
1425
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
1426
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
1427
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1428
+ */
1429
+ reduceRight<U>(
1430
+ callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U,
1431
+ initialValue: U
1432
+ ): U
1433
+
1434
+ [n: number]: T
1435
+ }
1436
+
1437
+ interface ArrayConstructor {
1438
+ new (arrayLength?: number): any[]
1439
+ new <T>(arrayLength: number): T[]
1440
+ new <T>(...items: T[]): T[]
1441
+ (arrayLength?: number): any[]
1442
+ <T>(arrayLength: number): T[]
1443
+ <T>(...items: T[]): T[]
1444
+ isArray(arg: any): arg is any[]
1445
+ readonly prototype: any[]
1446
+ }
1447
+
1448
+ declare var Array: ArrayConstructor
1449
+
1450
+ interface TypedPropertyDescriptor<T> {
1451
+ enumerable?: boolean
1452
+ configurable?: boolean
1453
+ writable?: boolean
1454
+ value?: T
1455
+ get?: () => T
1456
+ set?: (value: T) => void
1457
+ }
1458
+
1459
+ declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void
1460
+ declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void
1461
+ declare type MethodDecorator = <T>(
1462
+ target: Object,
1463
+ propertyKey: string | symbol,
1464
+ descriptor: TypedPropertyDescriptor<T>
1465
+ ) => TypedPropertyDescriptor<T> | void
1466
+ declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void
1467
+
1468
+ declare type PromiseConstructorLike = new <T>(
1469
+ executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void
1470
+ ) => PromiseLike<T>
1471
+
1472
+ interface PromiseLike<T> {
1473
+ /**
1474
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
1475
+ * @param onfulfilled The callback to execute when the Promise is resolved.
1476
+ * @param onrejected The callback to execute when the Promise is rejected.
1477
+ * @returns A Promise for the completion of which ever callback is executed.
1478
+ */
1479
+ then<TResult1 = T, TResult2 = never>(
1480
+ onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null,
1481
+ onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null
1482
+ ): PromiseLike<TResult1 | TResult2>
1483
+ }
1484
+
1485
+ /**
1486
+ * Represents the completion of an asynchronous operation
1487
+ */
1488
+ interface Promise<T> {
1489
+ /**
1490
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
1491
+ * @param onfulfilled The callback to execute when the Promise is resolved.
1492
+ * @param onrejected The callback to execute when the Promise is rejected.
1493
+ * @returns A Promise for the completion of which ever callback is executed.
1494
+ */
1495
+ then<TResult1 = T, TResult2 = never>(
1496
+ onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null,
1497
+ onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null
1498
+ ): Promise<TResult1 | TResult2>
1499
+
1500
+ /**
1501
+ * Attaches a callback for only the rejection of the Promise.
1502
+ * @param onrejected The callback to execute when the Promise is rejected.
1503
+ * @returns A Promise for the completion of the callback.
1504
+ */
1505
+ catch<TResult = never>(
1506
+ onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null
1507
+ ): Promise<T | TResult>
1508
+ }
1509
+
1510
+ interface ArrayLike<T> {
1511
+ readonly length: number
1512
+ readonly [n: number]: T
1513
+ }
1514
+
1515
+ /**
1516
+ * Make all properties in T optional
1517
+ */
1518
+ type Partial<T> = {
1519
+ [P in keyof T]?: T[P]
1520
+ }
1521
+
1522
+ /**
1523
+ * Make all properties in T required
1524
+ */
1525
+ type Required<T> = {
1526
+ [P in keyof T]-?: T[P]
1527
+ }
1528
+
1529
+ /**
1530
+ * Make all properties in T readonly
1531
+ */
1532
+ type Readonly<T> = {
1533
+ readonly [P in keyof T]: T[P]
1534
+ }
1535
+
1536
+ /**
1537
+ * From T, pick a set of properties whose keys are in the union K
1538
+ */
1539
+ type Pick<T, K extends keyof T> = {
1540
+ [P in K]: T[P]
1541
+ }
1542
+
1543
+ /**
1544
+ * Construct a type with a set of properties K of type T
1545
+ */
1546
+ type Record<K extends keyof any, T> = {
1547
+ [P in K]: T
1548
+ }
1549
+
1550
+ /**
1551
+ * Exclude from T those types that are assignable to U
1552
+ */
1553
+ type Exclude<T, U> = T extends U ? never : T
1554
+
1555
+ /**
1556
+ * Extract from T those types that are assignable to U
1557
+ */
1558
+ type Extract<T, U> = T extends U ? T : never
1559
+
1560
+ /**
1561
+ * Construct a type with the properties of T except for those in type K.
1562
+ */
1563
+ type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>
1564
+
1565
+ /**
1566
+ * Exclude null and undefined from T
1567
+ */
1568
+ type NonNullable<T> = T extends null | undefined ? never : T
1569
+
1570
+ /**
1571
+ * Obtain the parameters of a function type in a tuple
1572
+ */
1573
+ type Parameters<T extends (...args: any) => any> = T extends (...args: infer P) => any ? P : never
1574
+
1575
+ /**
1576
+ * Obtain the parameters of a constructor function type in a tuple
1577
+ */
1578
+ type ConstructorParameters<T extends new (...args: any) => any> = T extends new (...args: infer P) => any ? P : never
1579
+
1580
+ /**
1581
+ * Obtain the return type of a function type
1582
+ */
1583
+ type ReturnType<T extends (...args: any) => any> = T extends (...args: any) => infer R ? R : any
1584
+
1585
+ /**
1586
+ * Obtain the return type of a constructor function type
1587
+ */
1588
+ type InstanceType<T extends new (...args: any) => any> = T extends new (...args: any) => infer R ? R : any
1589
+
1590
+ /**
1591
+ * Marker for contextual 'this' type
1592
+ */
1593
+ interface ThisType<T> {}
1594
+
1595
+ /**
1596
+ * Represents a raw buffer of binary data, which is used to store data for the
1597
+ * different typed arrays. ArrayBuffers cannot be read from or written to directly,
1598
+ * but can be passed to a typed array or DataView Object to interpret the raw
1599
+ * buffer as needed.
1600
+ */
1601
+ interface ArrayBuffer {
1602
+ /**
1603
+ * Read-only. The length of the ArrayBuffer (in bytes).
1604
+ */
1605
+ readonly byteLength: number
1606
+
1607
+ /**
1608
+ * Returns a section of an ArrayBuffer.
1609
+ */
1610
+ slice(begin: number, end?: number): ArrayBuffer
1611
+ }
1612
+
1613
+ /**
1614
+ * Allowed ArrayBuffer types for the buffer of an ArrayBufferView and related Typed Arrays.
1615
+ */
1616
+ interface ArrayBufferTypes {
1617
+ ArrayBuffer: ArrayBuffer
1618
+ }
1619
+ type ArrayBufferLike = ArrayBufferTypes[keyof ArrayBufferTypes]
1620
+
1621
+ interface ArrayBufferConstructor {
1622
+ readonly prototype: ArrayBuffer
1623
+ new (byteLength: number): ArrayBuffer
1624
+ isView(arg: any): arg is ArrayBufferView
1625
+ }
1626
+ declare var ArrayBuffer: ArrayBufferConstructor
1627
+
1628
+ interface ArrayBufferView {
1629
+ /**
1630
+ * The ArrayBuffer instance referenced by the array.
1631
+ */
1632
+ buffer: ArrayBufferLike
1633
+
1634
+ /**
1635
+ * The length in bytes of the array.
1636
+ */
1637
+ byteLength: number
1638
+
1639
+ /**
1640
+ * The offset in bytes of the array.
1641
+ */
1642
+ byteOffset: number
1643
+ }
1644
+
1645
+ interface DataView {
1646
+ readonly buffer: ArrayBuffer
1647
+ readonly byteLength: number
1648
+ readonly byteOffset: number
1649
+ /**
1650
+ * Gets the Float32 value at the specified byte offset from the start of the view. There is
1651
+ * no alignment constraint; multi-byte values may be fetched from any offset.
1652
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
1653
+ */
1654
+ getFloat32(byteOffset: number, littleEndian?: boolean): number
1655
+
1656
+ /**
1657
+ * Gets the Float64 value at the specified byte offset from the start of the view. There is
1658
+ * no alignment constraint; multi-byte values may be fetched from any offset.
1659
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
1660
+ */
1661
+ getFloat64(byteOffset: number, littleEndian?: boolean): number
1662
+
1663
+ /**
1664
+ * Gets the Int8 value at the specified byte offset from the start of the view. There is
1665
+ * no alignment constraint; multi-byte values may be fetched from any offset.
1666
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
1667
+ */
1668
+ getInt8(byteOffset: number): number
1669
+
1670
+ /**
1671
+ * Gets the Int16 value at the specified byte offset from the start of the view. There is
1672
+ * no alignment constraint; multi-byte values may be fetched from any offset.
1673
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
1674
+ */
1675
+ getInt16(byteOffset: number, littleEndian?: boolean): number
1676
+ /**
1677
+ * Gets the Int32 value at the specified byte offset from the start of the view. There is
1678
+ * no alignment constraint; multi-byte values may be fetched from any offset.
1679
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
1680
+ */
1681
+ getInt32(byteOffset: number, littleEndian?: boolean): number
1682
+
1683
+ /**
1684
+ * Gets the Uint8 value at the specified byte offset from the start of the view. There is
1685
+ * no alignment constraint; multi-byte values may be fetched from any offset.
1686
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
1687
+ */
1688
+ getUint8(byteOffset: number): number
1689
+
1690
+ /**
1691
+ * Gets the Uint16 value at the specified byte offset from the start of the view. There is
1692
+ * no alignment constraint; multi-byte values may be fetched from any offset.
1693
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
1694
+ */
1695
+ getUint16(byteOffset: number, littleEndian?: boolean): number
1696
+
1697
+ /**
1698
+ * Gets the Uint32 value at the specified byte offset from the start of the view. There is
1699
+ * no alignment constraint; multi-byte values may be fetched from any offset.
1700
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
1701
+ */
1702
+ getUint32(byteOffset: number, littleEndian?: boolean): number
1703
+
1704
+ /**
1705
+ * Stores an Float32 value at the specified byte offset from the start of the view.
1706
+ * @param byteOffset The place in the buffer at which the value should be set.
1707
+ * @param value The value to set.
1708
+ * @param littleEndian If false or undefined, a big-endian value should be written,
1709
+ * otherwise a little-endian value should be written.
1710
+ */
1711
+ setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void
1712
+
1713
+ /**
1714
+ * Stores an Float64 value at the specified byte offset from the start of the view.
1715
+ * @param byteOffset The place in the buffer at which the value should be set.
1716
+ * @param value The value to set.
1717
+ * @param littleEndian If false or undefined, a big-endian value should be written,
1718
+ * otherwise a little-endian value should be written.
1719
+ */
1720
+ setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void
1721
+
1722
+ /**
1723
+ * Stores an Int8 value at the specified byte offset from the start of the view.
1724
+ * @param byteOffset The place in the buffer at which the value should be set.
1725
+ * @param value The value to set.
1726
+ */
1727
+ setInt8(byteOffset: number, value: number): void
1728
+
1729
+ /**
1730
+ * Stores an Int16 value at the specified byte offset from the start of the view.
1731
+ * @param byteOffset The place in the buffer at which the value should be set.
1732
+ * @param value The value to set.
1733
+ * @param littleEndian If false or undefined, a big-endian value should be written,
1734
+ * otherwise a little-endian value should be written.
1735
+ */
1736
+ setInt16(byteOffset: number, value: number, littleEndian?: boolean): void
1737
+
1738
+ /**
1739
+ * Stores an Int32 value at the specified byte offset from the start of the view.
1740
+ * @param byteOffset The place in the buffer at which the value should be set.
1741
+ * @param value The value to set.
1742
+ * @param littleEndian If false or undefined, a big-endian value should be written,
1743
+ * otherwise a little-endian value should be written.
1744
+ */
1745
+ setInt32(byteOffset: number, value: number, littleEndian?: boolean): void
1746
+
1747
+ /**
1748
+ * Stores an Uint8 value at the specified byte offset from the start of the view.
1749
+ * @param byteOffset The place in the buffer at which the value should be set.
1750
+ * @param value The value to set.
1751
+ */
1752
+ setUint8(byteOffset: number, value: number): void
1753
+
1754
+ /**
1755
+ * Stores an Uint16 value at the specified byte offset from the start of the view.
1756
+ * @param byteOffset The place in the buffer at which the value should be set.
1757
+ * @param value The value to set.
1758
+ * @param littleEndian If false or undefined, a big-endian value should be written,
1759
+ * otherwise a little-endian value should be written.
1760
+ */
1761
+ setUint16(byteOffset: number, value: number, littleEndian?: boolean): void
1762
+
1763
+ /**
1764
+ * Stores an Uint32 value at the specified byte offset from the start of the view.
1765
+ * @param byteOffset The place in the buffer at which the value should be set.
1766
+ * @param value The value to set.
1767
+ * @param littleEndian If false or undefined, a big-endian value should be written,
1768
+ * otherwise a little-endian value should be written.
1769
+ */
1770
+ setUint32(byteOffset: number, value: number, littleEndian?: boolean): void
1771
+ }
1772
+
1773
+ interface DataViewConstructor {
1774
+ new (buffer: ArrayBufferLike, byteOffset?: number, byteLength?: number): DataView
1775
+ }
1776
+ declare var DataView: DataViewConstructor
1777
+
1778
+ /**
1779
+ * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
1780
+ * number of bytes could not be allocated an exception is raised.
1781
+ */
1782
+ interface Int8Array {
1783
+ /**
1784
+ * The size in bytes of each element in the array.
1785
+ */
1786
+ readonly BYTES_PER_ELEMENT: number
1787
+
1788
+ /**
1789
+ * The ArrayBuffer instance referenced by the array.
1790
+ */
1791
+ readonly buffer: ArrayBufferLike
1792
+
1793
+ /**
1794
+ * The length in bytes of the array.
1795
+ */
1796
+ readonly byteLength: number
1797
+
1798
+ /**
1799
+ * The offset in bytes of the array.
1800
+ */
1801
+ readonly byteOffset: number
1802
+
1803
+ /**
1804
+ * Returns the this object after copying a section of the array identified by start and end
1805
+ * to the same array starting at position target
1806
+ * @param target If target is negative, it is treated as length+target where length is the
1807
+ * length of the array.
1808
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
1809
+ * is treated as length+end.
1810
+ * @param end If not specified, length of the this object is used as its default value.
1811
+ */
1812
+ copyWithin(target: number, start: number, end?: number): this
1813
+
1814
+ /**
1815
+ * Determines whether all the members of an array satisfy the specified test.
1816
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
1817
+ * the callbackfn function for each element in the array until the callbackfn returns a value
1818
+ * which is coercible to the Boolean value false, or until the end of the array.
1819
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
1820
+ * If thisArg is omitted, undefined is used as the this value.
1821
+ */
1822
+ every(callbackfn: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): boolean
1823
+
1824
+ /**
1825
+ * Returns the this object after filling the section identified by start and end with value
1826
+ * @param value value to fill array section with
1827
+ * @param start index to start filling the array at. If start is negative, it is treated as
1828
+ * length+start where length is the length of the array.
1829
+ * @param end index to stop filling the array at. If end is negative, it is treated as
1830
+ * length+end.
1831
+ */
1832
+ fill(value: number, start?: number, end?: number): this
1833
+
1834
+ /**
1835
+ * Returns the elements of an array that meet the condition specified in a callback function.
1836
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
1837
+ * the callbackfn function one time for each element in the array.
1838
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
1839
+ * If thisArg is omitted, undefined is used as the this value.
1840
+ */
1841
+ filter(callbackfn: (value: number, index: number, array: Int8Array) => any, thisArg?: any): Int8Array
1842
+
1843
+ /**
1844
+ * Returns the value of the first element in the array where predicate is true, and undefined
1845
+ * otherwise.
1846
+ * @param predicate find calls predicate once for each element of the array, in ascending
1847
+ * order, until it finds one where predicate returns true. If such an element is found, find
1848
+ * immediately returns that element value. Otherwise, find returns undefined.
1849
+ * @param thisArg If provided, it will be used as the this value for each invocation of
1850
+ * predicate. If it is not provided, undefined is used instead.
1851
+ */
1852
+ find(predicate: (value: number, index: number, obj: Int8Array) => boolean, thisArg?: any): number | undefined
1853
+
1854
+ /**
1855
+ * Returns the index of the first element in the array where predicate is true, and -1
1856
+ * otherwise.
1857
+ * @param predicate find calls predicate once for each element of the array, in ascending
1858
+ * order, until it finds one where predicate returns true. If such an element is found,
1859
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
1860
+ * @param thisArg If provided, it will be used as the this value for each invocation of
1861
+ * predicate. If it is not provided, undefined is used instead.
1862
+ */
1863
+ findIndex(predicate: (value: number, index: number, obj: Int8Array) => boolean, thisArg?: any): number
1864
+
1865
+ /**
1866
+ * Performs the specified action for each element in an array.
1867
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
1868
+ * callbackfn function one time for each element in the array.
1869
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
1870
+ * If thisArg is omitted, undefined is used as the this value.
1871
+ */
1872
+ forEach(callbackfn: (value: number, index: number, array: Int8Array) => void, thisArg?: any): void
1873
+
1874
+ /**
1875
+ * Returns the index of the first occurrence of a value in an array.
1876
+ * @param searchElement The value to locate in the array.
1877
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
1878
+ * search starts at index 0.
1879
+ */
1880
+ indexOf(searchElement: number, fromIndex?: number): number
1881
+
1882
+ /**
1883
+ * Adds all the elements of an array separated by the specified separator string.
1884
+ * @param separator A string used to separate one element of an array from the next in the
1885
+ * resulting String. If omitted, the array elements are separated with a comma.
1886
+ */
1887
+ join(separator?: string): string
1888
+
1889
+ /**
1890
+ * Returns the index of the last occurrence of a value in an array.
1891
+ * @param searchElement The value to locate in the array.
1892
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
1893
+ * search starts at index 0.
1894
+ */
1895
+ lastIndexOf(searchElement: number, fromIndex?: number): number
1896
+
1897
+ /**
1898
+ * The length of the array.
1899
+ */
1900
+ readonly length: number
1901
+
1902
+ /**
1903
+ * Calls a defined callback function on each element of an array, and returns an array that
1904
+ * contains the results.
1905
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
1906
+ * callbackfn function one time for each element in the array.
1907
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
1908
+ * If thisArg is omitted, undefined is used as the this value.
1909
+ */
1910
+ map(callbackfn: (value: number, index: number, array: Int8Array) => number, thisArg?: any): Int8Array
1911
+
1912
+ /**
1913
+ * Calls the specified callback function for all the elements in an array. The return value of
1914
+ * the callback function is the accumulated result, and is provided as an argument in the next
1915
+ * call to the callback function.
1916
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
1917
+ * callbackfn function one time for each element in the array.
1918
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
1919
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
1920
+ * instead of an array value.
1921
+ */
1922
+ reduce(
1923
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number
1924
+ ): number
1925
+ reduce(
1926
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number,
1927
+ initialValue: number
1928
+ ): number
1929
+
1930
+ /**
1931
+ * Calls the specified callback function for all the elements in an array. The return value of
1932
+ * the callback function is the accumulated result, and is provided as an argument in the next
1933
+ * call to the callback function.
1934
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
1935
+ * callbackfn function one time for each element in the array.
1936
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
1937
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
1938
+ * instead of an array value.
1939
+ */
1940
+ reduce<U>(
1941
+ callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U,
1942
+ initialValue: U
1943
+ ): U
1944
+
1945
+ /**
1946
+ * Calls the specified callback function for all the elements in an array, in descending order.
1947
+ * The return value of the callback function is the accumulated result, and is provided as an
1948
+ * argument in the next call to the callback function.
1949
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
1950
+ * the callbackfn function one time for each element in the array.
1951
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
1952
+ * the accumulation. The first call to the callbackfn function provides this value as an
1953
+ * argument instead of an array value.
1954
+ */
1955
+ reduceRight(
1956
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number
1957
+ ): number
1958
+ reduceRight(
1959
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number,
1960
+ initialValue: number
1961
+ ): number
1962
+
1963
+ /**
1964
+ * Calls the specified callback function for all the elements in an array, in descending order.
1965
+ * The return value of the callback function is the accumulated result, and is provided as an
1966
+ * argument in the next call to the callback function.
1967
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
1968
+ * the callbackfn function one time for each element in the array.
1969
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
1970
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
1971
+ * instead of an array value.
1972
+ */
1973
+ reduceRight<U>(
1974
+ callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U,
1975
+ initialValue: U
1976
+ ): U
1977
+
1978
+ /**
1979
+ * Reverses the elements in an Array.
1980
+ */
1981
+ reverse(): Int8Array
1982
+
1983
+ /**
1984
+ * Sets a value or an array of values.
1985
+ * @param array A typed or untyped array of values to set.
1986
+ * @param offset The index in the current array at which the values are to be written.
1987
+ */
1988
+ set(array: ArrayLike<number>, offset?: number): void
1989
+
1990
+ /**
1991
+ * Returns a section of an array.
1992
+ * @param start The beginning of the specified portion of the array.
1993
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
1994
+ */
1995
+ slice(start?: number, end?: number): Int8Array
1996
+
1997
+ /**
1998
+ * Determines whether the specified callback function returns true for any element of an array.
1999
+ * @param callbackfn A function that accepts up to three arguments. The some method calls
2000
+ * the callbackfn function for each element in the array until the callbackfn returns a value
2001
+ * which is coercible to the Boolean value true, or until the end of the array.
2002
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2003
+ * If thisArg is omitted, undefined is used as the this value.
2004
+ */
2005
+ some(callbackfn: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): boolean
2006
+
2007
+ /**
2008
+ * Sorts an array.
2009
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
2010
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
2011
+ * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
2012
+ * ```ts
2013
+ * [11,2,22,1].sort((a, b) => a - b)
2014
+ * ```
2015
+ */
2016
+ sort(compareFn?: (a: number, b: number) => number): this
2017
+
2018
+ /**
2019
+ * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements
2020
+ * at begin, inclusive, up to end, exclusive.
2021
+ * @param begin The index of the beginning of the array.
2022
+ * @param end The index of the end of the array.
2023
+ */
2024
+ subarray(begin?: number, end?: number): Int8Array
2025
+
2026
+ /**
2027
+ * Converts a number to a string by using the current locale.
2028
+ */
2029
+ toLocaleString(): string
2030
+
2031
+ /**
2032
+ * Returns a string representation of an array.
2033
+ */
2034
+ toString(): string
2035
+
2036
+ [index: number]: number
2037
+ }
2038
+ interface Int8ArrayConstructor {
2039
+ readonly prototype: Int8Array
2040
+ new (length: number): Int8Array
2041
+ new (arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Int8Array
2042
+ new (buffer: ArrayBufferLike, byteOffset: number, length?: number): Int8Array
2043
+
2044
+ /**
2045
+ * The size in bytes of each element in the array.
2046
+ */
2047
+ readonly BYTES_PER_ELEMENT: number
2048
+
2049
+ /**
2050
+ * Returns a new array from a set of elements.
2051
+ * @param items A set of elements to include in the new array object.
2052
+ */
2053
+ of(...items: number[]): Int8Array
2054
+
2055
+ /**
2056
+ * Creates an array from an array-like or iterable object.
2057
+ * @param arrayLike An array-like or iterable object to convert to an array.
2058
+ */
2059
+ from(arrayLike: ArrayLike<number>): Int8Array
2060
+
2061
+ /**
2062
+ * Creates an array from an array-like or iterable object.
2063
+ * @param arrayLike An array-like or iterable object to convert to an array.
2064
+ * @param mapfn A mapping function to call on every element of the array.
2065
+ * @param thisArg Value of 'this' used to invoke the mapfn.
2066
+ */
2067
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array
2068
+ }
2069
+ declare var Int8Array: Int8ArrayConstructor
2070
+
2071
+ /**
2072
+ * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
2073
+ * requested number of bytes could not be allocated an exception is raised.
2074
+ */
2075
+ interface Uint8Array {
2076
+ /**
2077
+ * The size in bytes of each element in the array.
2078
+ */
2079
+ readonly BYTES_PER_ELEMENT: number
2080
+
2081
+ /**
2082
+ * The ArrayBuffer instance referenced by the array.
2083
+ */
2084
+ readonly buffer: ArrayBufferLike
2085
+
2086
+ /**
2087
+ * The length in bytes of the array.
2088
+ */
2089
+ readonly byteLength: number
2090
+
2091
+ /**
2092
+ * The offset in bytes of the array.
2093
+ */
2094
+ readonly byteOffset: number
2095
+
2096
+ /**
2097
+ * Returns the this object after copying a section of the array identified by start and end
2098
+ * to the same array starting at position target
2099
+ * @param target If target is negative, it is treated as length+target where length is the
2100
+ * length of the array.
2101
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
2102
+ * is treated as length+end.
2103
+ * @param end If not specified, length of the this object is used as its default value.
2104
+ */
2105
+ copyWithin(target: number, start: number, end?: number): this
2106
+
2107
+ /**
2108
+ * Determines whether all the members of an array satisfy the specified test.
2109
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
2110
+ * the callbackfn function for each element in the array until the callbackfn returns a value
2111
+ * which is coercible to the Boolean value false, or until the end of the array.
2112
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2113
+ * If thisArg is omitted, undefined is used as the this value.
2114
+ */
2115
+ every(callbackfn: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): boolean
2116
+
2117
+ /**
2118
+ * Returns the this object after filling the section identified by start and end with value
2119
+ * @param value value to fill array section with
2120
+ * @param start index to start filling the array at. If start is negative, it is treated as
2121
+ * length+start where length is the length of the array.
2122
+ * @param end index to stop filling the array at. If end is negative, it is treated as
2123
+ * length+end.
2124
+ */
2125
+ fill(value: number, start?: number, end?: number): this
2126
+
2127
+ /**
2128
+ * Returns the elements of an array that meet the condition specified in a callback function.
2129
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
2130
+ * the callbackfn function one time for each element in the array.
2131
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2132
+ * If thisArg is omitted, undefined is used as the this value.
2133
+ */
2134
+ filter(callbackfn: (value: number, index: number, array: Uint8Array) => any, thisArg?: any): Uint8Array
2135
+
2136
+ /**
2137
+ * Returns the value of the first element in the array where predicate is true, and undefined
2138
+ * otherwise.
2139
+ * @param predicate find calls predicate once for each element of the array, in ascending
2140
+ * order, until it finds one where predicate returns true. If such an element is found, find
2141
+ * immediately returns that element value. Otherwise, find returns undefined.
2142
+ * @param thisArg If provided, it will be used as the this value for each invocation of
2143
+ * predicate. If it is not provided, undefined is used instead.
2144
+ */
2145
+ find(predicate: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number | undefined
2146
+
2147
+ /**
2148
+ * Returns the index of the first element in the array where predicate is true, and -1
2149
+ * otherwise.
2150
+ * @param predicate find calls predicate once for each element of the array, in ascending
2151
+ * order, until it finds one where predicate returns true. If such an element is found,
2152
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
2153
+ * @param thisArg If provided, it will be used as the this value for each invocation of
2154
+ * predicate. If it is not provided, undefined is used instead.
2155
+ */
2156
+ findIndex(predicate: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number
2157
+
2158
+ /**
2159
+ * Performs the specified action for each element in an array.
2160
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
2161
+ * callbackfn function one time for each element in the array.
2162
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2163
+ * If thisArg is omitted, undefined is used as the this value.
2164
+ */
2165
+ forEach(callbackfn: (value: number, index: number, array: Uint8Array) => void, thisArg?: any): void
2166
+
2167
+ /**
2168
+ * Returns the index of the first occurrence of a value in an array.
2169
+ * @param searchElement The value to locate in the array.
2170
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
2171
+ * search starts at index 0.
2172
+ */
2173
+ indexOf(searchElement: number, fromIndex?: number): number
2174
+
2175
+ /**
2176
+ * Adds all the elements of an array separated by the specified separator string.
2177
+ * @param separator A string used to separate one element of an array from the next in the
2178
+ * resulting String. If omitted, the array elements are separated with a comma.
2179
+ */
2180
+ join(separator?: string): string
2181
+
2182
+ /**
2183
+ * Returns the index of the last occurrence of a value in an array.
2184
+ * @param searchElement The value to locate in the array.
2185
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
2186
+ * search starts at index 0.
2187
+ */
2188
+ lastIndexOf(searchElement: number, fromIndex?: number): number
2189
+
2190
+ /**
2191
+ * The length of the array.
2192
+ */
2193
+ readonly length: number
2194
+
2195
+ /**
2196
+ * Calls a defined callback function on each element of an array, and returns an array that
2197
+ * contains the results.
2198
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
2199
+ * callbackfn function one time for each element in the array.
2200
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2201
+ * If thisArg is omitted, undefined is used as the this value.
2202
+ */
2203
+ map(callbackfn: (value: number, index: number, array: Uint8Array) => number, thisArg?: any): Uint8Array
2204
+
2205
+ /**
2206
+ * Calls the specified callback function for all the elements in an array. The return value of
2207
+ * the callback function is the accumulated result, and is provided as an argument in the next
2208
+ * call to the callback function.
2209
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
2210
+ * callbackfn function one time for each element in the array.
2211
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
2212
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
2213
+ * instead of an array value.
2214
+ */
2215
+ reduce(
2216
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number
2217
+ ): number
2218
+ reduce(
2219
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number,
2220
+ initialValue: number
2221
+ ): number
2222
+
2223
+ /**
2224
+ * Calls the specified callback function for all the elements in an array. The return value of
2225
+ * the callback function is the accumulated result, and is provided as an argument in the next
2226
+ * call to the callback function.
2227
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
2228
+ * callbackfn function one time for each element in the array.
2229
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
2230
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
2231
+ * instead of an array value.
2232
+ */
2233
+ reduce<U>(
2234
+ callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U,
2235
+ initialValue: U
2236
+ ): U
2237
+
2238
+ /**
2239
+ * Calls the specified callback function for all the elements in an array, in descending order.
2240
+ * The return value of the callback function is the accumulated result, and is provided as an
2241
+ * argument in the next call to the callback function.
2242
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
2243
+ * the callbackfn function one time for each element in the array.
2244
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
2245
+ * the accumulation. The first call to the callbackfn function provides this value as an
2246
+ * argument instead of an array value.
2247
+ */
2248
+ reduceRight(
2249
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number
2250
+ ): number
2251
+ reduceRight(
2252
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number,
2253
+ initialValue: number
2254
+ ): number
2255
+
2256
+ /**
2257
+ * Calls the specified callback function for all the elements in an array, in descending order.
2258
+ * The return value of the callback function is the accumulated result, and is provided as an
2259
+ * argument in the next call to the callback function.
2260
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
2261
+ * the callbackfn function one time for each element in the array.
2262
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
2263
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
2264
+ * instead of an array value.
2265
+ */
2266
+ reduceRight<U>(
2267
+ callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U,
2268
+ initialValue: U
2269
+ ): U
2270
+
2271
+ /**
2272
+ * Reverses the elements in an Array.
2273
+ */
2274
+ reverse(): Uint8Array
2275
+
2276
+ /**
2277
+ * Sets a value or an array of values.
2278
+ * @param array A typed or untyped array of values to set.
2279
+ * @param offset The index in the current array at which the values are to be written.
2280
+ */
2281
+ set(array: ArrayLike<number>, offset?: number): void
2282
+
2283
+ /**
2284
+ * Returns a section of an array.
2285
+ * @param start The beginning of the specified portion of the array.
2286
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
2287
+ */
2288
+ slice(start?: number, end?: number): Uint8Array
2289
+
2290
+ /**
2291
+ * Determines whether the specified callback function returns true for any element of an array.
2292
+ * @param callbackfn A function that accepts up to three arguments. The some method calls
2293
+ * the callbackfn function for each element in the array until the callbackfn returns a value
2294
+ * which is coercible to the Boolean value true, or until the end of the array.
2295
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2296
+ * If thisArg is omitted, undefined is used as the this value.
2297
+ */
2298
+ some(callbackfn: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): boolean
2299
+
2300
+ /**
2301
+ * Sorts an array.
2302
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
2303
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
2304
+ * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
2305
+ * ```ts
2306
+ * [11,2,22,1].sort((a, b) => a - b)
2307
+ * ```
2308
+ */
2309
+ sort(compareFn?: (a: number, b: number) => number): this
2310
+
2311
+ /**
2312
+ * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements
2313
+ * at begin, inclusive, up to end, exclusive.
2314
+ * @param begin The index of the beginning of the array.
2315
+ * @param end The index of the end of the array.
2316
+ */
2317
+ subarray(begin?: number, end?: number): Uint8Array
2318
+
2319
+ /**
2320
+ * Converts a number to a string by using the current locale.
2321
+ */
2322
+ toLocaleString(): string
2323
+
2324
+ /**
2325
+ * Returns a string representation of an array.
2326
+ */
2327
+ toString(): string
2328
+
2329
+ [index: number]: number
2330
+ }
2331
+
2332
+ interface Uint8ArrayConstructor {
2333
+ readonly prototype: Uint8Array
2334
+ new (length: number): Uint8Array
2335
+ new (arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Uint8Array
2336
+ new (buffer: ArrayBufferLike, byteOffset: number, length?: number): Uint8Array
2337
+
2338
+ /**
2339
+ * The size in bytes of each element in the array.
2340
+ */
2341
+ readonly BYTES_PER_ELEMENT: number
2342
+
2343
+ /**
2344
+ * Returns a new array from a set of elements.
2345
+ * @param items A set of elements to include in the new array object.
2346
+ */
2347
+ of(...items: number[]): Uint8Array
2348
+
2349
+ /**
2350
+ * Creates an array from an array-like or iterable object.
2351
+ * @param arrayLike An array-like or iterable object to convert to an array.
2352
+ */
2353
+ from(arrayLike: ArrayLike<number>): Uint8Array
2354
+
2355
+ /**
2356
+ * Creates an array from an array-like or iterable object.
2357
+ * @param arrayLike An array-like or iterable object to convert to an array.
2358
+ * @param mapfn A mapping function to call on every element of the array.
2359
+ * @param thisArg Value of 'this' used to invoke the mapfn.
2360
+ */
2361
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array
2362
+ }
2363
+ declare var Uint8Array: Uint8ArrayConstructor
2364
+
2365
+ /**
2366
+ * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
2367
+ * If the requested number of bytes could not be allocated an exception is raised.
2368
+ */
2369
+ interface Uint8ClampedArray {
2370
+ /**
2371
+ * The size in bytes of each element in the array.
2372
+ */
2373
+ readonly BYTES_PER_ELEMENT: number
2374
+
2375
+ /**
2376
+ * The ArrayBuffer instance referenced by the array.
2377
+ */
2378
+ readonly buffer: ArrayBufferLike
2379
+
2380
+ /**
2381
+ * The length in bytes of the array.
2382
+ */
2383
+ readonly byteLength: number
2384
+
2385
+ /**
2386
+ * The offset in bytes of the array.
2387
+ */
2388
+ readonly byteOffset: number
2389
+
2390
+ /**
2391
+ * Returns the this object after copying a section of the array identified by start and end
2392
+ * to the same array starting at position target
2393
+ * @param target If target is negative, it is treated as length+target where length is the
2394
+ * length of the array.
2395
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
2396
+ * is treated as length+end.
2397
+ * @param end If not specified, length of the this object is used as its default value.
2398
+ */
2399
+ copyWithin(target: number, start: number, end?: number): this
2400
+
2401
+ /**
2402
+ * Determines whether all the members of an array satisfy the specified test.
2403
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
2404
+ * the callbackfn function for each element in the array until the callbackfn returns a value
2405
+ * which is coercible to the Boolean value false, or until the end of the array.
2406
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2407
+ * If thisArg is omitted, undefined is used as the this value.
2408
+ */
2409
+ every(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): boolean
2410
+
2411
+ /**
2412
+ * Returns the this object after filling the section identified by start and end with value
2413
+ * @param value value to fill array section with
2414
+ * @param start index to start filling the array at. If start is negative, it is treated as
2415
+ * length+start where length is the length of the array.
2416
+ * @param end index to stop filling the array at. If end is negative, it is treated as
2417
+ * length+end.
2418
+ */
2419
+ fill(value: number, start?: number, end?: number): this
2420
+
2421
+ /**
2422
+ * Returns the elements of an array that meet the condition specified in a callback function.
2423
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
2424
+ * the callbackfn function one time for each element in the array.
2425
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2426
+ * If thisArg is omitted, undefined is used as the this value.
2427
+ */
2428
+ filter(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => any, thisArg?: any): Uint8ClampedArray
2429
+
2430
+ /**
2431
+ * Returns the value of the first element in the array where predicate is true, and undefined
2432
+ * otherwise.
2433
+ * @param predicate find calls predicate once for each element of the array, in ascending
2434
+ * order, until it finds one where predicate returns true. If such an element is found, find
2435
+ * immediately returns that element value. Otherwise, find returns undefined.
2436
+ * @param thisArg If provided, it will be used as the this value for each invocation of
2437
+ * predicate. If it is not provided, undefined is used instead.
2438
+ */
2439
+ find(predicate: (value: number, index: number, obj: Uint8ClampedArray) => boolean, thisArg?: any): number | undefined
2440
+
2441
+ /**
2442
+ * Returns the index of the first element in the array where predicate is true, and -1
2443
+ * otherwise.
2444
+ * @param predicate find calls predicate once for each element of the array, in ascending
2445
+ * order, until it finds one where predicate returns true. If such an element is found,
2446
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
2447
+ * @param thisArg If provided, it will be used as the this value for each invocation of
2448
+ * predicate. If it is not provided, undefined is used instead.
2449
+ */
2450
+ findIndex(predicate: (value: number, index: number, obj: Uint8ClampedArray) => boolean, thisArg?: any): number
2451
+
2452
+ /**
2453
+ * Performs the specified action for each element in an array.
2454
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
2455
+ * callbackfn function one time for each element in the array.
2456
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2457
+ * If thisArg is omitted, undefined is used as the this value.
2458
+ */
2459
+ forEach(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => void, thisArg?: any): void
2460
+
2461
+ /**
2462
+ * Returns the index of the first occurrence of a value in an array.
2463
+ * @param searchElement The value to locate in the array.
2464
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
2465
+ * search starts at index 0.
2466
+ */
2467
+ indexOf(searchElement: number, fromIndex?: number): number
2468
+
2469
+ /**
2470
+ * Adds all the elements of an array separated by the specified separator string.
2471
+ * @param separator A string used to separate one element of an array from the next in the
2472
+ * resulting String. If omitted, the array elements are separated with a comma.
2473
+ */
2474
+ join(separator?: string): string
2475
+
2476
+ /**
2477
+ * Returns the index of the last occurrence of a value in an array.
2478
+ * @param searchElement The value to locate in the array.
2479
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
2480
+ * search starts at index 0.
2481
+ */
2482
+ lastIndexOf(searchElement: number, fromIndex?: number): number
2483
+
2484
+ /**
2485
+ * The length of the array.
2486
+ */
2487
+ readonly length: number
2488
+
2489
+ /**
2490
+ * Calls a defined callback function on each element of an array, and returns an array that
2491
+ * contains the results.
2492
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
2493
+ * callbackfn function one time for each element in the array.
2494
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2495
+ * If thisArg is omitted, undefined is used as the this value.
2496
+ */
2497
+ map(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => number, thisArg?: any): Uint8ClampedArray
2498
+
2499
+ /**
2500
+ * Calls the specified callback function for all the elements in an array. The return value of
2501
+ * the callback function is the accumulated result, and is provided as an argument in the next
2502
+ * call to the callback function.
2503
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
2504
+ * callbackfn function one time for each element in the array.
2505
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
2506
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
2507
+ * instead of an array value.
2508
+ */
2509
+ reduce(
2510
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number
2511
+ ): number
2512
+ reduce(
2513
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number,
2514
+ initialValue: number
2515
+ ): number
2516
+
2517
+ /**
2518
+ * Calls the specified callback function for all the elements in an array. The return value of
2519
+ * the callback function is the accumulated result, and is provided as an argument in the next
2520
+ * call to the callback function.
2521
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
2522
+ * callbackfn function one time for each element in the array.
2523
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
2524
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
2525
+ * instead of an array value.
2526
+ */
2527
+ reduce<U>(
2528
+ callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U,
2529
+ initialValue: U
2530
+ ): U
2531
+
2532
+ /**
2533
+ * Calls the specified callback function for all the elements in an array, in descending order.
2534
+ * The return value of the callback function is the accumulated result, and is provided as an
2535
+ * argument in the next call to the callback function.
2536
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
2537
+ * the callbackfn function one time for each element in the array.
2538
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
2539
+ * the accumulation. The first call to the callbackfn function provides this value as an
2540
+ * argument instead of an array value.
2541
+ */
2542
+ reduceRight(
2543
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number
2544
+ ): number
2545
+ reduceRight(
2546
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number,
2547
+ initialValue: number
2548
+ ): number
2549
+
2550
+ /**
2551
+ * Calls the specified callback function for all the elements in an array, in descending order.
2552
+ * The return value of the callback function is the accumulated result, and is provided as an
2553
+ * argument in the next call to the callback function.
2554
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
2555
+ * the callbackfn function one time for each element in the array.
2556
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
2557
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
2558
+ * instead of an array value.
2559
+ */
2560
+ reduceRight<U>(
2561
+ callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U,
2562
+ initialValue: U
2563
+ ): U
2564
+
2565
+ /**
2566
+ * Reverses the elements in an Array.
2567
+ */
2568
+ reverse(): Uint8ClampedArray
2569
+
2570
+ /**
2571
+ * Sets a value or an array of values.
2572
+ * @param array A typed or untyped array of values to set.
2573
+ * @param offset The index in the current array at which the values are to be written.
2574
+ */
2575
+ set(array: ArrayLike<number>, offset?: number): void
2576
+
2577
+ /**
2578
+ * Returns a section of an array.
2579
+ * @param start The beginning of the specified portion of the array.
2580
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
2581
+ */
2582
+ slice(start?: number, end?: number): Uint8ClampedArray
2583
+
2584
+ /**
2585
+ * Determines whether the specified callback function returns true for any element of an array.
2586
+ * @param callbackfn A function that accepts up to three arguments. The some method calls
2587
+ * the callbackfn function for each element in the array until the callbackfn returns a value
2588
+ * which is coercible to the Boolean value true, or until the end of the array.
2589
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2590
+ * If thisArg is omitted, undefined is used as the this value.
2591
+ */
2592
+ some(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): boolean
2593
+
2594
+ /**
2595
+ * Sorts an array.
2596
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
2597
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
2598
+ * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
2599
+ * ```ts
2600
+ * [11,2,22,1].sort((a, b) => a - b)
2601
+ * ```
2602
+ */
2603
+ sort(compareFn?: (a: number, b: number) => number): this
2604
+
2605
+ /**
2606
+ * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements
2607
+ * at begin, inclusive, up to end, exclusive.
2608
+ * @param begin The index of the beginning of the array.
2609
+ * @param end The index of the end of the array.
2610
+ */
2611
+ subarray(begin?: number, end?: number): Uint8ClampedArray
2612
+
2613
+ /**
2614
+ * Converts a number to a string by using the current locale.
2615
+ */
2616
+ toLocaleString(): string
2617
+
2618
+ /**
2619
+ * Returns a string representation of an array.
2620
+ */
2621
+ toString(): string
2622
+
2623
+ [index: number]: number
2624
+ }
2625
+
2626
+ interface Uint8ClampedArrayConstructor {
2627
+ readonly prototype: Uint8ClampedArray
2628
+ new (length: number): Uint8ClampedArray
2629
+ new (arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Uint8ClampedArray
2630
+ new (buffer: ArrayBufferLike, byteOffset: number, length?: number): Uint8ClampedArray
2631
+
2632
+ /**
2633
+ * The size in bytes of each element in the array.
2634
+ */
2635
+ readonly BYTES_PER_ELEMENT: number
2636
+
2637
+ /**
2638
+ * Returns a new array from a set of elements.
2639
+ * @param items A set of elements to include in the new array object.
2640
+ */
2641
+ of(...items: number[]): Uint8ClampedArray
2642
+
2643
+ /**
2644
+ * Creates an array from an array-like or iterable object.
2645
+ * @param arrayLike An array-like or iterable object to convert to an array.
2646
+ */
2647
+ from(arrayLike: ArrayLike<number>): Uint8ClampedArray
2648
+
2649
+ /**
2650
+ * Creates an array from an array-like or iterable object.
2651
+ * @param arrayLike An array-like or iterable object to convert to an array.
2652
+ * @param mapfn A mapping function to call on every element of the array.
2653
+ * @param thisArg Value of 'this' used to invoke the mapfn.
2654
+ */
2655
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray
2656
+ }
2657
+ declare var Uint8ClampedArray: Uint8ClampedArrayConstructor
2658
+
2659
+ /**
2660
+ * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
2661
+ * requested number of bytes could not be allocated an exception is raised.
2662
+ */
2663
+ interface Int16Array {
2664
+ /**
2665
+ * The size in bytes of each element in the array.
2666
+ */
2667
+ readonly BYTES_PER_ELEMENT: number
2668
+
2669
+ /**
2670
+ * The ArrayBuffer instance referenced by the array.
2671
+ */
2672
+ readonly buffer: ArrayBufferLike
2673
+
2674
+ /**
2675
+ * The length in bytes of the array.
2676
+ */
2677
+ readonly byteLength: number
2678
+
2679
+ /**
2680
+ * The offset in bytes of the array.
2681
+ */
2682
+ readonly byteOffset: number
2683
+
2684
+ /**
2685
+ * Returns the this object after copying a section of the array identified by start and end
2686
+ * to the same array starting at position target
2687
+ * @param target If target is negative, it is treated as length+target where length is the
2688
+ * length of the array.
2689
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
2690
+ * is treated as length+end.
2691
+ * @param end If not specified, length of the this object is used as its default value.
2692
+ */
2693
+ copyWithin(target: number, start: number, end?: number): this
2694
+
2695
+ /**
2696
+ * Determines whether all the members of an array satisfy the specified test.
2697
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
2698
+ * the callbackfn function for each element in the array until the callbackfn returns a value
2699
+ * which is coercible to the Boolean value false, or until the end of the array.
2700
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2701
+ * If thisArg is omitted, undefined is used as the this value.
2702
+ */
2703
+ every(callbackfn: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): boolean
2704
+
2705
+ /**
2706
+ * Returns the this object after filling the section identified by start and end with value
2707
+ * @param value value to fill array section with
2708
+ * @param start index to start filling the array at. If start is negative, it is treated as
2709
+ * length+start where length is the length of the array.
2710
+ * @param end index to stop filling the array at. If end is negative, it is treated as
2711
+ * length+end.
2712
+ */
2713
+ fill(value: number, start?: number, end?: number): this
2714
+
2715
+ /**
2716
+ * Returns the elements of an array that meet the condition specified in a callback function.
2717
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
2718
+ * the callbackfn function one time for each element in the array.
2719
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2720
+ * If thisArg is omitted, undefined is used as the this value.
2721
+ */
2722
+ filter(callbackfn: (value: number, index: number, array: Int16Array) => any, thisArg?: any): Int16Array
2723
+
2724
+ /**
2725
+ * Returns the value of the first element in the array where predicate is true, and undefined
2726
+ * otherwise.
2727
+ * @param predicate find calls predicate once for each element of the array, in ascending
2728
+ * order, until it finds one where predicate returns true. If such an element is found, find
2729
+ * immediately returns that element value. Otherwise, find returns undefined.
2730
+ * @param thisArg If provided, it will be used as the this value for each invocation of
2731
+ * predicate. If it is not provided, undefined is used instead.
2732
+ */
2733
+ find(predicate: (value: number, index: number, obj: Int16Array) => boolean, thisArg?: any): number | undefined
2734
+
2735
+ /**
2736
+ * Returns the index of the first element in the array where predicate is true, and -1
2737
+ * otherwise.
2738
+ * @param predicate find calls predicate once for each element of the array, in ascending
2739
+ * order, until it finds one where predicate returns true. If such an element is found,
2740
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
2741
+ * @param thisArg If provided, it will be used as the this value for each invocation of
2742
+ * predicate. If it is not provided, undefined is used instead.
2743
+ */
2744
+ findIndex(predicate: (value: number, index: number, obj: Int16Array) => boolean, thisArg?: any): number
2745
+
2746
+ /**
2747
+ * Performs the specified action for each element in an array.
2748
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
2749
+ * callbackfn function one time for each element in the array.
2750
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2751
+ * If thisArg is omitted, undefined is used as the this value.
2752
+ */
2753
+ forEach(callbackfn: (value: number, index: number, array: Int16Array) => void, thisArg?: any): void
2754
+ /**
2755
+ * Returns the index of the first occurrence of a value in an array.
2756
+ * @param searchElement The value to locate in the array.
2757
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
2758
+ * search starts at index 0.
2759
+ */
2760
+ indexOf(searchElement: number, fromIndex?: number): number
2761
+
2762
+ /**
2763
+ * Adds all the elements of an array separated by the specified separator string.
2764
+ * @param separator A string used to separate one element of an array from the next in the
2765
+ * resulting String. If omitted, the array elements are separated with a comma.
2766
+ */
2767
+ join(separator?: string): string
2768
+
2769
+ /**
2770
+ * Returns the index of the last occurrence of a value in an array.
2771
+ * @param searchElement The value to locate in the array.
2772
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
2773
+ * search starts at index 0.
2774
+ */
2775
+ lastIndexOf(searchElement: number, fromIndex?: number): number
2776
+
2777
+ /**
2778
+ * The length of the array.
2779
+ */
2780
+ readonly length: number
2781
+
2782
+ /**
2783
+ * Calls a defined callback function on each element of an array, and returns an array that
2784
+ * contains the results.
2785
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
2786
+ * callbackfn function one time for each element in the array.
2787
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2788
+ * If thisArg is omitted, undefined is used as the this value.
2789
+ */
2790
+ map(callbackfn: (value: number, index: number, array: Int16Array) => number, thisArg?: any): Int16Array
2791
+
2792
+ /**
2793
+ * Calls the specified callback function for all the elements in an array. The return value of
2794
+ * the callback function is the accumulated result, and is provided as an argument in the next
2795
+ * call to the callback function.
2796
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
2797
+ * callbackfn function one time for each element in the array.
2798
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
2799
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
2800
+ * instead of an array value.
2801
+ */
2802
+ reduce(
2803
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number
2804
+ ): number
2805
+ reduce(
2806
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number,
2807
+ initialValue: number
2808
+ ): number
2809
+
2810
+ /**
2811
+ * Calls the specified callback function for all the elements in an array. The return value of
2812
+ * the callback function is the accumulated result, and is provided as an argument in the next
2813
+ * call to the callback function.
2814
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
2815
+ * callbackfn function one time for each element in the array.
2816
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
2817
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
2818
+ * instead of an array value.
2819
+ */
2820
+ reduce<U>(
2821
+ callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U,
2822
+ initialValue: U
2823
+ ): U
2824
+
2825
+ /**
2826
+ * Calls the specified callback function for all the elements in an array, in descending order.
2827
+ * The return value of the callback function is the accumulated result, and is provided as an
2828
+ * argument in the next call to the callback function.
2829
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
2830
+ * the callbackfn function one time for each element in the array.
2831
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
2832
+ * the accumulation. The first call to the callbackfn function provides this value as an
2833
+ * argument instead of an array value.
2834
+ */
2835
+ reduceRight(
2836
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number
2837
+ ): number
2838
+ reduceRight(
2839
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number,
2840
+ initialValue: number
2841
+ ): number
2842
+
2843
+ /**
2844
+ * Calls the specified callback function for all the elements in an array, in descending order.
2845
+ * The return value of the callback function is the accumulated result, and is provided as an
2846
+ * argument in the next call to the callback function.
2847
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
2848
+ * the callbackfn function one time for each element in the array.
2849
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
2850
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
2851
+ * instead of an array value.
2852
+ */
2853
+ reduceRight<U>(
2854
+ callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U,
2855
+ initialValue: U
2856
+ ): U
2857
+
2858
+ /**
2859
+ * Reverses the elements in an Array.
2860
+ */
2861
+ reverse(): Int16Array
2862
+
2863
+ /**
2864
+ * Sets a value or an array of values.
2865
+ * @param array A typed or untyped array of values to set.
2866
+ * @param offset The index in the current array at which the values are to be written.
2867
+ */
2868
+ set(array: ArrayLike<number>, offset?: number): void
2869
+
2870
+ /**
2871
+ * Returns a section of an array.
2872
+ * @param start The beginning of the specified portion of the array.
2873
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
2874
+ */
2875
+ slice(start?: number, end?: number): Int16Array
2876
+
2877
+ /**
2878
+ * Determines whether the specified callback function returns true for any element of an array.
2879
+ * @param callbackfn A function that accepts up to three arguments. The some method calls
2880
+ * the callbackfn function for each element in the array until the callbackfn returns a value
2881
+ * which is coercible to the Boolean value true, or until the end of the array.
2882
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2883
+ * If thisArg is omitted, undefined is used as the this value.
2884
+ */
2885
+ some(callbackfn: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): boolean
2886
+
2887
+ /**
2888
+ * Sorts an array.
2889
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
2890
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
2891
+ * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
2892
+ * ```ts
2893
+ * [11,2,22,1].sort((a, b) => a - b)
2894
+ * ```
2895
+ */
2896
+ sort(compareFn?: (a: number, b: number) => number): this
2897
+
2898
+ /**
2899
+ * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements
2900
+ * at begin, inclusive, up to end, exclusive.
2901
+ * @param begin The index of the beginning of the array.
2902
+ * @param end The index of the end of the array.
2903
+ */
2904
+ subarray(begin?: number, end?: number): Int16Array
2905
+
2906
+ /**
2907
+ * Converts a number to a string by using the current locale.
2908
+ */
2909
+ toLocaleString(): string
2910
+
2911
+ /**
2912
+ * Returns a string representation of an array.
2913
+ */
2914
+ toString(): string
2915
+
2916
+ [index: number]: number
2917
+ }
2918
+
2919
+ interface Int16ArrayConstructor {
2920
+ readonly prototype: Int16Array
2921
+ new (length: number): Int16Array
2922
+ new (arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Int16Array
2923
+ new (buffer: ArrayBufferLike, byteOffset: number, length?: number): Int16Array
2924
+
2925
+ /**
2926
+ * The size in bytes of each element in the array.
2927
+ */
2928
+ readonly BYTES_PER_ELEMENT: number
2929
+
2930
+ /**
2931
+ * Returns a new array from a set of elements.
2932
+ * @param items A set of elements to include in the new array object.
2933
+ */
2934
+ of(...items: number[]): Int16Array
2935
+
2936
+ /**
2937
+ * Creates an array from an array-like or iterable object.
2938
+ * @param arrayLike An array-like or iterable object to convert to an array.
2939
+ */
2940
+ from(arrayLike: ArrayLike<number>): Int16Array
2941
+
2942
+ /**
2943
+ * Creates an array from an array-like or iterable object.
2944
+ * @param arrayLike An array-like or iterable object to convert to an array.
2945
+ * @param mapfn A mapping function to call on every element of the array.
2946
+ * @param thisArg Value of 'this' used to invoke the mapfn.
2947
+ */
2948
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array
2949
+ }
2950
+ declare var Int16Array: Int16ArrayConstructor
2951
+
2952
+ /**
2953
+ * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
2954
+ * requested number of bytes could not be allocated an exception is raised.
2955
+ */
2956
+ interface Uint16Array {
2957
+ /**
2958
+ * The size in bytes of each element in the array.
2959
+ */
2960
+ readonly BYTES_PER_ELEMENT: number
2961
+
2962
+ /**
2963
+ * The ArrayBuffer instance referenced by the array.
2964
+ */
2965
+ readonly buffer: ArrayBufferLike
2966
+
2967
+ /**
2968
+ * The length in bytes of the array.
2969
+ */
2970
+ readonly byteLength: number
2971
+
2972
+ /**
2973
+ * The offset in bytes of the array.
2974
+ */
2975
+ readonly byteOffset: number
2976
+
2977
+ /**
2978
+ * Returns the this object after copying a section of the array identified by start and end
2979
+ * to the same array starting at position target
2980
+ * @param target If target is negative, it is treated as length+target where length is the
2981
+ * length of the array.
2982
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
2983
+ * is treated as length+end.
2984
+ * @param end If not specified, length of the this object is used as its default value.
2985
+ */
2986
+ copyWithin(target: number, start: number, end?: number): this
2987
+
2988
+ /**
2989
+ * Determines whether all the members of an array satisfy the specified test.
2990
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
2991
+ * the callbackfn function for each element in the array until the callbackfn returns a value
2992
+ * which is coercible to the Boolean value false, or until the end of the array.
2993
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2994
+ * If thisArg is omitted, undefined is used as the this value.
2995
+ */
2996
+ every(callbackfn: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): boolean
2997
+
2998
+ /**
2999
+ * Returns the this object after filling the section identified by start and end with value
3000
+ * @param value value to fill array section with
3001
+ * @param start index to start filling the array at. If start is negative, it is treated as
3002
+ * length+start where length is the length of the array.
3003
+ * @param end index to stop filling the array at. If end is negative, it is treated as
3004
+ * length+end.
3005
+ */
3006
+ fill(value: number, start?: number, end?: number): this
3007
+
3008
+ /**
3009
+ * Returns the elements of an array that meet the condition specified in a callback function.
3010
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
3011
+ * the callbackfn function one time for each element in the array.
3012
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3013
+ * If thisArg is omitted, undefined is used as the this value.
3014
+ */
3015
+ filter(callbackfn: (value: number, index: number, array: Uint16Array) => any, thisArg?: any): Uint16Array
3016
+
3017
+ /**
3018
+ * Returns the value of the first element in the array where predicate is true, and undefined
3019
+ * otherwise.
3020
+ * @param predicate find calls predicate once for each element of the array, in ascending
3021
+ * order, until it finds one where predicate returns true. If such an element is found, find
3022
+ * immediately returns that element value. Otherwise, find returns undefined.
3023
+ * @param thisArg If provided, it will be used as the this value for each invocation of
3024
+ * predicate. If it is not provided, undefined is used instead.
3025
+ */
3026
+ find(predicate: (value: number, index: number, obj: Uint16Array) => boolean, thisArg?: any): number | undefined
3027
+
3028
+ /**
3029
+ * Returns the index of the first element in the array where predicate is true, and -1
3030
+ * otherwise.
3031
+ * @param predicate find calls predicate once for each element of the array, in ascending
3032
+ * order, until it finds one where predicate returns true. If such an element is found,
3033
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
3034
+ * @param thisArg If provided, it will be used as the this value for each invocation of
3035
+ * predicate. If it is not provided, undefined is used instead.
3036
+ */
3037
+ findIndex(predicate: (value: number, index: number, obj: Uint16Array) => boolean, thisArg?: any): number
3038
+
3039
+ /**
3040
+ * Performs the specified action for each element in an array.
3041
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
3042
+ * callbackfn function one time for each element in the array.
3043
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3044
+ * If thisArg is omitted, undefined is used as the this value.
3045
+ */
3046
+ forEach(callbackfn: (value: number, index: number, array: Uint16Array) => void, thisArg?: any): void
3047
+
3048
+ /**
3049
+ * Returns the index of the first occurrence of a value in an array.
3050
+ * @param searchElement The value to locate in the array.
3051
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3052
+ * search starts at index 0.
3053
+ */
3054
+ indexOf(searchElement: number, fromIndex?: number): number
3055
+
3056
+ /**
3057
+ * Adds all the elements of an array separated by the specified separator string.
3058
+ * @param separator A string used to separate one element of an array from the next in the
3059
+ * resulting String. If omitted, the array elements are separated with a comma.
3060
+ */
3061
+ join(separator?: string): string
3062
+
3063
+ /**
3064
+ * Returns the index of the last occurrence of a value in an array.
3065
+ * @param searchElement The value to locate in the array.
3066
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3067
+ * search starts at index 0.
3068
+ */
3069
+ lastIndexOf(searchElement: number, fromIndex?: number): number
3070
+
3071
+ /**
3072
+ * The length of the array.
3073
+ */
3074
+ readonly length: number
3075
+
3076
+ /**
3077
+ * Calls a defined callback function on each element of an array, and returns an array that
3078
+ * contains the results.
3079
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
3080
+ * callbackfn function one time for each element in the array.
3081
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3082
+ * If thisArg is omitted, undefined is used as the this value.
3083
+ */
3084
+ map(callbackfn: (value: number, index: number, array: Uint16Array) => number, thisArg?: any): Uint16Array
3085
+
3086
+ /**
3087
+ * Calls the specified callback function for all the elements in an array. The return value of
3088
+ * the callback function is the accumulated result, and is provided as an argument in the next
3089
+ * call to the callback function.
3090
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
3091
+ * callbackfn function one time for each element in the array.
3092
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3093
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
3094
+ * instead of an array value.
3095
+ */
3096
+ reduce(
3097
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number
3098
+ ): number
3099
+ reduce(
3100
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number,
3101
+ initialValue: number
3102
+ ): number
3103
+
3104
+ /**
3105
+ * Calls the specified callback function for all the elements in an array. The return value of
3106
+ * the callback function is the accumulated result, and is provided as an argument in the next
3107
+ * call to the callback function.
3108
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
3109
+ * callbackfn function one time for each element in the array.
3110
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3111
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
3112
+ * instead of an array value.
3113
+ */
3114
+ reduce<U>(
3115
+ callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U,
3116
+ initialValue: U
3117
+ ): U
3118
+
3119
+ /**
3120
+ * Calls the specified callback function for all the elements in an array, in descending order.
3121
+ * The return value of the callback function is the accumulated result, and is provided as an
3122
+ * argument in the next call to the callback function.
3123
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
3124
+ * the callbackfn function one time for each element in the array.
3125
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3126
+ * the accumulation. The first call to the callbackfn function provides this value as an
3127
+ * argument instead of an array value.
3128
+ */
3129
+ reduceRight(
3130
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number
3131
+ ): number
3132
+ reduceRight(
3133
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number,
3134
+ initialValue: number
3135
+ ): number
3136
+
3137
+ /**
3138
+ * Calls the specified callback function for all the elements in an array, in descending order.
3139
+ * The return value of the callback function is the accumulated result, and is provided as an
3140
+ * argument in the next call to the callback function.
3141
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
3142
+ * the callbackfn function one time for each element in the array.
3143
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3144
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
3145
+ * instead of an array value.
3146
+ */
3147
+ reduceRight<U>(
3148
+ callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U,
3149
+ initialValue: U
3150
+ ): U
3151
+
3152
+ /**
3153
+ * Reverses the elements in an Array.
3154
+ */
3155
+ reverse(): Uint16Array
3156
+
3157
+ /**
3158
+ * Sets a value or an array of values.
3159
+ * @param array A typed or untyped array of values to set.
3160
+ * @param offset The index in the current array at which the values are to be written.
3161
+ */
3162
+ set(array: ArrayLike<number>, offset?: number): void
3163
+
3164
+ /**
3165
+ * Returns a section of an array.
3166
+ * @param start The beginning of the specified portion of the array.
3167
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
3168
+ */
3169
+ slice(start?: number, end?: number): Uint16Array
3170
+
3171
+ /**
3172
+ * Determines whether the specified callback function returns true for any element of an array.
3173
+ * @param callbackfn A function that accepts up to three arguments. The some method calls
3174
+ * the callbackfn function for each element in the array until the callbackfn returns a value
3175
+ * which is coercible to the Boolean value true, or until the end of the array.
3176
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3177
+ * If thisArg is omitted, undefined is used as the this value.
3178
+ */
3179
+ some(callbackfn: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): boolean
3180
+
3181
+ /**
3182
+ * Sorts an array.
3183
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
3184
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
3185
+ * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
3186
+ * ```ts
3187
+ * [11,2,22,1].sort((a, b) => a - b)
3188
+ * ```
3189
+ */
3190
+ sort(compareFn?: (a: number, b: number) => number): this
3191
+
3192
+ /**
3193
+ * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements
3194
+ * at begin, inclusive, up to end, exclusive.
3195
+ * @param begin The index of the beginning of the array.
3196
+ * @param end The index of the end of the array.
3197
+ */
3198
+ subarray(begin?: number, end?: number): Uint16Array
3199
+
3200
+ /**
3201
+ * Converts a number to a string by using the current locale.
3202
+ */
3203
+ toLocaleString(): string
3204
+
3205
+ /**
3206
+ * Returns a string representation of an array.
3207
+ */
3208
+ toString(): string
3209
+
3210
+ [index: number]: number
3211
+ }
3212
+
3213
+ interface Uint16ArrayConstructor {
3214
+ readonly prototype: Uint16Array
3215
+ new (length: number): Uint16Array
3216
+ new (arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Uint16Array
3217
+ new (buffer: ArrayBufferLike, byteOffset: number, length?: number): Uint16Array
3218
+
3219
+ /**
3220
+ * The size in bytes of each element in the array.
3221
+ */
3222
+ readonly BYTES_PER_ELEMENT: number
3223
+
3224
+ /**
3225
+ * Returns a new array from a set of elements.
3226
+ * @param items A set of elements to include in the new array object.
3227
+ */
3228
+ of(...items: number[]): Uint16Array
3229
+
3230
+ /**
3231
+ * Creates an array from an array-like or iterable object.
3232
+ * @param arrayLike An array-like or iterable object to convert to an array.
3233
+ */
3234
+ from(arrayLike: ArrayLike<number>): Uint16Array
3235
+
3236
+ /**
3237
+ * Creates an array from an array-like or iterable object.
3238
+ * @param arrayLike An array-like or iterable object to convert to an array.
3239
+ * @param mapfn A mapping function to call on every element of the array.
3240
+ * @param thisArg Value of 'this' used to invoke the mapfn.
3241
+ */
3242
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array
3243
+ }
3244
+ declare var Uint16Array: Uint16ArrayConstructor
3245
+ /**
3246
+ * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
3247
+ * requested number of bytes could not be allocated an exception is raised.
3248
+ */
3249
+ interface Int32Array {
3250
+ /**
3251
+ * The size in bytes of each element in the array.
3252
+ */
3253
+ readonly BYTES_PER_ELEMENT: number
3254
+
3255
+ /**
3256
+ * The ArrayBuffer instance referenced by the array.
3257
+ */
3258
+ readonly buffer: ArrayBufferLike
3259
+
3260
+ /**
3261
+ * The length in bytes of the array.
3262
+ */
3263
+ readonly byteLength: number
3264
+
3265
+ /**
3266
+ * The offset in bytes of the array.
3267
+ */
3268
+ readonly byteOffset: number
3269
+
3270
+ /**
3271
+ * Returns the this object after copying a section of the array identified by start and end
3272
+ * to the same array starting at position target
3273
+ * @param target If target is negative, it is treated as length+target where length is the
3274
+ * length of the array.
3275
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
3276
+ * is treated as length+end.
3277
+ * @param end If not specified, length of the this object is used as its default value.
3278
+ */
3279
+ copyWithin(target: number, start: number, end?: number): this
3280
+
3281
+ /**
3282
+ * Determines whether all the members of an array satisfy the specified test.
3283
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
3284
+ * the callbackfn function for each element in the array until the callbackfn returns a value
3285
+ * which is coercible to the Boolean value false, or until the end of the array.
3286
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3287
+ * If thisArg is omitted, undefined is used as the this value.
3288
+ */
3289
+ every(callbackfn: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): boolean
3290
+
3291
+ /**
3292
+ * Returns the this object after filling the section identified by start and end with value
3293
+ * @param value value to fill array section with
3294
+ * @param start index to start filling the array at. If start is negative, it is treated as
3295
+ * length+start where length is the length of the array.
3296
+ * @param end index to stop filling the array at. If end is negative, it is treated as
3297
+ * length+end.
3298
+ */
3299
+ fill(value: number, start?: number, end?: number): this
3300
+
3301
+ /**
3302
+ * Returns the elements of an array that meet the condition specified in a callback function.
3303
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
3304
+ * the callbackfn function one time for each element in the array.
3305
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3306
+ * If thisArg is omitted, undefined is used as the this value.
3307
+ */
3308
+ filter(callbackfn: (value: number, index: number, array: Int32Array) => any, thisArg?: any): Int32Array
3309
+
3310
+ /**
3311
+ * Returns the value of the first element in the array where predicate is true, and undefined
3312
+ * otherwise.
3313
+ * @param predicate find calls predicate once for each element of the array, in ascending
3314
+ * order, until it finds one where predicate returns true. If such an element is found, find
3315
+ * immediately returns that element value. Otherwise, find returns undefined.
3316
+ * @param thisArg If provided, it will be used as the this value for each invocation of
3317
+ * predicate. If it is not provided, undefined is used instead.
3318
+ */
3319
+ find(predicate: (value: number, index: number, obj: Int32Array) => boolean, thisArg?: any): number | undefined
3320
+
3321
+ /**
3322
+ * Returns the index of the first element in the array where predicate is true, and -1
3323
+ * otherwise.
3324
+ * @param predicate find calls predicate once for each element of the array, in ascending
3325
+ * order, until it finds one where predicate returns true. If such an element is found,
3326
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
3327
+ * @param thisArg If provided, it will be used as the this value for each invocation of
3328
+ * predicate. If it is not provided, undefined is used instead.
3329
+ */
3330
+ findIndex(predicate: (value: number, index: number, obj: Int32Array) => boolean, thisArg?: any): number
3331
+
3332
+ /**
3333
+ * Performs the specified action for each element in an array.
3334
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
3335
+ * callbackfn function one time for each element in the array.
3336
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3337
+ * If thisArg is omitted, undefined is used as the this value.
3338
+ */
3339
+ forEach(callbackfn: (value: number, index: number, array: Int32Array) => void, thisArg?: any): void
3340
+
3341
+ /**
3342
+ * Returns the index of the first occurrence of a value in an array.
3343
+ * @param searchElement The value to locate in the array.
3344
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3345
+ * search starts at index 0.
3346
+ */
3347
+ indexOf(searchElement: number, fromIndex?: number): number
3348
+
3349
+ /**
3350
+ * Adds all the elements of an array separated by the specified separator string.
3351
+ * @param separator A string used to separate one element of an array from the next in the
3352
+ * resulting String. If omitted, the array elements are separated with a comma.
3353
+ */
3354
+ join(separator?: string): string
3355
+
3356
+ /**
3357
+ * Returns the index of the last occurrence of a value in an array.
3358
+ * @param searchElement The value to locate in the array.
3359
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3360
+ * search starts at index 0.
3361
+ */
3362
+ lastIndexOf(searchElement: number, fromIndex?: number): number
3363
+
3364
+ /**
3365
+ * The length of the array.
3366
+ */
3367
+ readonly length: number
3368
+
3369
+ /**
3370
+ * Calls a defined callback function on each element of an array, and returns an array that
3371
+ * contains the results.
3372
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
3373
+ * callbackfn function one time for each element in the array.
3374
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3375
+ * If thisArg is omitted, undefined is used as the this value.
3376
+ */
3377
+ map(callbackfn: (value: number, index: number, array: Int32Array) => number, thisArg?: any): Int32Array
3378
+
3379
+ /**
3380
+ * Calls the specified callback function for all the elements in an array. The return value of
3381
+ * the callback function is the accumulated result, and is provided as an argument in the next
3382
+ * call to the callback function.
3383
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
3384
+ * callbackfn function one time for each element in the array.
3385
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3386
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
3387
+ * instead of an array value.
3388
+ */
3389
+ reduce(
3390
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number
3391
+ ): number
3392
+ reduce(
3393
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number,
3394
+ initialValue: number
3395
+ ): number
3396
+
3397
+ /**
3398
+ * Calls the specified callback function for all the elements in an array. The return value of
3399
+ * the callback function is the accumulated result, and is provided as an argument in the next
3400
+ * call to the callback function.
3401
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
3402
+ * callbackfn function one time for each element in the array.
3403
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3404
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
3405
+ * instead of an array value.
3406
+ */
3407
+ reduce<U>(
3408
+ callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U,
3409
+ initialValue: U
3410
+ ): U
3411
+
3412
+ /**
3413
+ * Calls the specified callback function for all the elements in an array, in descending order.
3414
+ * The return value of the callback function is the accumulated result, and is provided as an
3415
+ * argument in the next call to the callback function.
3416
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
3417
+ * the callbackfn function one time for each element in the array.
3418
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3419
+ * the accumulation. The first call to the callbackfn function provides this value as an
3420
+ * argument instead of an array value.
3421
+ */
3422
+ reduceRight(
3423
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number
3424
+ ): number
3425
+ reduceRight(
3426
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number,
3427
+ initialValue: number
3428
+ ): number
3429
+
3430
+ /**
3431
+ * Calls the specified callback function for all the elements in an array, in descending order.
3432
+ * The return value of the callback function is the accumulated result, and is provided as an
3433
+ * argument in the next call to the callback function.
3434
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
3435
+ * the callbackfn function one time for each element in the array.
3436
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3437
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
3438
+ * instead of an array value.
3439
+ */
3440
+ reduceRight<U>(
3441
+ callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U,
3442
+ initialValue: U
3443
+ ): U
3444
+
3445
+ /**
3446
+ * Reverses the elements in an Array.
3447
+ */
3448
+ reverse(): Int32Array
3449
+
3450
+ /**
3451
+ * Sets a value or an array of values.
3452
+ * @param array A typed or untyped array of values to set.
3453
+ * @param offset The index in the current array at which the values are to be written.
3454
+ */
3455
+ set(array: ArrayLike<number>, offset?: number): void
3456
+
3457
+ /**
3458
+ * Returns a section of an array.
3459
+ * @param start The beginning of the specified portion of the array.
3460
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
3461
+ */
3462
+ slice(start?: number, end?: number): Int32Array
3463
+
3464
+ /**
3465
+ * Determines whether the specified callback function returns true for any element of an array.
3466
+ * @param callbackfn A function that accepts up to three arguments. The some method calls
3467
+ * the callbackfn function for each element in the array until the callbackfn returns a value
3468
+ * which is coercible to the Boolean value true, or until the end of the array.
3469
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3470
+ * If thisArg is omitted, undefined is used as the this value.
3471
+ */
3472
+ some(callbackfn: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): boolean
3473
+
3474
+ /**
3475
+ * Sorts an array.
3476
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
3477
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
3478
+ * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
3479
+ * ```ts
3480
+ * [11,2,22,1].sort((a, b) => a - b)
3481
+ * ```
3482
+ */
3483
+ sort(compareFn?: (a: number, b: number) => number): this
3484
+
3485
+ /**
3486
+ * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements
3487
+ * at begin, inclusive, up to end, exclusive.
3488
+ * @param begin The index of the beginning of the array.
3489
+ * @param end The index of the end of the array.
3490
+ */
3491
+ subarray(begin?: number, end?: number): Int32Array
3492
+
3493
+ /**
3494
+ * Converts a number to a string by using the current locale.
3495
+ */
3496
+ toLocaleString(): string
3497
+
3498
+ /**
3499
+ * Returns a string representation of an array.
3500
+ */
3501
+ toString(): string
3502
+
3503
+ [index: number]: number
3504
+ }
3505
+
3506
+ interface Int32ArrayConstructor {
3507
+ readonly prototype: Int32Array
3508
+ new (length: number): Int32Array
3509
+ new (arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Int32Array
3510
+ new (buffer: ArrayBufferLike, byteOffset: number, length?: number): Int32Array
3511
+
3512
+ /**
3513
+ * The size in bytes of each element in the array.
3514
+ */
3515
+ readonly BYTES_PER_ELEMENT: number
3516
+
3517
+ /**
3518
+ * Returns a new array from a set of elements.
3519
+ * @param items A set of elements to include in the new array object.
3520
+ */
3521
+ of(...items: number[]): Int32Array
3522
+
3523
+ /**
3524
+ * Creates an array from an array-like or iterable object.
3525
+ * @param arrayLike An array-like or iterable object to convert to an array.
3526
+ */
3527
+ from(arrayLike: ArrayLike<number>): Int32Array
3528
+
3529
+ /**
3530
+ * Creates an array from an array-like or iterable object.
3531
+ * @param arrayLike An array-like or iterable object to convert to an array.
3532
+ * @param mapfn A mapping function to call on every element of the array.
3533
+ * @param thisArg Value of 'this' used to invoke the mapfn.
3534
+ */
3535
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array
3536
+ }
3537
+ declare var Int32Array: Int32ArrayConstructor
3538
+
3539
+ /**
3540
+ * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
3541
+ * requested number of bytes could not be allocated an exception is raised.
3542
+ */
3543
+ interface Uint32Array {
3544
+ /**
3545
+ * The size in bytes of each element in the array.
3546
+ */
3547
+ readonly BYTES_PER_ELEMENT: number
3548
+
3549
+ /**
3550
+ * The ArrayBuffer instance referenced by the array.
3551
+ */
3552
+ readonly buffer: ArrayBufferLike
3553
+
3554
+ /**
3555
+ * The length in bytes of the array.
3556
+ */
3557
+ readonly byteLength: number
3558
+
3559
+ /**
3560
+ * The offset in bytes of the array.
3561
+ */
3562
+ readonly byteOffset: number
3563
+
3564
+ /**
3565
+ * Returns the this object after copying a section of the array identified by start and end
3566
+ * to the same array starting at position target
3567
+ * @param target If target is negative, it is treated as length+target where length is the
3568
+ * length of the array.
3569
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
3570
+ * is treated as length+end.
3571
+ * @param end If not specified, length of the this object is used as its default value.
3572
+ */
3573
+ copyWithin(target: number, start: number, end?: number): this
3574
+
3575
+ /**
3576
+ * Determines whether all the members of an array satisfy the specified test.
3577
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
3578
+ * the callbackfn function for each element in the array until the callbackfn returns a value
3579
+ * which is coercible to the Boolean value false, or until the end of the array.
3580
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3581
+ * If thisArg is omitted, undefined is used as the this value.
3582
+ */
3583
+ every(callbackfn: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): boolean
3584
+
3585
+ /**
3586
+ * Returns the this object after filling the section identified by start and end with value
3587
+ * @param value value to fill array section with
3588
+ * @param start index to start filling the array at. If start is negative, it is treated as
3589
+ * length+start where length is the length of the array.
3590
+ * @param end index to stop filling the array at. If end is negative, it is treated as
3591
+ * length+end.
3592
+ */
3593
+ fill(value: number, start?: number, end?: number): this
3594
+
3595
+ /**
3596
+ * Returns the elements of an array that meet the condition specified in a callback function.
3597
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
3598
+ * the callbackfn function one time for each element in the array.
3599
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3600
+ * If thisArg is omitted, undefined is used as the this value.
3601
+ */
3602
+ filter(callbackfn: (value: number, index: number, array: Uint32Array) => any, thisArg?: any): Uint32Array
3603
+
3604
+ /**
3605
+ * Returns the value of the first element in the array where predicate is true, and undefined
3606
+ * otherwise.
3607
+ * @param predicate find calls predicate once for each element of the array, in ascending
3608
+ * order, until it finds one where predicate returns true. If such an element is found, find
3609
+ * immediately returns that element value. Otherwise, find returns undefined.
3610
+ * @param thisArg If provided, it will be used as the this value for each invocation of
3611
+ * predicate. If it is not provided, undefined is used instead.
3612
+ */
3613
+ find(predicate: (value: number, index: number, obj: Uint32Array) => boolean, thisArg?: any): number | undefined
3614
+
3615
+ /**
3616
+ * Returns the index of the first element in the array where predicate is true, and -1
3617
+ * otherwise.
3618
+ * @param predicate find calls predicate once for each element of the array, in ascending
3619
+ * order, until it finds one where predicate returns true. If such an element is found,
3620
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
3621
+ * @param thisArg If provided, it will be used as the this value for each invocation of
3622
+ * predicate. If it is not provided, undefined is used instead.
3623
+ */
3624
+ findIndex(predicate: (value: number, index: number, obj: Uint32Array) => boolean, thisArg?: any): number
3625
+
3626
+ /**
3627
+ * Performs the specified action for each element in an array.
3628
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
3629
+ * callbackfn function one time for each element in the array.
3630
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3631
+ * If thisArg is omitted, undefined is used as the this value.
3632
+ */
3633
+ forEach(callbackfn: (value: number, index: number, array: Uint32Array) => void, thisArg?: any): void
3634
+ /**
3635
+ * Returns the index of the first occurrence of a value in an array.
3636
+ * @param searchElement The value to locate in the array.
3637
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3638
+ * search starts at index 0.
3639
+ */
3640
+ indexOf(searchElement: number, fromIndex?: number): number
3641
+
3642
+ /**
3643
+ * Adds all the elements of an array separated by the specified separator string.
3644
+ * @param separator A string used to separate one element of an array from the next in the
3645
+ * resulting String. If omitted, the array elements are separated with a comma.
3646
+ */
3647
+ join(separator?: string): string
3648
+
3649
+ /**
3650
+ * Returns the index of the last occurrence of a value in an array.
3651
+ * @param searchElement The value to locate in the array.
3652
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3653
+ * search starts at index 0.
3654
+ */
3655
+ lastIndexOf(searchElement: number, fromIndex?: number): number
3656
+
3657
+ /**
3658
+ * The length of the array.
3659
+ */
3660
+ readonly length: number
3661
+
3662
+ /**
3663
+ * Calls a defined callback function on each element of an array, and returns an array that
3664
+ * contains the results.
3665
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
3666
+ * callbackfn function one time for each element in the array.
3667
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3668
+ * If thisArg is omitted, undefined is used as the this value.
3669
+ */
3670
+ map(callbackfn: (value: number, index: number, array: Uint32Array) => number, thisArg?: any): Uint32Array
3671
+
3672
+ /**
3673
+ * Calls the specified callback function for all the elements in an array. The return value of
3674
+ * the callback function is the accumulated result, and is provided as an argument in the next
3675
+ * call to the callback function.
3676
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
3677
+ * callbackfn function one time for each element in the array.
3678
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3679
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
3680
+ * instead of an array value.
3681
+ */
3682
+ reduce(
3683
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number
3684
+ ): number
3685
+ reduce(
3686
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number,
3687
+ initialValue: number
3688
+ ): number
3689
+
3690
+ /**
3691
+ * Calls the specified callback function for all the elements in an array. The return value of
3692
+ * the callback function is the accumulated result, and is provided as an argument in the next
3693
+ * call to the callback function.
3694
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
3695
+ * callbackfn function one time for each element in the array.
3696
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3697
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
3698
+ * instead of an array value.
3699
+ */
3700
+ reduce<U>(
3701
+ callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U,
3702
+ initialValue: U
3703
+ ): U
3704
+
3705
+ /**
3706
+ * Calls the specified callback function for all the elements in an array, in descending order.
3707
+ * The return value of the callback function is the accumulated result, and is provided as an
3708
+ * argument in the next call to the callback function.
3709
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
3710
+ * the callbackfn function one time for each element in the array.
3711
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3712
+ * the accumulation. The first call to the callbackfn function provides this value as an
3713
+ * argument instead of an array value.
3714
+ */
3715
+ reduceRight(
3716
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number
3717
+ ): number
3718
+ reduceRight(
3719
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number,
3720
+ initialValue: number
3721
+ ): number
3722
+
3723
+ /**
3724
+ * Calls the specified callback function for all the elements in an array, in descending order.
3725
+ * The return value of the callback function is the accumulated result, and is provided as an
3726
+ * argument in the next call to the callback function.
3727
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
3728
+ * the callbackfn function one time for each element in the array.
3729
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3730
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
3731
+ * instead of an array value.
3732
+ */
3733
+ reduceRight<U>(
3734
+ callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U,
3735
+ initialValue: U
3736
+ ): U
3737
+
3738
+ /**
3739
+ * Reverses the elements in an Array.
3740
+ */
3741
+ reverse(): Uint32Array
3742
+
3743
+ /**
3744
+ * Sets a value or an array of values.
3745
+ * @param array A typed or untyped array of values to set.
3746
+ * @param offset The index in the current array at which the values are to be written.
3747
+ */
3748
+ set(array: ArrayLike<number>, offset?: number): void
3749
+
3750
+ /**
3751
+ * Returns a section of an array.
3752
+ * @param start The beginning of the specified portion of the array.
3753
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
3754
+ */
3755
+ slice(start?: number, end?: number): Uint32Array
3756
+
3757
+ /**
3758
+ * Determines whether the specified callback function returns true for any element of an array.
3759
+ * @param callbackfn A function that accepts up to three arguments. The some method calls
3760
+ * the callbackfn function for each element in the array until the callbackfn returns a value
3761
+ * which is coercible to the Boolean value true, or until the end of the array.
3762
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3763
+ * If thisArg is omitted, undefined is used as the this value.
3764
+ */
3765
+ some(callbackfn: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): boolean
3766
+
3767
+ /**
3768
+ * Sorts an array.
3769
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
3770
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
3771
+ * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
3772
+ * ```ts
3773
+ * [11,2,22,1].sort((a, b) => a - b)
3774
+ * ```
3775
+ */
3776
+ sort(compareFn?: (a: number, b: number) => number): this
3777
+
3778
+ /**
3779
+ * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements
3780
+ * at begin, inclusive, up to end, exclusive.
3781
+ * @param begin The index of the beginning of the array.
3782
+ * @param end The index of the end of the array.
3783
+ */
3784
+ subarray(begin?: number, end?: number): Uint32Array
3785
+
3786
+ /**
3787
+ * Converts a number to a string by using the current locale.
3788
+ */
3789
+ toLocaleString(): string
3790
+
3791
+ /**
3792
+ * Returns a string representation of an array.
3793
+ */
3794
+ toString(): string
3795
+
3796
+ [index: number]: number
3797
+ }
3798
+
3799
+ interface Uint32ArrayConstructor {
3800
+ readonly prototype: Uint32Array
3801
+ new (length: number): Uint32Array
3802
+ new (arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Uint32Array
3803
+ new (buffer: ArrayBufferLike, byteOffset: number, length?: number): Uint32Array
3804
+
3805
+ /**
3806
+ * The size in bytes of each element in the array.
3807
+ */
3808
+ readonly BYTES_PER_ELEMENT: number
3809
+
3810
+ /**
3811
+ * Returns a new array from a set of elements.
3812
+ * @param items A set of elements to include in the new array object.
3813
+ */
3814
+ of(...items: number[]): Uint32Array
3815
+
3816
+ /**
3817
+ * Creates an array from an array-like or iterable object.
3818
+ * @param arrayLike An array-like or iterable object to convert to an array.
3819
+ */
3820
+ from(arrayLike: ArrayLike<number>): Uint32Array
3821
+
3822
+ /**
3823
+ * Creates an array from an array-like or iterable object.
3824
+ * @param arrayLike An array-like or iterable object to convert to an array.
3825
+ * @param mapfn A mapping function to call on every element of the array.
3826
+ * @param thisArg Value of 'this' used to invoke the mapfn.
3827
+ */
3828
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array
3829
+ }
3830
+ declare var Uint32Array: Uint32ArrayConstructor
3831
+
3832
+ /**
3833
+ * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
3834
+ * of bytes could not be allocated an exception is raised.
3835
+ */
3836
+ interface Float32Array {
3837
+ /**
3838
+ * The size in bytes of each element in the array.
3839
+ */
3840
+ readonly BYTES_PER_ELEMENT: number
3841
+
3842
+ /**
3843
+ * The ArrayBuffer instance referenced by the array.
3844
+ */
3845
+ readonly buffer: ArrayBufferLike
3846
+
3847
+ /**
3848
+ * The length in bytes of the array.
3849
+ */
3850
+ readonly byteLength: number
3851
+
3852
+ /**
3853
+ * The offset in bytes of the array.
3854
+ */
3855
+ readonly byteOffset: number
3856
+
3857
+ /**
3858
+ * Returns the this object after copying a section of the array identified by start and end
3859
+ * to the same array starting at position target
3860
+ * @param target If target is negative, it is treated as length+target where length is the
3861
+ * length of the array.
3862
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
3863
+ * is treated as length+end.
3864
+ * @param end If not specified, length of the this object is used as its default value.
3865
+ */
3866
+ copyWithin(target: number, start: number, end?: number): this
3867
+
3868
+ /**
3869
+ * Determines whether all the members of an array satisfy the specified test.
3870
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
3871
+ * the callbackfn function for each element in the array until the callbackfn returns a value
3872
+ * which is coercible to the Boolean value false, or until the end of the array.
3873
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3874
+ * If thisArg is omitted, undefined is used as the this value.
3875
+ */
3876
+ every(callbackfn: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): boolean
3877
+
3878
+ /**
3879
+ * Returns the this object after filling the section identified by start and end with value
3880
+ * @param value value to fill array section with
3881
+ * @param start index to start filling the array at. If start is negative, it is treated as
3882
+ * length+start where length is the length of the array.
3883
+ * @param end index to stop filling the array at. If end is negative, it is treated as
3884
+ * length+end.
3885
+ */
3886
+ fill(value: number, start?: number, end?: number): this
3887
+
3888
+ /**
3889
+ * Returns the elements of an array that meet the condition specified in a callback function.
3890
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
3891
+ * the callbackfn function one time for each element in the array.
3892
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3893
+ * If thisArg is omitted, undefined is used as the this value.
3894
+ */
3895
+ filter(callbackfn: (value: number, index: number, array: Float32Array) => any, thisArg?: any): Float32Array
3896
+
3897
+ /**
3898
+ * Returns the value of the first element in the array where predicate is true, and undefined
3899
+ * otherwise.
3900
+ * @param predicate find calls predicate once for each element of the array, in ascending
3901
+ * order, until it finds one where predicate returns true. If such an element is found, find
3902
+ * immediately returns that element value. Otherwise, find returns undefined.
3903
+ * @param thisArg If provided, it will be used as the this value for each invocation of
3904
+ * predicate. If it is not provided, undefined is used instead.
3905
+ */
3906
+ find(predicate: (value: number, index: number, obj: Float32Array) => boolean, thisArg?: any): number | undefined
3907
+
3908
+ /**
3909
+ * Returns the index of the first element in the array where predicate is true, and -1
3910
+ * otherwise.
3911
+ * @param predicate find calls predicate once for each element of the array, in ascending
3912
+ * order, until it finds one where predicate returns true. If such an element is found,
3913
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
3914
+ * @param thisArg If provided, it will be used as the this value for each invocation of
3915
+ * predicate. If it is not provided, undefined is used instead.
3916
+ */
3917
+ findIndex(predicate: (value: number, index: number, obj: Float32Array) => boolean, thisArg?: any): number
3918
+
3919
+ /**
3920
+ * Performs the specified action for each element in an array.
3921
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
3922
+ * callbackfn function one time for each element in the array.
3923
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3924
+ * If thisArg is omitted, undefined is used as the this value.
3925
+ */
3926
+ forEach(callbackfn: (value: number, index: number, array: Float32Array) => void, thisArg?: any): void
3927
+
3928
+ /**
3929
+ * Returns the index of the first occurrence of a value in an array.
3930
+ * @param searchElement The value to locate in the array.
3931
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3932
+ * search starts at index 0.
3933
+ */
3934
+ indexOf(searchElement: number, fromIndex?: number): number
3935
+
3936
+ /**
3937
+ * Adds all the elements of an array separated by the specified separator string.
3938
+ * @param separator A string used to separate one element of an array from the next in the
3939
+ * resulting String. If omitted, the array elements are separated with a comma.
3940
+ */
3941
+ join(separator?: string): string
3942
+
3943
+ /**
3944
+ * Returns the index of the last occurrence of a value in an array.
3945
+ * @param searchElement The value to locate in the array.
3946
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3947
+ * search starts at index 0.
3948
+ */
3949
+ lastIndexOf(searchElement: number, fromIndex?: number): number
3950
+
3951
+ /**
3952
+ * The length of the array.
3953
+ */
3954
+ readonly length: number
3955
+
3956
+ /**
3957
+ * Calls a defined callback function on each element of an array, and returns an array that
3958
+ * contains the results.
3959
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
3960
+ * callbackfn function one time for each element in the array.
3961
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3962
+ * If thisArg is omitted, undefined is used as the this value.
3963
+ */
3964
+ map(callbackfn: (value: number, index: number, array: Float32Array) => number, thisArg?: any): Float32Array
3965
+
3966
+ /**
3967
+ * Calls the specified callback function for all the elements in an array. The return value of
3968
+ * the callback function is the accumulated result, and is provided as an argument in the next
3969
+ * call to the callback function.
3970
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
3971
+ * callbackfn function one time for each element in the array.
3972
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3973
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
3974
+ * instead of an array value.
3975
+ */
3976
+ reduce(
3977
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number
3978
+ ): number
3979
+ reduce(
3980
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number,
3981
+ initialValue: number
3982
+ ): number
3983
+
3984
+ /**
3985
+ * Calls the specified callback function for all the elements in an array. The return value of
3986
+ * the callback function is the accumulated result, and is provided as an argument in the next
3987
+ * call to the callback function.
3988
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
3989
+ * callbackfn function one time for each element in the array.
3990
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3991
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
3992
+ * instead of an array value.
3993
+ */
3994
+ reduce<U>(
3995
+ callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U,
3996
+ initialValue: U
3997
+ ): U
3998
+
3999
+ /**
4000
+ * Calls the specified callback function for all the elements in an array, in descending order.
4001
+ * The return value of the callback function is the accumulated result, and is provided as an
4002
+ * argument in the next call to the callback function.
4003
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
4004
+ * the callbackfn function one time for each element in the array.
4005
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
4006
+ * the accumulation. The first call to the callbackfn function provides this value as an
4007
+ * argument instead of an array value.
4008
+ */
4009
+ reduceRight(
4010
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number
4011
+ ): number
4012
+ reduceRight(
4013
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number,
4014
+ initialValue: number
4015
+ ): number
4016
+
4017
+ /**
4018
+ * Calls the specified callback function for all the elements in an array, in descending order.
4019
+ * The return value of the callback function is the accumulated result, and is provided as an
4020
+ * argument in the next call to the callback function.
4021
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
4022
+ * the callbackfn function one time for each element in the array.
4023
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
4024
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
4025
+ * instead of an array value.
4026
+ */
4027
+ reduceRight<U>(
4028
+ callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U,
4029
+ initialValue: U
4030
+ ): U
4031
+
4032
+ /**
4033
+ * Reverses the elements in an Array.
4034
+ */
4035
+ reverse(): Float32Array
4036
+
4037
+ /**
4038
+ * Sets a value or an array of values.
4039
+ * @param array A typed or untyped array of values to set.
4040
+ * @param offset The index in the current array at which the values are to be written.
4041
+ */
4042
+ set(array: ArrayLike<number>, offset?: number): void
4043
+
4044
+ /**
4045
+ * Returns a section of an array.
4046
+ * @param start The beginning of the specified portion of the array.
4047
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
4048
+ */
4049
+ slice(start?: number, end?: number): Float32Array
4050
+
4051
+ /**
4052
+ * Determines whether the specified callback function returns true for any element of an array.
4053
+ * @param callbackfn A function that accepts up to three arguments. The some method calls
4054
+ * the callbackfn function for each element in the array until the callbackfn returns a value
4055
+ * which is coercible to the Boolean value true, or until the end of the array.
4056
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
4057
+ * If thisArg is omitted, undefined is used as the this value.
4058
+ */
4059
+ some(callbackfn: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): boolean
4060
+
4061
+ /**
4062
+ * Sorts an array.
4063
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
4064
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
4065
+ * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
4066
+ * ```ts
4067
+ * [11,2,22,1].sort((a, b) => a - b)
4068
+ * ```
4069
+ */
4070
+ sort(compareFn?: (a: number, b: number) => number): this
4071
+
4072
+ /**
4073
+ * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements
4074
+ * at begin, inclusive, up to end, exclusive.
4075
+ * @param begin The index of the beginning of the array.
4076
+ * @param end The index of the end of the array.
4077
+ */
4078
+ subarray(begin?: number, end?: number): Float32Array
4079
+
4080
+ /**
4081
+ * Converts a number to a string by using the current locale.
4082
+ */
4083
+ toLocaleString(): string
4084
+
4085
+ /**
4086
+ * Returns a string representation of an array.
4087
+ */
4088
+ toString(): string
4089
+
4090
+ [index: number]: number
4091
+ }
4092
+
4093
+ interface Float32ArrayConstructor {
4094
+ readonly prototype: Float32Array
4095
+ new (length: number): Float32Array
4096
+ new (arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Float32Array
4097
+ new (buffer: ArrayBufferLike, byteOffset: number, length?: number): Float32Array
4098
+
4099
+ /**
4100
+ * The size in bytes of each element in the array.
4101
+ */
4102
+ readonly BYTES_PER_ELEMENT: number
4103
+
4104
+ /**
4105
+ * Returns a new array from a set of elements.
4106
+ * @param items A set of elements to include in the new array object.
4107
+ */
4108
+ of(...items: number[]): Float32Array
4109
+
4110
+ /**
4111
+ * Creates an array from an array-like or iterable object.
4112
+ * @param arrayLike An array-like or iterable object to convert to an array.
4113
+ */
4114
+ from(arrayLike: ArrayLike<number>): Float32Array
4115
+
4116
+ /**
4117
+ * Creates an array from an array-like or iterable object.
4118
+ * @param arrayLike An array-like or iterable object to convert to an array.
4119
+ * @param mapfn A mapping function to call on every element of the array.
4120
+ * @param thisArg Value of 'this' used to invoke the mapfn.
4121
+ */
4122
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array
4123
+ }
4124
+ declare var Float32Array: Float32ArrayConstructor
4125
+
4126
+ /**
4127
+ * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
4128
+ * number of bytes could not be allocated an exception is raised.
4129
+ */
4130
+ interface Float64Array {
4131
+ /**
4132
+ * The size in bytes of each element in the array.
4133
+ */
4134
+ readonly BYTES_PER_ELEMENT: number
4135
+
4136
+ /**
4137
+ * The ArrayBuffer instance referenced by the array.
4138
+ */
4139
+ readonly buffer: ArrayBufferLike
4140
+
4141
+ /**
4142
+ * The length in bytes of the array.
4143
+ */
4144
+ readonly byteLength: number
4145
+
4146
+ /**
4147
+ * The offset in bytes of the array.
4148
+ */
4149
+ readonly byteOffset: number
4150
+
4151
+ /**
4152
+ * Returns the this object after copying a section of the array identified by start and end
4153
+ * to the same array starting at position target
4154
+ * @param target If target is negative, it is treated as length+target where length is the
4155
+ * length of the array.
4156
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
4157
+ * is treated as length+end.
4158
+ * @param end If not specified, length of the this object is used as its default value.
4159
+ */
4160
+ copyWithin(target: number, start: number, end?: number): this
4161
+
4162
+ /**
4163
+ * Determines whether all the members of an array satisfy the specified test.
4164
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
4165
+ * the callbackfn function for each element in the array until the callbackfn returns a value
4166
+ * which is coercible to the Boolean value false, or until the end of the array.
4167
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
4168
+ * If thisArg is omitted, undefined is used as the this value.
4169
+ */
4170
+ every(callbackfn: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): boolean
4171
+
4172
+ /**
4173
+ * Returns the this object after filling the section identified by start and end with value
4174
+ * @param value value to fill array section with
4175
+ * @param start index to start filling the array at. If start is negative, it is treated as
4176
+ * length+start where length is the length of the array.
4177
+ * @param end index to stop filling the array at. If end is negative, it is treated as
4178
+ * length+end.
4179
+ */
4180
+ fill(value: number, start?: number, end?: number): this
4181
+
4182
+ /**
4183
+ * Returns the elements of an array that meet the condition specified in a callback function.
4184
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
4185
+ * the callbackfn function one time for each element in the array.
4186
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
4187
+ * If thisArg is omitted, undefined is used as the this value.
4188
+ */
4189
+ filter(callbackfn: (value: number, index: number, array: Float64Array) => any, thisArg?: any): Float64Array
4190
+
4191
+ /**
4192
+ * Returns the value of the first element in the array where predicate is true, and undefined
4193
+ * otherwise.
4194
+ * @param predicate find calls predicate once for each element of the array, in ascending
4195
+ * order, until it finds one where predicate returns true. If such an element is found, find
4196
+ * immediately returns that element value. Otherwise, find returns undefined.
4197
+ * @param thisArg If provided, it will be used as the this value for each invocation of
4198
+ * predicate. If it is not provided, undefined is used instead.
4199
+ */
4200
+ find(predicate: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any): number | undefined
4201
+
4202
+ /**
4203
+ * Returns the index of the first element in the array where predicate is true, and -1
4204
+ * otherwise.
4205
+ * @param predicate find calls predicate once for each element of the array, in ascending
4206
+ * order, until it finds one where predicate returns true. If such an element is found,
4207
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
4208
+ * @param thisArg If provided, it will be used as the this value for each invocation of
4209
+ * predicate. If it is not provided, undefined is used instead.
4210
+ */
4211
+ findIndex(predicate: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any): number
4212
+
4213
+ /**
4214
+ * Performs the specified action for each element in an array.
4215
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
4216
+ * callbackfn function one time for each element in the array.
4217
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
4218
+ * If thisArg is omitted, undefined is used as the this value.
4219
+ */
4220
+ forEach(callbackfn: (value: number, index: number, array: Float64Array) => void, thisArg?: any): void
4221
+
4222
+ /**
4223
+ * Returns the index of the first occurrence of a value in an array.
4224
+ * @param searchElement The value to locate in the array.
4225
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
4226
+ * search starts at index 0.
4227
+ */
4228
+ indexOf(searchElement: number, fromIndex?: number): number
4229
+
4230
+ /**
4231
+ * Adds all the elements of an array separated by the specified separator string.
4232
+ * @param separator A string used to separate one element of an array from the next in the
4233
+ * resulting String. If omitted, the array elements are separated with a comma.
4234
+ */
4235
+ join(separator?: string): string
4236
+
4237
+ /**
4238
+ * Returns the index of the last occurrence of a value in an array.
4239
+ * @param searchElement The value to locate in the array.
4240
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
4241
+ * search starts at index 0.
4242
+ */
4243
+ lastIndexOf(searchElement: number, fromIndex?: number): number
4244
+
4245
+ /**
4246
+ * The length of the array.
4247
+ */
4248
+ readonly length: number
4249
+
4250
+ /**
4251
+ * Calls a defined callback function on each element of an array, and returns an array that
4252
+ * contains the results.
4253
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
4254
+ * callbackfn function one time for each element in the array.
4255
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
4256
+ * If thisArg is omitted, undefined is used as the this value.
4257
+ */
4258
+ map(callbackfn: (value: number, index: number, array: Float64Array) => number, thisArg?: any): Float64Array
4259
+
4260
+ /**
4261
+ * Calls the specified callback function for all the elements in an array. The return value of
4262
+ * the callback function is the accumulated result, and is provided as an argument in the next
4263
+ * call to the callback function.
4264
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
4265
+ * callbackfn function one time for each element in the array.
4266
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
4267
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
4268
+ * instead of an array value.
4269
+ */
4270
+ reduce(
4271
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number
4272
+ ): number
4273
+ reduce(
4274
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number,
4275
+ initialValue: number
4276
+ ): number
4277
+
4278
+ /**
4279
+ * Calls the specified callback function for all the elements in an array. The return value of
4280
+ * the callback function is the accumulated result, and is provided as an argument in the next
4281
+ * call to the callback function.
4282
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
4283
+ * callbackfn function one time for each element in the array.
4284
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
4285
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
4286
+ * instead of an array value.
4287
+ */
4288
+ reduce<U>(
4289
+ callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U,
4290
+ initialValue: U
4291
+ ): U
4292
+
4293
+ /**
4294
+ * Calls the specified callback function for all the elements in an array, in descending order.
4295
+ * The return value of the callback function is the accumulated result, and is provided as an
4296
+ * argument in the next call to the callback function.
4297
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
4298
+ * the callbackfn function one time for each element in the array.
4299
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
4300
+ * the accumulation. The first call to the callbackfn function provides this value as an
4301
+ * argument instead of an array value.
4302
+ */
4303
+ reduceRight(
4304
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number
4305
+ ): number
4306
+ reduceRight(
4307
+ callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number,
4308
+ initialValue: number
4309
+ ): number
4310
+
4311
+ /**
4312
+ * Calls the specified callback function for all the elements in an array, in descending order.
4313
+ * The return value of the callback function is the accumulated result, and is provided as an
4314
+ * argument in the next call to the callback function.
4315
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
4316
+ * the callbackfn function one time for each element in the array.
4317
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
4318
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
4319
+ * instead of an array value.
4320
+ */
4321
+ reduceRight<U>(
4322
+ callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U,
4323
+ initialValue: U
4324
+ ): U
4325
+
4326
+ /**
4327
+ * Reverses the elements in an Array.
4328
+ */
4329
+ reverse(): Float64Array
4330
+
4331
+ /**
4332
+ * Sets a value or an array of values.
4333
+ * @param array A typed or untyped array of values to set.
4334
+ * @param offset The index in the current array at which the values are to be written.
4335
+ */
4336
+ set(array: ArrayLike<number>, offset?: number): void
4337
+
4338
+ /**
4339
+ * Returns a section of an array.
4340
+ * @param start The beginning of the specified portion of the array.
4341
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
4342
+ */
4343
+ slice(start?: number, end?: number): Float64Array
4344
+
4345
+ /**
4346
+ * Determines whether the specified callback function returns true for any element of an array.
4347
+ * @param callbackfn A function that accepts up to three arguments. The some method calls
4348
+ * the callbackfn function for each element in the array until the callbackfn returns a value
4349
+ * which is coercible to the Boolean value true, or until the end of the array.
4350
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
4351
+ * If thisArg is omitted, undefined is used as the this value.
4352
+ */
4353
+ some(callbackfn: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): boolean
4354
+
4355
+ /**
4356
+ * Sorts an array.
4357
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
4358
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
4359
+ * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
4360
+ * ```ts
4361
+ * [11,2,22,1].sort((a, b) => a - b)
4362
+ * ```
4363
+ */
4364
+ sort(compareFn?: (a: number, b: number) => number): this
4365
+
4366
+ /**
4367
+ * at begin, inclusive, up to end, exclusive.
4368
+ * @param begin The index of the beginning of the array.
4369
+ * @param end The index of the end of the array.
4370
+ */
4371
+ subarray(begin?: number, end?: number): Float64Array
4372
+
4373
+ toString(): string
4374
+
4375
+ [index: number]: number
4376
+ }
4377
+
4378
+ interface Float64ArrayConstructor {
4379
+ readonly prototype: Float64Array
4380
+ new (length: number): Float64Array
4381
+ new (arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Float64Array
4382
+ new (buffer: ArrayBufferLike, byteOffset: number, length?: number): Float64Array
4383
+
4384
+ /**
4385
+ * The size in bytes of each element in the array.
4386
+ */
4387
+ readonly BYTES_PER_ELEMENT: number
4388
+
4389
+ /**
4390
+ * Returns a new array from a set of elements.
4391
+ * @param items A set of elements to include in the new array object.
4392
+ */
4393
+ of(...items: number[]): Float64Array
4394
+
4395
+ /**
4396
+ * Creates an array from an array-like or iterable object.
4397
+ * @param arrayLike An array-like or iterable object to convert to an array.
4398
+ */
4399
+ from(arrayLike: ArrayLike<number>): Float64Array
4400
+
4401
+ /**
4402
+ * Creates an array from an array-like or iterable object.
4403
+ * @param arrayLike An array-like or iterable object to convert to an array.
4404
+ * @param mapfn A mapping function to call on every element of the array.
4405
+ * @param thisArg Value of 'this' used to invoke the mapfn.
4406
+ */
4407
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array
4408
+ }
4409
+ declare var Float64Array: Float64ArrayConstructor
4410
+
4411
+ /////////////////////////////
4412
+ /// ECMAScript Internationalization API
4413
+ /////////////////////////////
4414
+
4415
+ declare namespace Intl {
4416
+ interface CollatorOptions {
4417
+ usage?: string
4418
+ localeMatcher?: string
4419
+ numeric?: boolean
4420
+ caseFirst?: string
4421
+ sensitivity?: string
4422
+ ignorePunctuation?: boolean
4423
+ }
4424
+
4425
+ interface ResolvedCollatorOptions {
4426
+ locale: string
4427
+ usage: string
4428
+ sensitivity: string
4429
+ ignorePunctuation: boolean
4430
+ collation: string
4431
+ caseFirst: string
4432
+ numeric: boolean
4433
+ }
4434
+
4435
+ interface Collator {
4436
+ compare(x: string, y: string): number
4437
+ resolvedOptions(): ResolvedCollatorOptions
4438
+ }
4439
+ var Collator: {
4440
+ new (locales?: string | string[], options?: CollatorOptions): Collator
4441
+ (locales?: string | string[], options?: CollatorOptions): Collator
4442
+ supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[]
4443
+ }
4444
+
4445
+ interface NumberFormatOptions {
4446
+ localeMatcher?: string
4447
+ style?: string
4448
+ currency?: string
4449
+ currencyDisplay?: string
4450
+ useGrouping?: boolean
4451
+ minimumIntegerDigits?: number
4452
+ minimumFractionDigits?: number
4453
+ maximumFractionDigits?: number
4454
+ minimumSignificantDigits?: number
4455
+ maximumSignificantDigits?: number
4456
+ }
4457
+
4458
+ interface ResolvedNumberFormatOptions {
4459
+ locale: string
4460
+ numberingSystem: string
4461
+ style: string
4462
+ currency?: string
4463
+ currencyDisplay?: string
4464
+ minimumIntegerDigits: number
4465
+ minimumFractionDigits: number
4466
+ maximumFractionDigits: number
4467
+ minimumSignificantDigits?: number
4468
+ maximumSignificantDigits?: number
4469
+ useGrouping: boolean
4470
+ }
4471
+
4472
+ interface NumberFormat {
4473
+ format(value: number): string
4474
+ resolvedOptions(): ResolvedNumberFormatOptions
4475
+ }
4476
+ var NumberFormat: {
4477
+ new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat
4478
+ (locales?: string | string[], options?: NumberFormatOptions): NumberFormat
4479
+ supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[]
4480
+ }
4481
+
4482
+ interface DateTimeFormatOptions {
4483
+ localeMatcher?: string
4484
+ weekday?: string
4485
+ era?: string
4486
+ year?: string
4487
+ month?: string
4488
+ day?: string
4489
+ hour?: string
4490
+ minute?: string
4491
+ second?: string
4492
+ timeZoneName?: string
4493
+ formatMatcher?: string
4494
+ hour12?: boolean
4495
+ timeZone?: string
4496
+ }
4497
+
4498
+ interface ResolvedDateTimeFormatOptions {
4499
+ locale: string
4500
+ calendar: string
4501
+ numberingSystem: string
4502
+ timeZone: string
4503
+ hour12?: boolean
4504
+ weekday?: string
4505
+ era?: string
4506
+ year?: string
4507
+ month?: string
4508
+ day?: string
4509
+ hour?: string
4510
+ minute?: string
4511
+ second?: string
4512
+ timeZoneName?: string
4513
+ }
4514
+
4515
+ interface DateTimeFormat {
4516
+ format(date?: Date | number): string
4517
+ resolvedOptions(): ResolvedDateTimeFormatOptions
4518
+ }
4519
+ var DateTimeFormat: {
4520
+ new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat
4521
+ (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat
4522
+ supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[]
4523
+ }
4524
+ }
4525
+
4526
+ interface String {
4527
+ /**
4528
+ * Determines whether two strings are equivalent in the current or specified locale.
4529
+ * @param that String to compare to target string
4530
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.
4531
+ * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
4532
+ */
4533
+ localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number
4534
+ }
4535
+
4536
+ interface Number {
4537
+ /**
4538
+ * Converts a number to a string by using the current or specified locale.
4539
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
4540
+ * @param options An object that contains one or more properties that specify comparison options.
4541
+ */
4542
+ toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string
4543
+ }
4544
+
4545
+ interface Date {
4546
+ /**
4547
+ * Converts a date and time to a string by using the current or specified locale.
4548
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
4549
+ * @param options An object that contains one or more properties that specify comparison options.
4550
+ */
4551
+ toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string
4552
+ /**
4553
+ * Converts a date to a string by using the current or specified locale.
4554
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
4555
+ * @param options An object that contains one or more properties that specify comparison options.
4556
+ */
4557
+ toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string
4558
+
4559
+ /**
4560
+ * Converts a time to a string by using the current or specified locale.
4561
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
4562
+ * @param options An object that contains one or more properties that specify comparison options.
4563
+ */
4564
+ toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string
4565
+ }