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