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
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.
12 See the Apache Version 2.0 License for specific language governing permissions
13 and limitations under the License.
14 ***************************************************************************** */
18 /// <reference no-default-lib="true"/>
\r
21 /////////////////////////////
\r
23 /////////////////////////////
\r
25 declare var NaN: number;
\r
26 declare var Infinity: number;
\r
29 * Evaluates JavaScript code and executes it.
\r
30 * @param x A String value that contains valid JavaScript code.
\r
32 declare function eval(x: string): any;
\r
35 * Converts a string to an integer.
\r
36 * @param string 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 `string`.
\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
41 declare function parseInt(string: string, radix?: number): number;
\r
44 * Converts a string to a floating-point number.
\r
45 * @param string A string that contains a floating-point number.
\r
47 declare function parseFloat(string: string): number;
\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
53 declare function isNaN(number: number): boolean;
\r
56 * Determines whether a supplied number is finite.
\r
57 * @param number Any numeric value.
\r
59 declare function isFinite(number: number): boolean;
\r
62 * Gets the unencoded version of an encoded Uniform Resource Identifier (URI).
\r
63 * @param encodedURI A value representing an encoded URI.
\r
65 declare function decodeURI(encodedURI: string): string;
\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
71 declare function decodeURIComponent(encodedURIComponent: string): string;
\r
74 * Encodes a text string as a valid Uniform Resource Identifier (URI)
\r
75 * @param uri A value representing an encoded URI.
\r
77 declare function encodeURI(uri: string): string;
\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
83 declare function encodeURIComponent(uriComponent: string | number | boolean): string;
\r
86 * Computes a new string in which certain characters have been replaced by a hexadecimal escape sequence.
\r
87 * @deprecated A legacy feature for browser compatibility
\r
88 * @param string A string value
\r
90 declare function escape(string: string): string;
\r
93 * Computes a new string in which hexadecimal escape sequences are replaced with the character that it represents.
\r
94 * @deprecated A legacy feature for browser compatibility
\r
95 * @param string A string value
\r
97 declare function unescape(string: string): string;
\r
100 /** Returns a string representation of an object. */
\r
101 toString(): string;
\r
103 /** Returns the primitive value of the specified object. */
\r
107 declare type PropertyKey = string | number | symbol;
\r
109 interface PropertyDescriptor {
\r
110 configurable?: boolean;
\r
111 enumerable?: boolean;
\r
113 writable?: boolean;
\r
115 set?(v: any): void;
\r
118 interface PropertyDescriptorMap {
\r
119 [s: string]: PropertyDescriptor;
\r
123 /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */
\r
124 constructor: Function;
\r
126 /** Returns a string representation of an object. */
\r
127 toString(): string;
\r
129 /** Returns a date converted to a string using the current locale. */
\r
130 toLocaleString(): string;
\r
132 /** Returns the primitive value of the specified object. */
\r
136 * Determines whether an object has a property with the specified name.
\r
137 * @param v A property name.
\r
139 hasOwnProperty(v: PropertyKey): boolean;
\r
142 * Determines whether an object exists in another object's prototype chain.
\r
143 * @param v Another object whose prototype chain is to be checked.
\r
145 isPrototypeOf(v: Object): boolean;
\r
148 * Determines whether a specified property is enumerable.
\r
149 * @param v A property name.
\r
151 propertyIsEnumerable(v: PropertyKey): boolean;
\r
154 interface ObjectConstructor {
\r
155 new(value?: any): Object;
\r
159 /** A reference to the prototype for a class of objects. */
\r
160 readonly prototype: Object;
\r
163 * Returns the prototype of an object.
\r
164 * @param o The object that references the prototype.
\r
166 getPrototypeOf(o: any): any;
\r
169 * Gets the own property descriptor of the specified object.
\r
170 * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
\r
171 * @param o Object that contains the property.
\r
172 * @param p Name of the property.
\r
174 getOwnPropertyDescriptor(o: any, p: PropertyKey): PropertyDescriptor | undefined;
\r
177 * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly
\r
178 * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
\r
179 * @param o Object that contains the own properties.
\r
181 getOwnPropertyNames(o: any): string[];
\r
184 * Creates an object that has the specified prototype or that has null prototype.
\r
185 * @param o Object to use as a prototype. May be null.
\r
187 create(o: object | null): any;
\r
190 * Creates an object that has the specified prototype, and that optionally contains specified properties.
\r
191 * @param o Object to use as a prototype. May be null
\r
192 * @param properties JavaScript object that contains one or more property descriptors.
\r
194 create(o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;
\r
197 * Adds a property to an object, or modifies attributes of an existing property.
\r
198 * @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
199 * @param p The property name.
\r
200 * @param attributes Descriptor for the property. It can be for a data property or an accessor property.
\r
202 defineProperty<T>(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>): T;
\r
205 * Adds one or more properties to an object, and/or modifies attributes of existing properties.
\r
206 * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.
\r
207 * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.
\r
209 defineProperties<T>(o: T, properties: PropertyDescriptorMap & ThisType<any>): T;
\r
212 * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
\r
213 * @param o Object on which to lock the attributes.
\r
218 * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
\r
219 * @param a Object on which to lock the attributes.
\r
221 freeze<T>(a: T[]): readonly T[];
\r
224 * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
\r
225 * @param f Object on which to lock the attributes.
\r
227 freeze<T extends Function>(f: T): T;
\r
230 * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
\r
231 * @param o Object on which to lock the attributes.
\r
233 freeze<T>(o: T): Readonly<T>;
\r
236 * Prevents the addition of new properties to an object.
\r
237 * @param o Object to make non-extensible.
\r
239 preventExtensions<T>(o: T): T;
\r
242 * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
\r
243 * @param o Object to test.
\r
245 isSealed(o: any): boolean;
\r
248 * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
\r
249 * @param o Object to test.
\r
251 isFrozen(o: any): boolean;
\r
254 * Returns a value that indicates whether new properties can be added to an object.
\r
255 * @param o Object to test.
\r
257 isExtensible(o: any): boolean;
\r
260 * Returns the names of the enumerable string properties and methods of an object.
\r
261 * @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
263 keys(o: object): string[];
\r
267 * Provides functionality common to all JavaScript objects.
\r
269 declare var Object: ObjectConstructor;
\r
272 * Creates a new function.
\r
274 interface Function {
\r
276 * 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
277 * @param thisArg The object to be used as the this object.
\r
278 * @param argArray A set of arguments to be passed to the function.
\r
280 apply(this: Function, thisArg: any, argArray?: any): any;
\r
283 * Calls a method of an object, substituting another object for the current object.
\r
284 * @param thisArg The object to be used as the current object.
\r
285 * @param argArray A list of arguments to be passed to the method.
\r
287 call(this: Function, thisArg: any, ...argArray: any[]): any;
\r
290 * For a given function, creates a bound function that has the same body as the original function.
\r
291 * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
\r
292 * @param thisArg An object to which the this keyword can refer inside the new function.
\r
293 * @param argArray A list of arguments to be passed to the new function.
\r
295 bind(this: Function, thisArg: any, ...argArray: any[]): any;
\r
297 /** Returns a string representation of a function. */
\r
298 toString(): string;
\r
301 readonly length: number;
\r
303 // Non-standard extensions
\r
308 interface FunctionConstructor {
\r
310 * Creates a new function.
\r
311 * @param args A list of arguments the function accepts.
\r
313 new(...args: string[]): Function;
\r
314 (...args: string[]): Function;
\r
315 readonly prototype: Function;
\r
318 declare var Function: FunctionConstructor;
\r
321 * Extracts the type of the 'this' parameter of a function type, or 'unknown' if the function type has no 'this' parameter.
\r
323 type ThisParameterType<T> = T extends (this: infer U, ...args: any[]) => any ? U : unknown;
\r
326 * Removes the 'this' parameter from a function type.
\r
328 type OmitThisParameter<T> = unknown extends ThisParameterType<T> ? T : T extends (...args: infer A) => infer R ? (...args: A) => R : T;
\r
330 interface CallableFunction extends Function {
\r
332 * Calls the function with the specified object as the this value and the elements of specified array as the arguments.
\r
333 * @param thisArg The object to be used as the this object.
\r
334 * @param args An array of argument values to be passed to the function.
\r
336 apply<T, R>(this: (this: T) => R, thisArg: T): R;
\r
337 apply<T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R;
\r
340 * Calls the function with the specified object as the this value and the specified rest arguments as the arguments.
\r
341 * @param thisArg The object to be used as the this object.
\r
342 * @param args Argument values to be passed to the function.
\r
344 call<T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R;
\r
347 * For a given function, creates a bound function that has the same body as the original function.
\r
348 * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
\r
349 * @param thisArg The object to be used as the this object.
\r
350 * @param args Arguments to bind to the parameters of the function.
\r
352 bind<T>(this: T, thisArg: ThisParameterType<T>): OmitThisParameter<T>;
\r
353 bind<T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R;
\r
354 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
355 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
356 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
357 bind<T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R;
\r
360 interface NewableFunction extends Function {
\r
362 * Calls the function with the specified object as the this value and the elements of specified array as the arguments.
\r
363 * @param thisArg The object to be used as the this object.
\r
364 * @param args An array of argument values to be passed to the function.
\r
366 apply<T>(this: new () => T, thisArg: T): void;
\r
367 apply<T, A extends any[]>(this: new (...args: A) => T, thisArg: T, args: A): void;
\r
370 * Calls the function with the specified object as the this value and the specified rest arguments as the arguments.
\r
371 * @param thisArg The object to be used as the this object.
\r
372 * @param args Argument values to be passed to the function.
\r
374 call<T, A extends any[]>(this: new (...args: A) => T, thisArg: T, ...args: A): void;
\r
377 * For a given function, creates a bound function that has the same body as the original function.
\r
378 * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
\r
379 * @param thisArg The object to be used as the this object.
\r
380 * @param args Arguments to bind to the parameters of the function.
\r
382 bind<T>(this: T, thisArg: any): T;
\r
383 bind<A0, A extends any[], R>(this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R;
\r
384 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
385 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
386 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
387 bind<AX, R>(this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R;
\r
390 interface IArguments {
\r
391 [index: number]: any;
\r
397 /** Returns a string representation of a string. */
\r
398 toString(): string;
\r
401 * Returns the character at the specified index.
\r
402 * @param pos The zero-based index of the desired character.
\r
404 charAt(pos: number): string;
\r
407 * Returns the Unicode value of the character at the specified location.
\r
408 * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.
\r
410 charCodeAt(index: number): number;
\r
413 * Returns a string that contains the concatenation of two or more strings.
\r
414 * @param strings The strings to append to the end of the string.
\r
416 concat(...strings: string[]): string;
\r
419 * Returns the position of the first occurrence of a substring.
\r
420 * @param searchString The substring to search for in the string
\r
421 * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
\r
423 indexOf(searchString: string, position?: number): number;
\r
426 * Returns the last occurrence of a substring in the string.
\r
427 * @param searchString The substring to search for.
\r
428 * @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
\r
430 lastIndexOf(searchString: string, position?: number): number;
\r
433 * Determines whether two strings are equivalent in the current locale.
\r
434 * @param that String to compare to target string
\r
436 localeCompare(that: string): number;
\r
439 * Matches a string with a regular expression, and returns an array containing the results of that search.
\r
440 * @param regexp A variable name or string literal containing the regular expression pattern and flags.
\r
442 match(regexp: string | RegExp): RegExpMatchArray | null;
\r
445 * Replaces text in a string, using a regular expression or search string.
\r
446 * @param searchValue A string to search for.
\r
447 * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
\r
449 replace(searchValue: string | RegExp, replaceValue: string): string;
\r
452 * Replaces text in a string, using a regular expression or search string.
\r
453 * @param searchValue A string to search for.
\r
454 * @param replacer A function that returns the replacement text.
\r
456 replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
\r
459 * Finds the first substring match in a regular expression search.
\r
460 * @param regexp The regular expression pattern and applicable flags.
\r
462 search(regexp: string | RegExp): number;
\r
465 * Returns a section of a string.
\r
466 * @param start The index to the beginning of the specified portion of stringObj.
\r
467 * @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
468 * If this value is not specified, the substring continues to the end of stringObj.
\r
470 slice(start?: number, end?: number): string;
\r
473 * Split a string into substrings using the specified separator and return them as an array.
\r
474 * @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
475 * @param limit A value used to limit the number of elements returned in the array.
\r
477 split(separator: string | RegExp, limit?: number): string[];
\r
480 * Returns the substring at the specified location within a String object.
\r
481 * @param start The zero-based index number indicating the beginning of the substring.
\r
482 * @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
483 * If end is omitted, the characters from start through the end of the original string are returned.
\r
485 substring(start: number, end?: number): string;
\r
487 /** Converts all the alphabetic characters in a string to lowercase. */
\r
488 toLowerCase(): string;
\r
490 /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
\r
491 toLocaleLowerCase(locales?: string | string[]): string;
\r
493 /** Converts all the alphabetic characters in a string to uppercase. */
\r
494 toUpperCase(): string;
\r
496 /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */
\r
497 toLocaleUpperCase(locales?: string | string[]): string;
\r
499 /** Removes the leading and trailing white space and line terminator characters from a string. */
\r
502 /** Returns the length of a String object. */
\r
503 readonly length: number;
\r
507 * Gets a substring beginning at the specified location and having the specified length.
\r
508 * @deprecated A legacy feature for browser compatibility
\r
509 * @param from The starting position of the desired substring. The index of the first character in the string is zero.
\r
510 * @param length The number of characters to include in the returned substring.
\r
512 substr(from: number, length?: number): string;
\r
514 /** Returns the primitive value of the specified object. */
\r
517 readonly [index: number]: string;
\r
520 interface StringConstructor {
\r
521 new(value?: any): String;
\r
522 (value?: any): string;
\r
523 readonly prototype: String;
\r
524 fromCharCode(...codes: number[]): string;
\r
528 * Allows manipulation and formatting of text strings and determination and location of substrings within strings.
\r
530 declare var String: StringConstructor;
\r
532 interface Boolean {
\r
533 /** Returns the primitive value of the specified object. */
\r
534 valueOf(): boolean;
\r
537 interface BooleanConstructor {
\r
538 new(value?: any): Boolean;
\r
539 <T>(value?: T): boolean;
\r
540 readonly prototype: Boolean;
\r
543 declare var Boolean: BooleanConstructor;
\r
547 * Returns a string representation of an object.
\r
548 * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.
\r
550 toString(radix?: number): string;
\r
553 * Returns a string representing a number in fixed-point notation.
\r
554 * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
\r
556 toFixed(fractionDigits?: number): string;
\r
559 * Returns a string containing a number represented in exponential notation.
\r
560 * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
\r
562 toExponential(fractionDigits?: number): string;
\r
565 * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
\r
566 * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
\r
568 toPrecision(precision?: number): string;
\r
570 /** Returns the primitive value of the specified object. */
\r
574 interface NumberConstructor {
\r
575 new(value?: any): Number;
\r
576 (value?: any): number;
\r
577 readonly prototype: Number;
\r
579 /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */
\r
580 readonly MAX_VALUE: number;
\r
582 /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */
\r
583 readonly MIN_VALUE: number;
\r
586 * A value that is not a number.
\r
587 * 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
589 readonly NaN: number;
\r
592 * A value that is less than the largest negative number that can be represented in JavaScript.
\r
593 * JavaScript displays NEGATIVE_INFINITY values as -infinity.
\r
595 readonly NEGATIVE_INFINITY: number;
\r
598 * A value greater than the largest number that can be represented in JavaScript.
\r
599 * JavaScript displays POSITIVE_INFINITY values as infinity.
\r
601 readonly POSITIVE_INFINITY: number;
\r
604 /** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */
\r
605 declare var Number: NumberConstructor;
\r
607 interface TemplateStringsArray extends ReadonlyArray<string> {
\r
608 readonly raw: readonly string[];
\r
612 * The type of `import.meta`.
\r
614 * If you need to declare that a given property exists on `import.meta`,
\r
615 * this type may be augmented via interface merging.
\r
617 interface ImportMeta {
\r
621 * The type for the optional second argument to `import()`.
\r
623 * If your host environment supports additional options, this type may be
\r
624 * augmented via interface merging.
\r
626 interface ImportCallOptions {
\r
627 assert?: ImportAssertions;
\r
631 * The type for the `assert` property of the optional second argument to `import()`.
\r
633 interface ImportAssertions {
\r
634 [key: string]: string;
\r
638 /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */
\r
639 readonly E: number;
\r
640 /** The natural logarithm of 10. */
\r
641 readonly LN10: number;
\r
642 /** The natural logarithm of 2. */
\r
643 readonly LN2: number;
\r
644 /** The base-2 logarithm of e. */
\r
645 readonly LOG2E: number;
\r
646 /** The base-10 logarithm of e. */
\r
647 readonly LOG10E: number;
\r
648 /** Pi. This is the ratio of the circumference of a circle to its diameter. */
\r
649 readonly PI: number;
\r
650 /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */
\r
651 readonly SQRT1_2: number;
\r
652 /** The square root of 2. */
\r
653 readonly SQRT2: number;
\r
655 * Returns the absolute value of a number (the value without regard to whether it is positive or negative).
\r
656 * For example, the absolute value of -5 is the same as the absolute value of 5.
\r
657 * @param x A numeric expression for which the absolute value is needed.
\r
659 abs(x: number): number;
\r
661 * Returns the arc cosine (or inverse cosine) of a number.
\r
662 * @param x A numeric expression.
\r
664 acos(x: number): number;
\r
666 * Returns the arcsine of a number.
\r
667 * @param x A numeric expression.
\r
669 asin(x: number): number;
\r
671 * Returns the arctangent of a number.
\r
672 * @param x A numeric expression for which the arctangent is needed.
\r
674 atan(x: number): number;
\r
676 * Returns the angle (in radians) from the X axis to a point.
\r
677 * @param y A numeric expression representing the cartesian y-coordinate.
\r
678 * @param x A numeric expression representing the cartesian x-coordinate.
\r
680 atan2(y: number, x: number): number;
\r
682 * Returns the smallest integer greater than or equal to its numeric argument.
\r
683 * @param x A numeric expression.
\r
685 ceil(x: number): number;
\r
687 * Returns the cosine of a number.
\r
688 * @param x A numeric expression that contains an angle measured in radians.
\r
690 cos(x: number): number;
\r
692 * Returns e (the base of natural logarithms) raised to a power.
\r
693 * @param x A numeric expression representing the power of e.
\r
695 exp(x: number): number;
\r
697 * Returns the greatest integer less than or equal to its numeric argument.
\r
698 * @param x A numeric expression.
\r
700 floor(x: number): number;
\r
702 * Returns the natural logarithm (base e) of a number.
\r
703 * @param x A numeric expression.
\r
705 log(x: number): number;
\r
707 * Returns the larger of a set of supplied numeric expressions.
\r
708 * @param values Numeric expressions to be evaluated.
\r
710 max(...values: number[]): number;
\r
712 * Returns the smaller of a set of supplied numeric expressions.
\r
713 * @param values Numeric expressions to be evaluated.
\r
715 min(...values: number[]): number;
\r
717 * Returns the value of a base expression taken to a specified power.
\r
718 * @param x The base value of the expression.
\r
719 * @param y The exponent value of the expression.
\r
721 pow(x: number, y: number): number;
\r
722 /** Returns a pseudorandom number between 0 and 1. */
\r
725 * Returns a supplied numeric expression rounded to the nearest integer.
\r
726 * @param x The value to be rounded to the nearest integer.
\r
728 round(x: number): number;
\r
730 * Returns the sine of a number.
\r
731 * @param x A numeric expression that contains an angle measured in radians.
\r
733 sin(x: number): number;
\r
735 * Returns the square root of a number.
\r
736 * @param x A numeric expression.
\r
738 sqrt(x: number): number;
\r
740 * Returns the tangent of a number.
\r
741 * @param x A numeric expression that contains an angle measured in radians.
\r
743 tan(x: number): number;
\r
745 /** An intrinsic object that provides basic mathematics functionality and constants. */
\r
746 declare var Math: Math;
\r
748 /** Enables basic storage and retrieval of dates and times. */
\r
750 /** Returns a string representation of a date. The format of the string depends on the locale. */
\r
751 toString(): string;
\r
752 /** Returns a date as a string value. */
\r
753 toDateString(): string;
\r
754 /** Returns a time as a string value. */
\r
755 toTimeString(): string;
\r
756 /** Returns a value as a string value appropriate to the host environment's current locale. */
\r
757 toLocaleString(): string;
\r
758 /** Returns a date as a string value appropriate to the host environment's current locale. */
\r
759 toLocaleDateString(): string;
\r
760 /** Returns a time as a string value appropriate to the host environment's current locale. */
\r
761 toLocaleTimeString(): string;
\r
762 /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */
\r
764 /** Gets the time value in milliseconds. */
\r
766 /** Gets the year, using local time. */
\r
767 getFullYear(): number;
\r
768 /** Gets the year using Universal Coordinated Time (UTC). */
\r
769 getUTCFullYear(): number;
\r
770 /** Gets the month, using local time. */
\r
771 getMonth(): number;
\r
772 /** Gets the month of a Date object using Universal Coordinated Time (UTC). */
\r
773 getUTCMonth(): number;
\r
774 /** Gets the day-of-the-month, using local time. */
\r
776 /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */
\r
777 getUTCDate(): number;
\r
778 /** Gets the day of the week, using local time. */
\r
780 /** Gets the day of the week using Universal Coordinated Time (UTC). */
\r
781 getUTCDay(): number;
\r
782 /** Gets the hours in a date, using local time. */
\r
783 getHours(): number;
\r
784 /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */
\r
785 getUTCHours(): number;
\r
786 /** Gets the minutes of a Date object, using local time. */
\r
787 getMinutes(): number;
\r
788 /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */
\r
789 getUTCMinutes(): number;
\r
790 /** Gets the seconds of a Date object, using local time. */
\r
791 getSeconds(): number;
\r
792 /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */
\r
793 getUTCSeconds(): number;
\r
794 /** Gets the milliseconds of a Date, using local time. */
\r
795 getMilliseconds(): number;
\r
796 /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */
\r
797 getUTCMilliseconds(): number;
\r
798 /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */
\r
799 getTimezoneOffset(): number;
\r
801 * Sets the date and time value in the Date object.
\r
802 * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
\r
804 setTime(time: number): number;
\r
806 * Sets the milliseconds value in the Date object using local time.
\r
807 * @param ms A numeric value equal to the millisecond value.
\r
809 setMilliseconds(ms: number): number;
\r
811 * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
\r
812 * @param ms A numeric value equal to the millisecond value.
\r
814 setUTCMilliseconds(ms: number): number;
\r
817 * Sets the seconds value in the Date object using local time.
\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
821 setSeconds(sec: number, ms?: number): number;
\r
823 * Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
\r
824 * @param sec A numeric value equal to the seconds value.
\r
825 * @param ms A numeric value equal to the milliseconds value.
\r
827 setUTCSeconds(sec: number, ms?: number): number;
\r
829 * Sets the minutes value in the Date object using local time.
\r
830 * @param min A numeric value equal to the minutes value.
\r
831 * @param sec A numeric value equal to the seconds value.
\r
832 * @param ms A numeric value equal to the milliseconds value.
\r
834 setMinutes(min: number, sec?: number, ms?: number): number;
\r
836 * Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
\r
837 * @param min A numeric value equal to the minutes value.
\r
838 * @param sec A numeric value equal to the seconds value.
\r
839 * @param ms A numeric value equal to the milliseconds value.
\r
841 setUTCMinutes(min: number, sec?: number, ms?: number): number;
\r
843 * Sets the hour value in the Date object using local time.
\r
844 * @param hours A numeric value equal to the hours value.
\r
845 * @param min A numeric value equal to the minutes value.
\r
846 * @param sec A numeric value equal to the seconds value.
\r
847 * @param ms A numeric value equal to the milliseconds value.
\r
849 setHours(hours: number, min?: number, sec?: number, ms?: number): number;
\r
851 * Sets the hours value in the Date object using Universal Coordinated Time (UTC).
\r
852 * @param hours A numeric value equal to the hours value.
\r
853 * @param min A numeric value equal to the minutes value.
\r
854 * @param sec A numeric value equal to the seconds value.
\r
855 * @param ms A numeric value equal to the milliseconds value.
\r
857 setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
\r
859 * Sets the numeric day-of-the-month value of the Date object using local time.
\r
860 * @param date A numeric value equal to the day of the month.
\r
862 setDate(date: number): number;
\r
864 * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
\r
865 * @param date A numeric value equal to the day of the month.
\r
867 setUTCDate(date: number): number;
\r
869 * Sets the month value in the Date object using local time.
\r
870 * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
\r
871 * @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
873 setMonth(month: number, date?: number): number;
\r
875 * Sets the month value in the Date object using Universal Coordinated Time (UTC).
\r
876 * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
\r
877 * @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
879 setUTCMonth(month: number, date?: number): number;
\r
881 * Sets the year of the Date object using local time.
\r
882 * @param year A numeric value for the year.
\r
883 * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
\r
884 * @param date A numeric value equal for the day of the month.
\r
886 setFullYear(year: number, month?: number, date?: number): number;
\r
888 * Sets the year value in the Date object using Universal Coordinated Time (UTC).
\r
889 * @param year A numeric value equal to the year.
\r
890 * @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
891 * @param date A numeric value equal to the day of the month.
\r
893 setUTCFullYear(year: number, month?: number, date?: number): number;
\r
894 /** Returns a date converted to a string using Universal Coordinated Time (UTC). */
\r
895 toUTCString(): string;
\r
896 /** Returns a date as a string value in ISO format. */
\r
897 toISOString(): string;
\r
898 /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */
\r
899 toJSON(key?: any): string;
\r
902 interface DateConstructor {
\r
904 new(value: number | string): Date;
\r
905 new(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
\r
907 readonly prototype: Date;
\r
909 * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.
\r
910 * @param s A date string
\r
912 parse(s: string): number;
\r
914 * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
\r
915 * @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
916 * @param month The month as a number between 0 and 11 (January to December).
\r
917 * @param date The date as a number between 1 and 31.
\r
918 * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.
\r
919 * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.
\r
920 * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.
\r
921 * @param ms A number from 0 to 999 that specifies the milliseconds.
\r
923 UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
\r
927 declare var Date: DateConstructor;
\r
929 interface RegExpMatchArray extends Array<string> {
\r
934 interface RegExpExecArray extends Array<string> {
\r
941 * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.
\r
942 * @param string The String object or string literal on which to perform the search.
\r
944 exec(string: string): RegExpExecArray | null;
\r
947 * Returns a Boolean value that indicates whether or not a pattern exists in a searched string.
\r
948 * @param string String on which to perform the search.
\r
950 test(string: string): boolean;
\r
952 /** 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
953 readonly source: string;
\r
955 /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */
\r
956 readonly global: boolean;
\r
958 /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */
\r
959 readonly ignoreCase: boolean;
\r
961 /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */
\r
962 readonly multiline: boolean;
\r
966 // Non-standard extensions
\r
967 /** @deprecated A legacy feature for browser compatibility */
\r
968 compile(pattern: string, flags?: string): this;
\r
971 interface RegExpConstructor {
\r
972 new(pattern: RegExp | string): RegExp;
\r
973 new(pattern: string, flags?: string): RegExp;
\r
974 (pattern: RegExp | string): RegExp;
\r
975 (pattern: string, flags?: string): RegExp;
\r
976 readonly prototype: RegExp;
\r
978 // Non-standard extensions
\r
979 /** @deprecated A legacy feature for browser compatibility */
\r
981 /** @deprecated A legacy feature for browser compatibility */
\r
983 /** @deprecated A legacy feature for browser compatibility */
\r
985 /** @deprecated A legacy feature for browser compatibility */
\r
987 /** @deprecated A legacy feature for browser compatibility */
\r
989 /** @deprecated A legacy feature for browser compatibility */
\r
991 /** @deprecated A legacy feature for browser compatibility */
\r
993 /** @deprecated A legacy feature for browser compatibility */
\r
995 /** @deprecated A legacy feature for browser compatibility */
\r
997 /** @deprecated A legacy feature for browser compatibility */
\r
999 /** @deprecated A legacy feature for browser compatibility */
\r
1001 /** @deprecated A legacy feature for browser compatibility */
\r
1002 lastMatch: string;
\r
1003 /** @deprecated A legacy feature for browser compatibility */
\r
1005 /** @deprecated A legacy feature for browser compatibility */
\r
1006 lastParen: string;
\r
1007 /** @deprecated A legacy feature for browser compatibility */
\r
1009 /** @deprecated A legacy feature for browser compatibility */
\r
1010 leftContext: string;
\r
1011 /** @deprecated A legacy feature for browser compatibility */
\r
1013 /** @deprecated A legacy feature for browser compatibility */
\r
1014 rightContext: string;
\r
1015 /** @deprecated A legacy feature for browser compatibility */
\r
1019 declare var RegExp: RegExpConstructor;
\r
1027 interface ErrorConstructor {
\r
1028 new(message?: string): Error;
\r
1029 (message?: string): Error;
\r
1030 readonly prototype: Error;
\r
1033 declare var Error: ErrorConstructor;
\r
1035 interface EvalError extends Error {
\r
1038 interface EvalErrorConstructor extends ErrorConstructor {
\r
1039 new(message?: string): EvalError;
\r
1040 (message?: string): EvalError;
\r
1041 readonly prototype: EvalError;
\r
1044 declare var EvalError: EvalErrorConstructor;
\r
1046 interface RangeError extends Error {
\r
1049 interface RangeErrorConstructor extends ErrorConstructor {
\r
1050 new(message?: string): RangeError;
\r
1051 (message?: string): RangeError;
\r
1052 readonly prototype: RangeError;
\r
1055 declare var RangeError: RangeErrorConstructor;
\r
1057 interface ReferenceError extends Error {
\r
1060 interface ReferenceErrorConstructor extends ErrorConstructor {
\r
1061 new(message?: string): ReferenceError;
\r
1062 (message?: string): ReferenceError;
\r
1063 readonly prototype: ReferenceError;
\r
1066 declare var ReferenceError: ReferenceErrorConstructor;
\r
1068 interface SyntaxError extends Error {
\r
1071 interface SyntaxErrorConstructor extends ErrorConstructor {
\r
1072 new(message?: string): SyntaxError;
\r
1073 (message?: string): SyntaxError;
\r
1074 readonly prototype: SyntaxError;
\r
1077 declare var SyntaxError: SyntaxErrorConstructor;
\r
1079 interface TypeError extends Error {
\r
1082 interface TypeErrorConstructor extends ErrorConstructor {
\r
1083 new(message?: string): TypeError;
\r
1084 (message?: string): TypeError;
\r
1085 readonly prototype: TypeError;
\r
1088 declare var TypeError: TypeErrorConstructor;
\r
1090 interface URIError extends Error {
\r
1093 interface URIErrorConstructor extends ErrorConstructor {
\r
1094 new(message?: string): URIError;
\r
1095 (message?: string): URIError;
\r
1096 readonly prototype: URIError;
\r
1099 declare var URIError: URIErrorConstructor;
\r
1103 * Converts a JavaScript Object Notation (JSON) string into an object.
\r
1104 * @param text A valid JSON string.
\r
1105 * @param reviver A function that transforms the results. This function is called for each member of the object.
\r
1106 * If a member contains nested objects, the nested objects are transformed before the parent object is.
\r
1108 parse(text: string, reviver?: (this: any, key: string, value: any) => any): any;
\r
1110 * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
\r
1111 * @param value A JavaScript value, usually an object or array, to be converted.
\r
1112 * @param replacer A function that transforms the results.
\r
1113 * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
\r
1115 stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
\r
1117 * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
\r
1118 * @param value A JavaScript value, usually an object or array, to be converted.
\r
1119 * @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified.
\r
1120 * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
\r
1122 stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
\r
1126 * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
\r
1128 declare var JSON: JSON;
\r
1131 /////////////////////////////
\r
1132 /// ECMAScript Array API (specially handled by compiler)
\r
1133 /////////////////////////////
\r
1135 interface ReadonlyArray<T> {
\r
1137 * Gets the length of the array. This is a number one higher than the highest element defined in an array.
\r
1139 readonly length: number;
\r
1141 * Returns a string representation of an array.
\r
1143 toString(): string;
\r
1145 * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods.
\r
1147 toLocaleString(): string;
\r
1149 * Combines two or more arrays.
\r
1150 * @param items Additional items to add to the end of array1.
\r
1152 concat(...items: ConcatArray<T>[]): T[];
\r
1154 * Combines two or more arrays.
\r
1155 * @param items Additional items to add to the end of array1.
\r
1157 concat(...items: (T | ConcatArray<T>)[]): T[];
\r
1159 * Adds all the elements of an array separated by the specified separator string.
\r
1160 * @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
1162 join(separator?: string): string;
\r
1164 * Returns a section of an array.
\r
1165 * @param start The beginning of the specified portion of the array.
\r
1166 * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
\r
1168 slice(start?: number, end?: number): T[];
\r
1170 * Returns the index of the first occurrence of a value in an array.
\r
1171 * @param searchElement The value to locate in the array.
\r
1172 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
\r
1174 indexOf(searchElement: T, fromIndex?: number): number;
\r
1176 * Returns the index of the last occurrence of a specified value in an array.
\r
1177 * @param searchElement The value to locate in the array.
\r
1178 * @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
1180 lastIndexOf(searchElement: T, fromIndex?: number): number;
\r
1182 * Determines whether all the members of an array satisfy the specified test.
\r
1183 * @param predicate A function that accepts up to three arguments. The every method calls
\r
1184 * the predicate function for each element in the array until the predicate returns a value
\r
1185 * which is coercible to the Boolean value false, or until the end of the array.
\r
1186 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
1187 * If thisArg is omitted, undefined is used as the this value.
\r
1189 every<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): this is readonly S[];
\r
1191 * Determines whether all the members of an array satisfy the specified test.
\r
1192 * @param predicate A function that accepts up to three arguments. The every method calls
\r
1193 * the predicate function for each element in the array until the predicate returns a value
\r
1194 * which is coercible to the Boolean value false, or until the end of the array.
\r
1195 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
1196 * If thisArg is omitted, undefined is used as the this value.
\r
1198 every(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean;
\r
1200 * Determines whether the specified callback function returns true for any element of an array.
\r
1201 * @param predicate A function that accepts up to three arguments. The some method calls
\r
1202 * the predicate function for each element in the array until the predicate returns a value
\r
1203 * which is coercible to the Boolean value true, or until the end of the array.
\r
1204 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
1205 * If thisArg is omitted, undefined is used as the this value.
\r
1207 some(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean;
\r
1209 * Performs the specified action for each element in an array.
\r
1210 * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
\r
1211 * @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
1213 forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void;
\r
1215 * Calls a defined callback function on each element of an array, and returns an array that contains the results.
\r
1216 * @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
1217 * @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
1219 map<U>(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[];
\r
1221 * Returns the elements of an array that meet the condition specified in a callback function.
\r
1222 * @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
1223 * @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
1225 filter<S extends T>(predicate: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[];
\r
1227 * Returns the elements of an array that meet the condition specified in a callback function.
\r
1228 * @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
1229 * @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
1231 filter(predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[];
\r
1233 * 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
1234 * @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
1235 * @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
1237 reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T;
\r
1238 reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T;
\r
1240 * 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
1241 * @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
1242 * @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
1244 reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U;
\r
1246 * 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
1247 * @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
1248 * @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
1250 reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T;
\r
1251 reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T;
\r
1253 * 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
1254 * @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
1255 * @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
1257 reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U;
\r
1259 readonly [n: number]: T;
\r
1262 interface ConcatArray<T> {
\r
1263 readonly length: number;
\r
1264 readonly [n: number]: T;
\r
1265 join(separator?: string): string;
\r
1266 slice(start?: number, end?: number): T[];
\r
1269 interface Array<T> {
\r
1271 * Gets or sets the length of the array. This is a number one higher than the highest index in the array.
\r
1275 * Returns a string representation of an array.
\r
1277 toString(): string;
\r
1279 * Returns a string representation of an array. The elements are converted to string using their toLocaleString methods.
\r
1281 toLocaleString(): string;
\r
1283 * Removes the last element from an array and returns it.
\r
1284 * If the array is empty, undefined is returned and the array is not modified.
\r
1286 pop(): T | undefined;
\r
1288 * Appends new elements to the end of an array, and returns the new length of the array.
\r
1289 * @param items New elements to add to the array.
\r
1291 push(...items: T[]): number;
\r
1293 * Combines two or more arrays.
\r
1294 * This method returns a new array without modifying any existing arrays.
\r
1295 * @param items Additional arrays and/or items to add to the end of the array.
\r
1297 concat(...items: ConcatArray<T>[]): T[];
\r
1299 * Combines two or more arrays.
\r
1300 * This method returns a new array without modifying any existing arrays.
\r
1301 * @param items Additional arrays and/or items to add to the end of the array.
\r
1303 concat(...items: (T | ConcatArray<T>)[]): T[];
\r
1305 * Adds all the elements of an array into a string, separated by the specified separator string.
\r
1306 * @param separator A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma.
\r
1308 join(separator?: string): string;
\r
1310 * Reverses the elements in an array in place.
\r
1311 * This method mutates the array and returns a reference to the same array.
\r
1315 * Removes the first element from an array and returns it.
\r
1316 * If the array is empty, undefined is returned and the array is not modified.
\r
1318 shift(): T | undefined;
\r
1320 * Returns a copy of a section of an array.
\r
1321 * For both start and end, a negative index can be used to indicate an offset from the end of the array.
\r
1322 * For example, -2 refers to the second to last element of the array.
\r
1323 * @param start The beginning index of the specified portion of the array.
\r
1324 * If start is undefined, then the slice begins at index 0.
\r
1325 * @param end The end index of the specified portion of the array. This is exclusive of the element at the index 'end'.
\r
1326 * If end is undefined, then the slice extends to the end of the array.
\r
1328 slice(start?: number, end?: number): T[];
\r
1330 * Sorts an array in place.
\r
1331 * This method mutates the array and returns a reference to the same array.
\r
1332 * @param compareFn Function used to determine the order of the elements. It is expected to return
\r
1333 * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
\r
1334 * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
\r
1336 * [11,2,22,1].sort((a, b) => a - b)
\r
1339 sort(compareFn?: (a: T, b: T) => number): this;
\r
1341 * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
\r
1342 * @param start The zero-based location in the array from which to start removing elements.
\r
1343 * @param deleteCount The number of elements to remove.
\r
1344 * @returns An array containing the elements that were deleted.
\r
1346 splice(start: number, deleteCount?: number): T[];
\r
1348 * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
\r
1349 * @param start The zero-based location in the array from which to start removing elements.
\r
1350 * @param deleteCount The number of elements to remove.
\r
1351 * @param items Elements to insert into the array in place of the deleted elements.
\r
1352 * @returns An array containing the elements that were deleted.
\r
1354 splice(start: number, deleteCount: number, ...items: T[]): T[];
\r
1356 * Inserts new elements at the start of an array, and returns the new length of the array.
\r
1357 * @param items Elements to insert at the start of the array.
\r
1359 unshift(...items: T[]): number;
\r
1361 * Returns the index of the first occurrence of a value in an array, or -1 if it is not present.
\r
1362 * @param searchElement The value to locate in the array.
\r
1363 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
\r
1365 indexOf(searchElement: T, fromIndex?: number): number;
\r
1367 * Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present.
\r
1368 * @param searchElement The value to locate in the array.
\r
1369 * @param fromIndex The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array.
\r
1371 lastIndexOf(searchElement: T, fromIndex?: number): number;
\r
1373 * Determines whether all the members of an array satisfy the specified test.
\r
1374 * @param predicate A function that accepts up to three arguments. The every method calls
\r
1375 * the predicate function for each element in the array until the predicate returns a value
\r
1376 * which is coercible to the Boolean value false, or until the end of the array.
\r
1377 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
1378 * If thisArg is omitted, undefined is used as the this value.
\r
1380 every<S extends T>(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): this is S[];
\r
1382 * Determines whether all the members of an array satisfy the specified test.
\r
1383 * @param predicate A function that accepts up to three arguments. The every method calls
\r
1384 * the predicate function for each element in the array until the predicate returns a value
\r
1385 * which is coercible to the Boolean value false, or until the end of the array.
\r
1386 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
1387 * If thisArg is omitted, undefined is used as the this value.
\r
1389 every(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean;
\r
1391 * Determines whether the specified callback function returns true for any element of an array.
\r
1392 * @param predicate A function that accepts up to three arguments. The some method calls
\r
1393 * the predicate function for each element in the array until the predicate returns a value
\r
1394 * which is coercible to the Boolean value true, or until the end of the array.
\r
1395 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
1396 * If thisArg is omitted, undefined is used as the this value.
\r
1398 some(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean;
\r
1400 * Performs the specified action for each element in an array.
\r
1401 * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
\r
1402 * @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
1404 forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void;
\r
1406 * Calls a defined callback function on each element of an array, and returns an array that contains the results.
\r
1407 * @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
1408 * @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
1410 map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];
\r
1412 * Returns the elements of an array that meet the condition specified in a callback function.
\r
1413 * @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
1414 * @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
1416 filter<S extends T>(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[];
\r
1418 * Returns the elements of an array that meet the condition specified in a callback function.
\r
1419 * @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
1420 * @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
1422 filter(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[];
\r
1424 * 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
1425 * @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
1426 * @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
1428 reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T;
\r
1429 reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T;
\r
1431 * 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
1432 * @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
1433 * @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
1435 reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
\r
1437 * 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
1438 * @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
1439 * @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
1441 reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T;
\r
1442 reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T;
\r
1444 * 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
1445 * @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
1446 * @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
1448 reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
\r
1453 interface ArrayConstructor {
\r
1454 new(arrayLength?: number): any[];
\r
1455 new <T>(arrayLength: number): T[];
\r
1456 new <T>(...items: T[]): T[];
\r
1457 (arrayLength?: number): any[];
\r
1458 <T>(arrayLength: number): T[];
\r
1459 <T>(...items: T[]): T[];
\r
1460 isArray(arg: any): arg is any[];
\r
1461 readonly prototype: any[];
\r
1464 declare var Array: ArrayConstructor;
\r
1466 interface TypedPropertyDescriptor<T> {
\r
1467 enumerable?: boolean;
\r
1468 configurable?: boolean;
\r
1469 writable?: boolean;
\r
1472 set?: (value: T) => void;
\r
1475 declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
\r
1476 declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
\r
1477 declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
\r
1478 declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
\r
1480 declare type PromiseConstructorLike = new <T>(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) => PromiseLike<T>;
\r
1482 interface PromiseLike<T> {
\r
1484 * Attaches callbacks for the resolution and/or rejection of the Promise.
\r
1485 * @param onfulfilled The callback to execute when the Promise is resolved.
\r
1486 * @param onrejected The callback to execute when the Promise is rejected.
\r
1487 * @returns A Promise for the completion of which ever callback is executed.
\r
1489 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
1493 * Represents the completion of an asynchronous operation
\r
1495 interface Promise<T> {
\r
1497 * Attaches callbacks for the resolution and/or rejection of the Promise.
\r
1498 * @param onfulfilled The callback to execute when the Promise is resolved.
\r
1499 * @param onrejected The callback to execute when the Promise is rejected.
\r
1500 * @returns A Promise for the completion of which ever callback is executed.
\r
1502 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
1505 * Attaches a callback for only the rejection of the Promise.
\r
1506 * @param onrejected The callback to execute when the Promise is rejected.
\r
1507 * @returns A Promise for the completion of the callback.
\r
1509 catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
\r
1513 * Recursively unwraps the "awaited type" of a type. Non-promise "thenables" should resolve to `never`. This emulates the behavior of `await`.
\r
1516 T extends null | undefined ? T : // special case for `null | undefined` when not in `--strictNullChecks` mode
\r
1517 T extends object & { then(onfulfilled: infer F): any } ? // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped
\r
1518 F extends ((value: infer V) => any) ? // if the argument to `then` is callable, extracts the argument
\r
1519 Awaited<V> : // recursively unwrap the value
\r
1520 never : // the argument to `then` was not callable
\r
1521 T; // non-object or non-thenable
\r
1523 interface ArrayLike<T> {
\r
1524 readonly length: number;
\r
1525 readonly [n: number]: T;
\r
1529 * Make all properties in T optional
\r
1531 type Partial<T> = {
\r
1532 [P in keyof T]?: T[P];
\r
1536 * Make all properties in T required
\r
1538 type Required<T> = {
\r
1539 [P in keyof T]-?: T[P];
\r
1543 * Make all properties in T readonly
\r
1545 type Readonly<T> = {
\r
1546 readonly [P in keyof T]: T[P];
\r
1550 * From T, pick a set of properties whose keys are in the union K
\r
1552 type Pick<T, K extends keyof T> = {
\r
1557 * Construct a type with a set of properties K of type T
\r
1559 type Record<K extends keyof any, T> = {
\r
1564 * Exclude from T those types that are assignable to U
\r
1566 type Exclude<T, U> = T extends U ? never : T;
\r
1569 * Extract from T those types that are assignable to U
\r
1571 type Extract<T, U> = T extends U ? T : never;
\r
1574 * Construct a type with the properties of T except for those in type K.
\r
1576 type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
\r
1579 * Exclude null and undefined from T
\r
1581 type NonNullable<T> = T extends null | undefined ? never : T;
\r
1584 * Obtain the parameters of a function type in a tuple
\r
1586 type Parameters<T extends (...args: any) => any> = T extends (...args: infer P) => any ? P : never;
\r
1589 * Obtain the parameters of a constructor function type in a tuple
\r
1591 type ConstructorParameters<T extends abstract new (...args: any) => any> = T extends abstract new (...args: infer P) => any ? P : never;
\r
1594 * Obtain the return type of a function type
\r
1596 type ReturnType<T extends (...args: any) => any> = T extends (...args: any) => infer R ? R : any;
\r
1599 * Obtain the return type of a constructor function type
\r
1601 type InstanceType<T extends abstract new (...args: any) => any> = T extends abstract new (...args: any) => infer R ? R : any;
\r
1604 * Convert string literal type to uppercase
\r
1606 type Uppercase<S extends string> = intrinsic;
\r
1609 * Convert string literal type to lowercase
\r
1611 type Lowercase<S extends string> = intrinsic;
\r
1614 * Convert first character of string literal type to uppercase
\r
1616 type Capitalize<S extends string> = intrinsic;
\r
1619 * Convert first character of string literal type to lowercase
\r
1621 type Uncapitalize<S extends string> = intrinsic;
\r
1624 * Marker for contextual 'this' type
\r
1626 interface ThisType<T> { }
\r
1629 * Represents a raw buffer of binary data, which is used to store data for the
\r
1630 * different typed arrays. ArrayBuffers cannot be read from or written to directly,
\r
1631 * but can be passed to a typed array or DataView Object to interpret the raw
\r
1632 * buffer as needed.
\r
1634 interface ArrayBuffer {
\r
1636 * Read-only. The length of the ArrayBuffer (in bytes).
\r
1638 readonly byteLength: number;
\r
1641 * Returns a section of an ArrayBuffer.
\r
1643 slice(begin: number, end?: number): ArrayBuffer;
\r
1647 * Allowed ArrayBuffer types for the buffer of an ArrayBufferView and related Typed Arrays.
\r
1649 interface ArrayBufferTypes {
\r
1650 ArrayBuffer: ArrayBuffer;
\r
1652 type ArrayBufferLike = ArrayBufferTypes[keyof ArrayBufferTypes];
\r
1654 interface ArrayBufferConstructor {
\r
1655 readonly prototype: ArrayBuffer;
\r
1656 new(byteLength: number): ArrayBuffer;
\r
1657 isView(arg: any): arg is ArrayBufferView;
\r
1659 declare var ArrayBuffer: ArrayBufferConstructor;
\r
1661 interface ArrayBufferView {
\r
1663 * The ArrayBuffer instance referenced by the array.
\r
1665 buffer: ArrayBufferLike;
\r
1668 * The length in bytes of the array.
\r
1670 byteLength: number;
\r
1673 * The offset in bytes of the array.
\r
1675 byteOffset: number;
\r
1678 interface DataView {
\r
1679 readonly buffer: ArrayBuffer;
\r
1680 readonly byteLength: number;
\r
1681 readonly byteOffset: number;
\r
1683 * Gets the Float32 value at the specified byte offset from the start of the view. There is
\r
1684 * no alignment constraint; multi-byte values may be fetched from any offset.
\r
1685 * @param byteOffset The place in the buffer at which the value should be retrieved.
\r
1687 getFloat32(byteOffset: number, littleEndian?: boolean): number;
\r
1690 * Gets the Float64 value at the specified byte offset from the start of the view. There is
\r
1691 * no alignment constraint; multi-byte values may be fetched from any offset.
\r
1692 * @param byteOffset The place in the buffer at which the value should be retrieved.
\r
1694 getFloat64(byteOffset: number, littleEndian?: boolean): number;
\r
1697 * Gets the Int8 value at the specified byte offset from the start of the view. There is
\r
1698 * no alignment constraint; multi-byte values may be fetched from any offset.
\r
1699 * @param byteOffset The place in the buffer at which the value should be retrieved.
\r
1701 getInt8(byteOffset: number): number;
\r
1704 * Gets the Int16 value at the specified byte offset from the start of the view. There is
\r
1705 * no alignment constraint; multi-byte values may be fetched from any offset.
\r
1706 * @param byteOffset The place in the buffer at which the value should be retrieved.
\r
1708 getInt16(byteOffset: number, littleEndian?: boolean): number;
\r
1710 * Gets the Int32 value at the specified byte offset from the start of the view. There is
\r
1711 * no alignment constraint; multi-byte values may be fetched from any offset.
\r
1712 * @param byteOffset The place in the buffer at which the value should be retrieved.
\r
1714 getInt32(byteOffset: number, littleEndian?: boolean): number;
\r
1717 * Gets the Uint8 value at the specified byte offset from the start of the view. There is
\r
1718 * no alignment constraint; multi-byte values may be fetched from any offset.
\r
1719 * @param byteOffset The place in the buffer at which the value should be retrieved.
\r
1721 getUint8(byteOffset: number): number;
\r
1724 * Gets the Uint16 value at the specified byte offset from the start of the view. There is
\r
1725 * no alignment constraint; multi-byte values may be fetched from any offset.
\r
1726 * @param byteOffset The place in the buffer at which the value should be retrieved.
\r
1728 getUint16(byteOffset: number, littleEndian?: boolean): number;
\r
1731 * Gets the Uint32 value at the specified byte offset from the start of the view. There is
\r
1732 * no alignment constraint; multi-byte values may be fetched from any offset.
\r
1733 * @param byteOffset The place in the buffer at which the value should be retrieved.
\r
1735 getUint32(byteOffset: number, littleEndian?: boolean): number;
\r
1738 * Stores an Float32 value at the specified byte offset from the start of the view.
\r
1739 * @param byteOffset The place in the buffer at which the value should be set.
\r
1740 * @param value The value to set.
\r
1741 * @param littleEndian If false or undefined, a big-endian value should be written,
\r
1742 * otherwise a little-endian value should be written.
\r
1744 setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void;
\r
1747 * Stores an Float64 value at the specified byte offset from the start of the view.
\r
1748 * @param byteOffset The place in the buffer at which the value should be set.
\r
1749 * @param value The value to set.
\r
1750 * @param littleEndian If false or undefined, a big-endian value should be written,
\r
1751 * otherwise a little-endian value should be written.
\r
1753 setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void;
\r
1756 * Stores an Int8 value at the specified byte offset from the start of the view.
\r
1757 * @param byteOffset The place in the buffer at which the value should be set.
\r
1758 * @param value The value to set.
\r
1760 setInt8(byteOffset: number, value: number): void;
\r
1763 * Stores an Int16 value at the specified byte offset from the start of the view.
\r
1764 * @param byteOffset The place in the buffer at which the value should be set.
\r
1765 * @param value The value to set.
\r
1766 * @param littleEndian If false or undefined, a big-endian value should be written,
\r
1767 * otherwise a little-endian value should be written.
\r
1769 setInt16(byteOffset: number, value: number, littleEndian?: boolean): void;
\r
1772 * Stores an Int32 value at the specified byte offset from the start of the view.
\r
1773 * @param byteOffset The place in the buffer at which the value should be set.
\r
1774 * @param value The value to set.
\r
1775 * @param littleEndian If false or undefined, a big-endian value should be written,
\r
1776 * otherwise a little-endian value should be written.
\r
1778 setInt32(byteOffset: number, value: number, littleEndian?: boolean): void;
\r
1781 * Stores an Uint8 value at the specified byte offset from the start of the view.
\r
1782 * @param byteOffset The place in the buffer at which the value should be set.
\r
1783 * @param value The value to set.
\r
1785 setUint8(byteOffset: number, value: number): void;
\r
1788 * Stores an Uint16 value at the specified byte offset from the start of the view.
\r
1789 * @param byteOffset The place in the buffer at which the value should be set.
\r
1790 * @param value The value to set.
\r
1791 * @param littleEndian If false or undefined, a big-endian value should be written,
\r
1792 * otherwise a little-endian value should be written.
\r
1794 setUint16(byteOffset: number, value: number, littleEndian?: boolean): void;
\r
1797 * Stores an Uint32 value at the specified byte offset from the start of the view.
\r
1798 * @param byteOffset The place in the buffer at which the value should be set.
\r
1799 * @param value The value to set.
\r
1800 * @param littleEndian If false or undefined, a big-endian value should be written,
\r
1801 * otherwise a little-endian value should be written.
\r
1803 setUint32(byteOffset: number, value: number, littleEndian?: boolean): void;
\r
1806 interface DataViewConstructor {
\r
1807 readonly prototype: DataView;
\r
1808 new(buffer: ArrayBufferLike, byteOffset?: number, byteLength?: number): DataView;
\r
1810 declare var DataView: DataViewConstructor;
\r
1813 * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
\r
1814 * number of bytes could not be allocated an exception is raised.
\r
1816 interface Int8Array {
\r
1818 * The size in bytes of each element in the array.
\r
1820 readonly BYTES_PER_ELEMENT: number;
\r
1823 * The ArrayBuffer instance referenced by the array.
\r
1825 readonly buffer: ArrayBufferLike;
\r
1828 * The length in bytes of the array.
\r
1830 readonly byteLength: number;
\r
1833 * The offset in bytes of the array.
\r
1835 readonly byteOffset: number;
\r
1838 * Returns the this object after copying a section of the array identified by start and end
\r
1839 * to the same array starting at position target
\r
1840 * @param target If target is negative, it is treated as length+target where length is the
\r
1841 * length of the array.
\r
1842 * @param start If start is negative, it is treated as length+start. If end is negative, it
\r
1843 * is treated as length+end.
\r
1844 * @param end If not specified, length of the this object is used as its default value.
\r
1846 copyWithin(target: number, start: number, end?: number): this;
\r
1849 * Determines whether all the members of an array satisfy the specified test.
\r
1850 * @param predicate A function that accepts up to three arguments. The every method calls
\r
1851 * the predicate function for each element in the array until the predicate returns a value
\r
1852 * which is coercible to the Boolean value false, or until the end of the array.
\r
1853 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
1854 * If thisArg is omitted, undefined is used as the this value.
\r
1856 every(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): boolean;
\r
1859 * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
\r
1860 * @param value value to fill array section with
\r
1861 * @param start index to start filling the array at. If start is negative, it is treated as
\r
1862 * length+start where length is the length of the array.
\r
1863 * @param end index to stop filling the array at. If end is negative, it is treated as
\r
1866 fill(value: number, start?: number, end?: number): this;
\r
1869 * Returns the elements of an array that meet the condition specified in a callback function.
\r
1870 * @param predicate A function that accepts up to three arguments. The filter method calls
\r
1871 * the predicate function one time for each element in the array.
\r
1872 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
1873 * If thisArg is omitted, undefined is used as the this value.
\r
1875 filter(predicate: (value: number, index: number, array: Int8Array) => any, thisArg?: any): Int8Array;
\r
1878 * Returns the value of the first element in the array where predicate is true, and undefined
\r
1880 * @param predicate find calls predicate once for each element of the array, in ascending
\r
1881 * order, until it finds one where predicate returns true. If such an element is found, find
\r
1882 * immediately returns that element value. Otherwise, find returns undefined.
\r
1883 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
1884 * predicate. If it is not provided, undefined is used instead.
\r
1886 find(predicate: (value: number, index: number, obj: Int8Array) => boolean, thisArg?: any): number | undefined;
\r
1889 * Returns the index of the first element in the array where predicate is true, and -1
\r
1891 * @param predicate find calls predicate once for each element of the array, in ascending
\r
1892 * order, until it finds one where predicate returns true. If such an element is found,
\r
1893 * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
\r
1894 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
1895 * predicate. If it is not provided, undefined is used instead.
\r
1897 findIndex(predicate: (value: number, index: number, obj: Int8Array) => boolean, thisArg?: any): number;
\r
1900 * Performs the specified action for each element in an array.
\r
1901 * @param callbackfn A function that accepts up to three arguments. forEach calls the
\r
1902 * callbackfn function one time for each element in the array.
\r
1903 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
1904 * If thisArg is omitted, undefined is used as the this value.
\r
1906 forEach(callbackfn: (value: number, index: number, array: Int8Array) => void, thisArg?: any): void;
\r
1909 * Returns the index of the first occurrence of a value in an array.
\r
1910 * @param searchElement The value to locate in the array.
\r
1911 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
1912 * search starts at index 0.
\r
1914 indexOf(searchElement: number, fromIndex?: number): number;
\r
1917 * Adds all the elements of an array separated by the specified separator string.
\r
1918 * @param separator A string used to separate one element of an array from the next in the
\r
1919 * resulting String. If omitted, the array elements are separated with a comma.
\r
1921 join(separator?: string): string;
\r
1924 * Returns the index of the last occurrence of a value in an array.
\r
1925 * @param searchElement The value to locate in the array.
\r
1926 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
1927 * search starts at index 0.
\r
1929 lastIndexOf(searchElement: number, fromIndex?: number): number;
\r
1932 * The length of the array.
\r
1934 readonly length: number;
\r
1937 * Calls a defined callback function on each element of an array, and returns an array that
\r
1938 * contains the results.
\r
1939 * @param callbackfn A function that accepts up to three arguments. The map method calls the
\r
1940 * callbackfn function one time for each element in the array.
\r
1941 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
1942 * If thisArg is omitted, undefined is used as the this value.
\r
1944 map(callbackfn: (value: number, index: number, array: Int8Array) => number, thisArg?: any): Int8Array;
\r
1947 * Calls the specified callback function for all the elements in an array. The return value of
\r
1948 * the callback function is the accumulated result, and is provided as an argument in the next
\r
1949 * call to the callback function.
\r
1950 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
1951 * callbackfn function one time for each element in the array.
\r
1952 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
1953 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
1954 * instead of an array value.
\r
1956 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number): number;
\r
1957 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue: number): number;
\r
1960 * Calls the specified callback function for all the elements in an array. The return value of
\r
1961 * the callback function is the accumulated result, and is provided as an argument in the next
\r
1962 * call to the callback function.
\r
1963 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
1964 * callbackfn function one time for each element in the array.
\r
1965 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
1966 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
1967 * instead of an array value.
\r
1969 reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
\r
1972 * Calls the specified callback function for all the elements in an array, in descending order.
\r
1973 * The return value of the callback function is the accumulated result, and is provided as an
\r
1974 * argument in the next call to the callback function.
\r
1975 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
1976 * the callbackfn function one time for each element in the array.
\r
1977 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
1978 * the accumulation. The first call to the callbackfn function provides this value as an
\r
1979 * argument instead of an array value.
\r
1981 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number): number;
\r
1982 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue: number): number;
\r
1985 * Calls the specified callback function for all the elements in an array, in descending order.
\r
1986 * The return value of the callback function is the accumulated result, and is provided as an
\r
1987 * argument in the next call to the callback function.
\r
1988 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
1989 * the callbackfn function one time for each element in the array.
\r
1990 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
1991 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
1992 * instead of an array value.
\r
1994 reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
\r
1997 * Reverses the elements in an Array.
\r
1999 reverse(): Int8Array;
\r
2002 * Sets a value or an array of values.
\r
2003 * @param array A typed or untyped array of values to set.
\r
2004 * @param offset The index in the current array at which the values are to be written.
\r
2006 set(array: ArrayLike<number>, offset?: number): void;
\r
2009 * Returns a section of an array.
\r
2010 * @param start The beginning of the specified portion of the array.
\r
2011 * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
\r
2013 slice(start?: number, end?: number): Int8Array;
\r
2016 * Determines whether the specified callback function returns true for any element of an array.
\r
2017 * @param predicate A function that accepts up to three arguments. The some method calls
\r
2018 * the predicate function for each element in the array until the predicate returns a value
\r
2019 * which is coercible to the Boolean value true, or until the end of the array.
\r
2020 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
2021 * If thisArg is omitted, undefined is used as the this value.
\r
2023 some(predicate: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): boolean;
\r
2027 * @param compareFn Function used to determine the order of the elements. It is expected to return
\r
2028 * a negative value if first argument is less than second argument, zero if they're equal and a positive
\r
2029 * value otherwise. If omitted, the elements are sorted in ascending order.
\r
2031 * [11,2,22,1].sort((a, b) => a - b)
\r
2034 sort(compareFn?: (a: number, b: number) => number): this;
\r
2037 * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements
\r
2038 * at begin, inclusive, up to end, exclusive.
\r
2039 * @param begin The index of the beginning of the array.
\r
2040 * @param end The index of the end of the array.
\r
2042 subarray(begin?: number, end?: number): Int8Array;
\r
2045 * Converts a number to a string by using the current locale.
\r
2047 toLocaleString(): string;
\r
2050 * Returns a string representation of an array.
\r
2052 toString(): string;
\r
2054 /** Returns the primitive value of the specified object. */
\r
2055 valueOf(): Int8Array;
\r
2057 [index: number]: number;
\r
2059 interface Int8ArrayConstructor {
\r
2060 readonly prototype: Int8Array;
\r
2061 new(length: number): Int8Array;
\r
2062 new(array: ArrayLike<number> | ArrayBufferLike): Int8Array;
\r
2063 new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int8Array;
\r
2066 * The size in bytes of each element in the array.
\r
2068 readonly BYTES_PER_ELEMENT: number;
\r
2071 * Returns a new array from a set of elements.
\r
2072 * @param items A set of elements to include in the new array object.
\r
2074 of(...items: number[]): Int8Array;
\r
2077 * Creates an array from an array-like or iterable object.
\r
2078 * @param arrayLike An array-like or iterable object to convert to an array.
\r
2080 from(arrayLike: ArrayLike<number>): Int8Array;
\r
2083 * Creates an array from an array-like or iterable object.
\r
2084 * @param arrayLike An array-like or iterable object to convert to an array.
\r
2085 * @param mapfn A mapping function to call on every element of the array.
\r
2086 * @param thisArg Value of 'this' used to invoke the mapfn.
\r
2088 from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array;
\r
2092 declare var Int8Array: Int8ArrayConstructor;
\r
2095 * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
\r
2096 * requested number of bytes could not be allocated an exception is raised.
\r
2098 interface Uint8Array {
\r
2100 * The size in bytes of each element in the array.
\r
2102 readonly BYTES_PER_ELEMENT: number;
\r
2105 * The ArrayBuffer instance referenced by the array.
\r
2107 readonly buffer: ArrayBufferLike;
\r
2110 * The length in bytes of the array.
\r
2112 readonly byteLength: number;
\r
2115 * The offset in bytes of the array.
\r
2117 readonly byteOffset: number;
\r
2120 * Returns the this object after copying a section of the array identified by start and end
\r
2121 * to the same array starting at position target
\r
2122 * @param target If target is negative, it is treated as length+target where length is the
\r
2123 * length of the array.
\r
2124 * @param start If start is negative, it is treated as length+start. If end is negative, it
\r
2125 * is treated as length+end.
\r
2126 * @param end If not specified, length of the this object is used as its default value.
\r
2128 copyWithin(target: number, start: number, end?: number): this;
\r
2131 * Determines whether all the members of an array satisfy the specified test.
\r
2132 * @param predicate A function that accepts up to three arguments. The every method calls
\r
2133 * the predicate function for each element in the array until the predicate returns a value
\r
2134 * which is coercible to the Boolean value false, or until the end of the array.
\r
2135 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
2136 * If thisArg is omitted, undefined is used as the this value.
\r
2138 every(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): boolean;
\r
2141 * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
\r
2142 * @param value value to fill array section with
\r
2143 * @param start index to start filling the array at. If start is negative, it is treated as
\r
2144 * length+start where length is the length of the array.
\r
2145 * @param end index to stop filling the array at. If end is negative, it is treated as
\r
2148 fill(value: number, start?: number, end?: number): this;
\r
2151 * Returns the elements of an array that meet the condition specified in a callback function.
\r
2152 * @param predicate A function that accepts up to three arguments. The filter method calls
\r
2153 * the predicate function one time for each element in the array.
\r
2154 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
2155 * If thisArg is omitted, undefined is used as the this value.
\r
2157 filter(predicate: (value: number, index: number, array: Uint8Array) => any, thisArg?: any): Uint8Array;
\r
2160 * Returns the value of the first element in the array where predicate is true, and undefined
\r
2162 * @param predicate find calls predicate once for each element of the array, in ascending
\r
2163 * order, until it finds one where predicate returns true. If such an element is found, find
\r
2164 * immediately returns that element value. Otherwise, find returns undefined.
\r
2165 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
2166 * predicate. If it is not provided, undefined is used instead.
\r
2168 find(predicate: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number | undefined;
\r
2171 * Returns the index of the first element in the array where predicate is true, and -1
\r
2173 * @param predicate find calls predicate once for each element of the array, in ascending
\r
2174 * order, until it finds one where predicate returns true. If such an element is found,
\r
2175 * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
\r
2176 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
2177 * predicate. If it is not provided, undefined is used instead.
\r
2179 findIndex(predicate: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number;
\r
2182 * Performs the specified action for each element in an array.
\r
2183 * @param callbackfn A function that accepts up to three arguments. forEach calls the
\r
2184 * callbackfn function one time for each element in the array.
\r
2185 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2186 * If thisArg is omitted, undefined is used as the this value.
\r
2188 forEach(callbackfn: (value: number, index: number, array: Uint8Array) => void, thisArg?: any): void;
\r
2191 * Returns the index of the first occurrence of a value in an array.
\r
2192 * @param searchElement The value to locate in the array.
\r
2193 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
2194 * search starts at index 0.
\r
2196 indexOf(searchElement: number, fromIndex?: number): number;
\r
2199 * Adds all the elements of an array separated by the specified separator string.
\r
2200 * @param separator A string used to separate one element of an array from the next in the
\r
2201 * resulting String. If omitted, the array elements are separated with a comma.
\r
2203 join(separator?: string): string;
\r
2206 * Returns the index of the last occurrence of a value in an array.
\r
2207 * @param searchElement The value to locate in the array.
\r
2208 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
2209 * search starts at index 0.
\r
2211 lastIndexOf(searchElement: number, fromIndex?: number): number;
\r
2214 * The length of the array.
\r
2216 readonly length: number;
\r
2219 * Calls a defined callback function on each element of an array, and returns an array that
\r
2220 * contains the results.
\r
2221 * @param callbackfn A function that accepts up to three arguments. The map method calls the
\r
2222 * callbackfn function one time for each element in the array.
\r
2223 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2224 * If thisArg is omitted, undefined is used as the this value.
\r
2226 map(callbackfn: (value: number, index: number, array: Uint8Array) => number, thisArg?: any): Uint8Array;
\r
2229 * Calls the specified callback function for all the elements in an array. The return value of
\r
2230 * the callback function is the accumulated result, and is provided as an argument in the next
\r
2231 * call to the callback function.
\r
2232 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
2233 * callbackfn function one time for each element in the array.
\r
2234 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2235 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
2236 * instead of an array value.
\r
2238 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number): number;
\r
2239 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue: number): number;
\r
2242 * Calls the specified callback function for all the elements in an array. The return value of
\r
2243 * the callback function is the accumulated result, and is provided as an argument in the next
\r
2244 * call to the callback function.
\r
2245 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
2246 * callbackfn function one time for each element in the array.
\r
2247 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2248 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
2249 * instead of an array value.
\r
2251 reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
\r
2254 * Calls the specified callback function for all the elements in an array, in descending order.
\r
2255 * The return value of the callback function is the accumulated result, and is provided as an
\r
2256 * argument in the next call to the callback function.
\r
2257 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
2258 * the callbackfn function one time for each element in the array.
\r
2259 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2260 * the accumulation. The first call to the callbackfn function provides this value as an
\r
2261 * argument instead of an array value.
\r
2263 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number): number;
\r
2264 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue: number): number;
\r
2267 * Calls the specified callback function for all the elements in an array, in descending order.
\r
2268 * The return value of the callback function is the accumulated result, and is provided as an
\r
2269 * argument in the next call to the callback function.
\r
2270 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
2271 * the callbackfn function one time for each element in the array.
\r
2272 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2273 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
2274 * instead of an array value.
\r
2276 reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
\r
2279 * Reverses the elements in an Array.
\r
2281 reverse(): Uint8Array;
\r
2284 * Sets a value or an array of values.
\r
2285 * @param array A typed or untyped array of values to set.
\r
2286 * @param offset The index in the current array at which the values are to be written.
\r
2288 set(array: ArrayLike<number>, offset?: number): void;
\r
2291 * Returns a section of an array.
\r
2292 * @param start The beginning of the specified portion of the array.
\r
2293 * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
\r
2295 slice(start?: number, end?: number): Uint8Array;
\r
2298 * Determines whether the specified callback function returns true for any element of an array.
\r
2299 * @param predicate A function that accepts up to three arguments. The some method calls
\r
2300 * the predicate function for each element in the array until the predicate returns a value
\r
2301 * which is coercible to the Boolean value true, or until the end of the array.
\r
2302 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
2303 * If thisArg is omitted, undefined is used as the this value.
\r
2305 some(predicate: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): boolean;
\r
2309 * @param compareFn Function used to determine the order of the elements. It is expected to return
\r
2310 * a negative value if first argument is less than second argument, zero if they're equal and a positive
\r
2311 * value otherwise. If omitted, the elements are sorted in ascending order.
\r
2313 * [11,2,22,1].sort((a, b) => a - b)
\r
2316 sort(compareFn?: (a: number, b: number) => number): this;
\r
2319 * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements
\r
2320 * at begin, inclusive, up to end, exclusive.
\r
2321 * @param begin The index of the beginning of the array.
\r
2322 * @param end The index of the end of the array.
\r
2324 subarray(begin?: number, end?: number): Uint8Array;
\r
2327 * Converts a number to a string by using the current locale.
\r
2329 toLocaleString(): string;
\r
2332 * Returns a string representation of an array.
\r
2334 toString(): string;
\r
2336 /** Returns the primitive value of the specified object. */
\r
2337 valueOf(): Uint8Array;
\r
2339 [index: number]: number;
\r
2342 interface Uint8ArrayConstructor {
\r
2343 readonly prototype: Uint8Array;
\r
2344 new(length: number): Uint8Array;
\r
2345 new(array: ArrayLike<number> | ArrayBufferLike): Uint8Array;
\r
2346 new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8Array;
\r
2349 * The size in bytes of each element in the array.
\r
2351 readonly BYTES_PER_ELEMENT: number;
\r
2354 * Returns a new array from a set of elements.
\r
2355 * @param items A set of elements to include in the new array object.
\r
2357 of(...items: number[]): Uint8Array;
\r
2360 * Creates an array from an array-like or iterable object.
\r
2361 * @param arrayLike An array-like or iterable object to convert to an array.
\r
2363 from(arrayLike: ArrayLike<number>): Uint8Array;
\r
2366 * Creates an array from an array-like or iterable object.
\r
2367 * @param arrayLike An array-like or iterable object to convert to an array.
\r
2368 * @param mapfn A mapping function to call on every element of the array.
\r
2369 * @param thisArg Value of 'this' used to invoke the mapfn.
\r
2371 from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array;
\r
2374 declare var Uint8Array: Uint8ArrayConstructor;
\r
2377 * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
\r
2378 * If the requested number of bytes could not be allocated an exception is raised.
\r
2380 interface Uint8ClampedArray {
\r
2382 * The size in bytes of each element in the array.
\r
2384 readonly BYTES_PER_ELEMENT: number;
\r
2387 * The ArrayBuffer instance referenced by the array.
\r
2389 readonly buffer: ArrayBufferLike;
\r
2392 * The length in bytes of the array.
\r
2394 readonly byteLength: number;
\r
2397 * The offset in bytes of the array.
\r
2399 readonly byteOffset: number;
\r
2402 * Returns the this object after copying a section of the array identified by start and end
\r
2403 * to the same array starting at position target
\r
2404 * @param target If target is negative, it is treated as length+target where length is the
\r
2405 * length of the array.
\r
2406 * @param start If start is negative, it is treated as length+start. If end is negative, it
\r
2407 * is treated as length+end.
\r
2408 * @param end If not specified, length of the this object is used as its default value.
\r
2410 copyWithin(target: number, start: number, end?: number): this;
\r
2413 * Determines whether all the members of an array satisfy the specified test.
\r
2414 * @param predicate A function that accepts up to three arguments. The every method calls
\r
2415 * the predicate function for each element in the array until the predicate returns a value
\r
2416 * which is coercible to the Boolean value false, or until the end of the array.
\r
2417 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
2418 * If thisArg is omitted, undefined is used as the this value.
\r
2420 every(predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): boolean;
\r
2423 * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
\r
2424 * @param value value to fill array section with
\r
2425 * @param start index to start filling the array at. If start is negative, it is treated as
\r
2426 * length+start where length is the length of the array.
\r
2427 * @param end index to stop filling the array at. If end is negative, it is treated as
\r
2430 fill(value: number, start?: number, end?: number): this;
\r
2433 * Returns the elements of an array that meet the condition specified in a callback function.
\r
2434 * @param predicate A function that accepts up to three arguments. The filter method calls
\r
2435 * the predicate function one time for each element in the array.
\r
2436 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
2437 * If thisArg is omitted, undefined is used as the this value.
\r
2439 filter(predicate: (value: number, index: number, array: Uint8ClampedArray) => any, thisArg?: any): Uint8ClampedArray;
\r
2442 * Returns the value of the first element in the array where predicate is true, and undefined
\r
2444 * @param predicate find calls predicate once for each element of the array, in ascending
\r
2445 * order, until it finds one where predicate returns true. If such an element is found, find
\r
2446 * immediately returns that element value. Otherwise, find returns undefined.
\r
2447 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
2448 * predicate. If it is not provided, undefined is used instead.
\r
2450 find(predicate: (value: number, index: number, obj: Uint8ClampedArray) => boolean, thisArg?: any): number | undefined;
\r
2453 * Returns the index of the first element in the array where predicate is true, and -1
\r
2455 * @param predicate find calls predicate once for each element of the array, in ascending
\r
2456 * order, until it finds one where predicate returns true. If such an element is found,
\r
2457 * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
\r
2458 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
2459 * predicate. If it is not provided, undefined is used instead.
\r
2461 findIndex(predicate: (value: number, index: number, obj: Uint8ClampedArray) => boolean, thisArg?: any): number;
\r
2464 * Performs the specified action for each element in an array.
\r
2465 * @param callbackfn A function that accepts up to three arguments. forEach calls the
\r
2466 * callbackfn function one time for each element in the array.
\r
2467 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2468 * If thisArg is omitted, undefined is used as the this value.
\r
2470 forEach(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => void, thisArg?: any): void;
\r
2473 * Returns the index of the first occurrence of a value in an array.
\r
2474 * @param searchElement The value to locate in the array.
\r
2475 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
2476 * search starts at index 0.
\r
2478 indexOf(searchElement: number, fromIndex?: number): number;
\r
2481 * Adds all the elements of an array separated by the specified separator string.
\r
2482 * @param separator A string used to separate one element of an array from the next in the
\r
2483 * resulting String. If omitted, the array elements are separated with a comma.
\r
2485 join(separator?: string): string;
\r
2488 * Returns the index of the last occurrence of a value in an array.
\r
2489 * @param searchElement The value to locate in the array.
\r
2490 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
2491 * search starts at index 0.
\r
2493 lastIndexOf(searchElement: number, fromIndex?: number): number;
\r
2496 * The length of the array.
\r
2498 readonly length: number;
\r
2501 * Calls a defined callback function on each element of an array, and returns an array that
\r
2502 * contains the results.
\r
2503 * @param callbackfn A function that accepts up to three arguments. The map method calls the
\r
2504 * callbackfn function one time for each element in the array.
\r
2505 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2506 * If thisArg is omitted, undefined is used as the this value.
\r
2508 map(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => number, thisArg?: any): Uint8ClampedArray;
\r
2511 * Calls the specified callback function for all the elements in an array. The return value of
\r
2512 * the callback function is the accumulated result, and is provided as an argument in the next
\r
2513 * call to the callback function.
\r
2514 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
2515 * callbackfn function one time for each element in the array.
\r
2516 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2517 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
2518 * instead of an array value.
\r
2520 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number): number;
\r
2521 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue: number): number;
\r
2524 * Calls the specified callback function for all the elements in an array. The return value of
\r
2525 * the callback function is the accumulated result, and is provided as an argument in the next
\r
2526 * call to the callback function.
\r
2527 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
2528 * callbackfn function one time for each element in the array.
\r
2529 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2530 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
2531 * instead of an array value.
\r
2533 reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
\r
2536 * Calls the specified callback function for all the elements in an array, in descending order.
\r
2537 * The return value of the callback function is the accumulated result, and is provided as an
\r
2538 * argument in the next call to the callback function.
\r
2539 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
2540 * the callbackfn function one time for each element in the array.
\r
2541 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2542 * the accumulation. The first call to the callbackfn function provides this value as an
\r
2543 * argument instead of an array value.
\r
2545 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number): number;
\r
2546 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue: number): number;
\r
2549 * Calls the specified callback function for all the elements in an array, in descending order.
\r
2550 * The return value of the callback function is the accumulated result, and is provided as an
\r
2551 * argument in the next call to the callback function.
\r
2552 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
2553 * the callbackfn function one time for each element in the array.
\r
2554 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2555 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
2556 * instead of an array value.
\r
2558 reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
\r
2561 * Reverses the elements in an Array.
\r
2563 reverse(): Uint8ClampedArray;
\r
2566 * Sets a value or an array of values.
\r
2567 * @param array A typed or untyped array of values to set.
\r
2568 * @param offset The index in the current array at which the values are to be written.
\r
2570 set(array: ArrayLike<number>, offset?: number): void;
\r
2573 * Returns a section of an array.
\r
2574 * @param start The beginning of the specified portion of the array.
\r
2575 * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
\r
2577 slice(start?: number, end?: number): Uint8ClampedArray;
\r
2580 * Determines whether the specified callback function returns true for any element of an array.
\r
2581 * @param predicate A function that accepts up to three arguments. The some method calls
\r
2582 * the predicate function for each element in the array until the predicate returns a value
\r
2583 * which is coercible to the Boolean value true, or until the end of the array.
\r
2584 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
2585 * If thisArg is omitted, undefined is used as the this value.
\r
2587 some(predicate: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): boolean;
\r
2591 * @param compareFn Function used to determine the order of the elements. It is expected to return
\r
2592 * a negative value if first argument is less than second argument, zero if they're equal and a positive
\r
2593 * value otherwise. If omitted, the elements are sorted in ascending order.
\r
2595 * [11,2,22,1].sort((a, b) => a - b)
\r
2598 sort(compareFn?: (a: number, b: number) => number): this;
\r
2601 * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements
\r
2602 * at begin, inclusive, up to end, exclusive.
\r
2603 * @param begin The index of the beginning of the array.
\r
2604 * @param end The index of the end of the array.
\r
2606 subarray(begin?: number, end?: number): Uint8ClampedArray;
\r
2609 * Converts a number to a string by using the current locale.
\r
2611 toLocaleString(): string;
\r
2614 * Returns a string representation of an array.
\r
2616 toString(): string;
\r
2618 /** Returns the primitive value of the specified object. */
\r
2619 valueOf(): Uint8ClampedArray;
\r
2621 [index: number]: number;
\r
2624 interface Uint8ClampedArrayConstructor {
\r
2625 readonly prototype: Uint8ClampedArray;
\r
2626 new(length: number): Uint8ClampedArray;
\r
2627 new(array: ArrayLike<number> | ArrayBufferLike): Uint8ClampedArray;
\r
2628 new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8ClampedArray;
\r
2631 * The size in bytes of each element in the array.
\r
2633 readonly BYTES_PER_ELEMENT: number;
\r
2636 * Returns a new array from a set of elements.
\r
2637 * @param items A set of elements to include in the new array object.
\r
2639 of(...items: number[]): Uint8ClampedArray;
\r
2642 * Creates an array from an array-like or iterable object.
\r
2643 * @param arrayLike An array-like or iterable object to convert to an array.
\r
2645 from(arrayLike: ArrayLike<number>): Uint8ClampedArray;
\r
2648 * Creates an array from an array-like or iterable object.
\r
2649 * @param arrayLike An array-like or iterable object to convert to an array.
\r
2650 * @param mapfn A mapping function to call on every element of the array.
\r
2651 * @param thisArg Value of 'this' used to invoke the mapfn.
\r
2653 from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray;
\r
2655 declare var Uint8ClampedArray: Uint8ClampedArrayConstructor;
\r
2658 * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
\r
2659 * requested number of bytes could not be allocated an exception is raised.
\r
2661 interface Int16Array {
\r
2663 * The size in bytes of each element in the array.
\r
2665 readonly BYTES_PER_ELEMENT: number;
\r
2668 * The ArrayBuffer instance referenced by the array.
\r
2670 readonly buffer: ArrayBufferLike;
\r
2673 * The length in bytes of the array.
\r
2675 readonly byteLength: number;
\r
2678 * The offset in bytes of the array.
\r
2680 readonly byteOffset: number;
\r
2683 * Returns the this object after copying a section of the array identified by start and end
\r
2684 * to the same array starting at position target
\r
2685 * @param target If target is negative, it is treated as length+target where length is the
\r
2686 * length of the array.
\r
2687 * @param start If start is negative, it is treated as length+start. If end is negative, it
\r
2688 * is treated as length+end.
\r
2689 * @param end If not specified, length of the this object is used as its default value.
\r
2691 copyWithin(target: number, start: number, end?: number): this;
\r
2694 * Determines whether all the members of an array satisfy the specified test.
\r
2695 * @param predicate A function that accepts up to three arguments. The every method calls
\r
2696 * the predicate function for each element in the array until the predicate returns a value
\r
2697 * which is coercible to the Boolean value false, or until the end of the array.
\r
2698 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
2699 * If thisArg is omitted, undefined is used as the this value.
\r
2701 every(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): boolean;
\r
2704 * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
\r
2705 * @param value value to fill array section with
\r
2706 * @param start index to start filling the array at. If start is negative, it is treated as
\r
2707 * length+start where length is the length of the array.
\r
2708 * @param end index to stop filling the array at. If end is negative, it is treated as
\r
2711 fill(value: number, start?: number, end?: number): this;
\r
2714 * Returns the elements of an array that meet the condition specified in a callback function.
\r
2715 * @param predicate A function that accepts up to three arguments. The filter method calls
\r
2716 * the predicate function one time for each element in the array.
\r
2717 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
2718 * If thisArg is omitted, undefined is used as the this value.
\r
2720 filter(predicate: (value: number, index: number, array: Int16Array) => any, thisArg?: any): Int16Array;
\r
2723 * Returns the value of the first element in the array where predicate is true, and undefined
\r
2725 * @param predicate find calls predicate once for each element of the array, in ascending
\r
2726 * order, until it finds one where predicate returns true. If such an element is found, find
\r
2727 * immediately returns that element value. Otherwise, find returns undefined.
\r
2728 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
2729 * predicate. If it is not provided, undefined is used instead.
\r
2731 find(predicate: (value: number, index: number, obj: Int16Array) => boolean, thisArg?: any): number | undefined;
\r
2734 * Returns the index of the first element in the array where predicate is true, and -1
\r
2736 * @param predicate find calls predicate once for each element of the array, in ascending
\r
2737 * order, until it finds one where predicate returns true. If such an element is found,
\r
2738 * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
\r
2739 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
2740 * predicate. If it is not provided, undefined is used instead.
\r
2742 findIndex(predicate: (value: number, index: number, obj: Int16Array) => boolean, thisArg?: any): number;
\r
2745 * Performs the specified action for each element in an array.
\r
2746 * @param callbackfn A function that accepts up to three arguments. forEach calls the
\r
2747 * callbackfn function one time for each element in the array.
\r
2748 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2749 * If thisArg is omitted, undefined is used as the this value.
\r
2751 forEach(callbackfn: (value: number, index: number, array: Int16Array) => void, thisArg?: any): void;
\r
2753 * Returns the index of the first occurrence of a value in an array.
\r
2754 * @param searchElement The value to locate in the array.
\r
2755 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
2756 * search starts at index 0.
\r
2758 indexOf(searchElement: number, fromIndex?: number): number;
\r
2761 * Adds all the elements of an array separated by the specified separator string.
\r
2762 * @param separator A string used to separate one element of an array from the next in the
\r
2763 * resulting String. If omitted, the array elements are separated with a comma.
\r
2765 join(separator?: string): string;
\r
2768 * Returns the index of the last occurrence of a value in an array.
\r
2769 * @param searchElement The value to locate in the array.
\r
2770 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
2771 * search starts at index 0.
\r
2773 lastIndexOf(searchElement: number, fromIndex?: number): number;
\r
2776 * The length of the array.
\r
2778 readonly length: number;
\r
2781 * Calls a defined callback function on each element of an array, and returns an array that
\r
2782 * contains the results.
\r
2783 * @param callbackfn A function that accepts up to three arguments. The map method calls the
\r
2784 * callbackfn function one time for each element in the array.
\r
2785 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2786 * If thisArg is omitted, undefined is used as the this value.
\r
2788 map(callbackfn: (value: number, index: number, array: Int16Array) => number, thisArg?: any): Int16Array;
\r
2791 * Calls the specified callback function for all the elements in an array. The return value of
\r
2792 * the callback function is the accumulated result, and is provided as an argument in the next
\r
2793 * call to the callback function.
\r
2794 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
2795 * callbackfn function one time for each element in the array.
\r
2796 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2797 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
2798 * instead of an array value.
\r
2800 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number): number;
\r
2801 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue: number): number;
\r
2804 * Calls the specified callback function for all the elements in an array. The return value of
\r
2805 * the callback function is the accumulated result, and is provided as an argument in the next
\r
2806 * call to the callback function.
\r
2807 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
2808 * callbackfn function one time for each element in the array.
\r
2809 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2810 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
2811 * instead of an array value.
\r
2813 reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
\r
2816 * Calls the specified callback function for all the elements in an array, in descending order.
\r
2817 * The return value of the callback function is the accumulated result, and is provided as an
\r
2818 * argument in the next call to the callback function.
\r
2819 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
2820 * the callbackfn function one time for each element in the array.
\r
2821 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2822 * the accumulation. The first call to the callbackfn function provides this value as an
\r
2823 * argument instead of an array value.
\r
2825 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number): number;
\r
2826 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue: number): number;
\r
2829 * Calls the specified callback function for all the elements in an array, in descending order.
\r
2830 * The return value of the callback function is the accumulated result, and is provided as an
\r
2831 * argument in the next call to the callback function.
\r
2832 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
2833 * the callbackfn function one time for each element in the array.
\r
2834 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2835 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
2836 * instead of an array value.
\r
2838 reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
\r
2841 * Reverses the elements in an Array.
\r
2843 reverse(): Int16Array;
\r
2846 * Sets a value or an array of values.
\r
2847 * @param array A typed or untyped array of values to set.
\r
2848 * @param offset The index in the current array at which the values are to be written.
\r
2850 set(array: ArrayLike<number>, offset?: number): void;
\r
2853 * Returns a section of an array.
\r
2854 * @param start The beginning of the specified portion of the array.
\r
2855 * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
\r
2857 slice(start?: number, end?: number): Int16Array;
\r
2860 * Determines whether the specified callback function returns true for any element of an array.
\r
2861 * @param predicate A function that accepts up to three arguments. The some method calls
\r
2862 * the predicate function for each element in the array until the predicate returns a value
\r
2863 * which is coercible to the Boolean value true, or until the end of the array.
\r
2864 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
2865 * If thisArg is omitted, undefined is used as the this value.
\r
2867 some(predicate: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): boolean;
\r
2871 * @param compareFn Function used to determine the order of the elements. It is expected to return
\r
2872 * a negative value if first argument is less than second argument, zero if they're equal and a positive
\r
2873 * value otherwise. If omitted, the elements are sorted in ascending order.
\r
2875 * [11,2,22,1].sort((a, b) => a - b)
\r
2878 sort(compareFn?: (a: number, b: number) => number): this;
\r
2881 * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements
\r
2882 * at begin, inclusive, up to end, exclusive.
\r
2883 * @param begin The index of the beginning of the array.
\r
2884 * @param end The index of the end of the array.
\r
2886 subarray(begin?: number, end?: number): Int16Array;
\r
2889 * Converts a number to a string by using the current locale.
\r
2891 toLocaleString(): string;
\r
2894 * Returns a string representation of an array.
\r
2896 toString(): string;
\r
2898 /** Returns the primitive value of the specified object. */
\r
2899 valueOf(): Int16Array;
\r
2901 [index: number]: number;
\r
2904 interface Int16ArrayConstructor {
\r
2905 readonly prototype: Int16Array;
\r
2906 new(length: number): Int16Array;
\r
2907 new(array: ArrayLike<number> | ArrayBufferLike): Int16Array;
\r
2908 new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int16Array;
\r
2911 * The size in bytes of each element in the array.
\r
2913 readonly BYTES_PER_ELEMENT: number;
\r
2916 * Returns a new array from a set of elements.
\r
2917 * @param items A set of elements to include in the new array object.
\r
2919 of(...items: number[]): Int16Array;
\r
2922 * Creates an array from an array-like or iterable object.
\r
2923 * @param arrayLike An array-like or iterable object to convert to an array.
\r
2925 from(arrayLike: ArrayLike<number>): Int16Array;
\r
2928 * Creates an array from an array-like or iterable object.
\r
2929 * @param arrayLike An array-like or iterable object to convert to an array.
\r
2930 * @param mapfn A mapping function to call on every element of the array.
\r
2931 * @param thisArg Value of 'this' used to invoke the mapfn.
\r
2933 from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array;
\r
2937 declare var Int16Array: Int16ArrayConstructor;
\r
2940 * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
\r
2941 * requested number of bytes could not be allocated an exception is raised.
\r
2943 interface Uint16Array {
\r
2945 * The size in bytes of each element in the array.
\r
2947 readonly BYTES_PER_ELEMENT: number;
\r
2950 * The ArrayBuffer instance referenced by the array.
\r
2952 readonly buffer: ArrayBufferLike;
\r
2955 * The length in bytes of the array.
\r
2957 readonly byteLength: number;
\r
2960 * The offset in bytes of the array.
\r
2962 readonly byteOffset: number;
\r
2965 * Returns the this object after copying a section of the array identified by start and end
\r
2966 * to the same array starting at position target
\r
2967 * @param target If target is negative, it is treated as length+target where length is the
\r
2968 * length of the array.
\r
2969 * @param start If start is negative, it is treated as length+start. If end is negative, it
\r
2970 * is treated as length+end.
\r
2971 * @param end If not specified, length of the this object is used as its default value.
\r
2973 copyWithin(target: number, start: number, end?: number): this;
\r
2976 * Determines whether all the members of an array satisfy the specified test.
\r
2977 * @param predicate A function that accepts up to three arguments. The every method calls
\r
2978 * the predicate function for each element in the array until the predicate returns a value
\r
2979 * which is coercible to the Boolean value false, or until the end of the array.
\r
2980 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
2981 * If thisArg is omitted, undefined is used as the this value.
\r
2983 every(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): boolean;
\r
2986 * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
\r
2987 * @param value value to fill array section with
\r
2988 * @param start index to start filling the array at. If start is negative, it is treated as
\r
2989 * length+start where length is the length of the array.
\r
2990 * @param end index to stop filling the array at. If end is negative, it is treated as
\r
2993 fill(value: number, start?: number, end?: number): this;
\r
2996 * Returns the elements of an array that meet the condition specified in a callback function.
\r
2997 * @param predicate A function that accepts up to three arguments. The filter method calls
\r
2998 * the predicate function one time for each element in the array.
\r
2999 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
3000 * If thisArg is omitted, undefined is used as the this value.
\r
3002 filter(predicate: (value: number, index: number, array: Uint16Array) => any, thisArg?: any): Uint16Array;
\r
3005 * Returns the value of the first element in the array where predicate is true, and undefined
\r
3007 * @param predicate find calls predicate once for each element of the array, in ascending
\r
3008 * order, until it finds one where predicate returns true. If such an element is found, find
\r
3009 * immediately returns that element value. Otherwise, find returns undefined.
\r
3010 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
3011 * predicate. If it is not provided, undefined is used instead.
\r
3013 find(predicate: (value: number, index: number, obj: Uint16Array) => boolean, thisArg?: any): number | undefined;
\r
3016 * Returns the index of the first element in the array where predicate is true, and -1
\r
3018 * @param predicate find calls predicate once for each element of the array, in ascending
\r
3019 * order, until it finds one where predicate returns true. If such an element is found,
\r
3020 * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
\r
3021 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
3022 * predicate. If it is not provided, undefined is used instead.
\r
3024 findIndex(predicate: (value: number, index: number, obj: Uint16Array) => boolean, thisArg?: any): number;
\r
3027 * Performs the specified action for each element in an array.
\r
3028 * @param callbackfn A function that accepts up to three arguments. forEach calls the
\r
3029 * callbackfn function one time for each element in the array.
\r
3030 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3031 * If thisArg is omitted, undefined is used as the this value.
\r
3033 forEach(callbackfn: (value: number, index: number, array: Uint16Array) => void, thisArg?: any): void;
\r
3036 * Returns the index of the first occurrence of a value in an array.
\r
3037 * @param searchElement The value to locate in the array.
\r
3038 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
3039 * search starts at index 0.
\r
3041 indexOf(searchElement: number, fromIndex?: number): number;
\r
3044 * Adds all the elements of an array separated by the specified separator string.
\r
3045 * @param separator A string used to separate one element of an array from the next in the
\r
3046 * resulting String. If omitted, the array elements are separated with a comma.
\r
3048 join(separator?: string): string;
\r
3051 * Returns the index of the last occurrence of a value in an array.
\r
3052 * @param searchElement The value to locate in the array.
\r
3053 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
3054 * search starts at index 0.
\r
3056 lastIndexOf(searchElement: number, fromIndex?: number): number;
\r
3059 * The length of the array.
\r
3061 readonly length: number;
\r
3064 * Calls a defined callback function on each element of an array, and returns an array that
\r
3065 * contains the results.
\r
3066 * @param callbackfn A function that accepts up to three arguments. The map method calls the
\r
3067 * callbackfn function one time for each element in the array.
\r
3068 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3069 * If thisArg is omitted, undefined is used as the this value.
\r
3071 map(callbackfn: (value: number, index: number, array: Uint16Array) => number, thisArg?: any): Uint16Array;
\r
3074 * Calls the specified callback function for all the elements in an array. The return value of
\r
3075 * the callback function is the accumulated result, and is provided as an argument in the next
\r
3076 * call to the callback function.
\r
3077 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
3078 * callbackfn function one time for each element in the array.
\r
3079 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3080 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
3081 * instead of an array value.
\r
3083 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number): number;
\r
3084 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue: number): number;
\r
3087 * Calls the specified callback function for all the elements in an array. The return value of
\r
3088 * the callback function is the accumulated result, and is provided as an argument in the next
\r
3089 * call to the callback function.
\r
3090 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
3091 * callbackfn function one time for each element in the array.
\r
3092 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3093 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
3094 * instead of an array value.
\r
3096 reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
\r
3099 * Calls the specified callback function for all the elements in an array, in descending order.
\r
3100 * The return value of the callback function is the accumulated result, and is provided as an
\r
3101 * argument in the next call to the callback function.
\r
3102 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
3103 * the callbackfn function one time for each element in the array.
\r
3104 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3105 * the accumulation. The first call to the callbackfn function provides this value as an
\r
3106 * argument instead of an array value.
\r
3108 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number): number;
\r
3109 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue: number): number;
\r
3112 * Calls the specified callback function for all the elements in an array, in descending order.
\r
3113 * The return value of the callback function is the accumulated result, and is provided as an
\r
3114 * argument in the next call to the callback function.
\r
3115 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
3116 * the callbackfn function one time for each element in the array.
\r
3117 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3118 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
3119 * instead of an array value.
\r
3121 reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
\r
3124 * Reverses the elements in an Array.
\r
3126 reverse(): Uint16Array;
\r
3129 * Sets a value or an array of values.
\r
3130 * @param array A typed or untyped array of values to set.
\r
3131 * @param offset The index in the current array at which the values are to be written.
\r
3133 set(array: ArrayLike<number>, offset?: number): void;
\r
3136 * Returns a section of an array.
\r
3137 * @param start The beginning of the specified portion of the array.
\r
3138 * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
\r
3140 slice(start?: number, end?: number): Uint16Array;
\r
3143 * Determines whether the specified callback function returns true for any element of an array.
\r
3144 * @param predicate A function that accepts up to three arguments. The some method calls
\r
3145 * the predicate function for each element in the array until the predicate returns a value
\r
3146 * which is coercible to the Boolean value true, or until the end of the array.
\r
3147 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
3148 * If thisArg is omitted, undefined is used as the this value.
\r
3150 some(predicate: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): boolean;
\r
3154 * @param compareFn Function used to determine the order of the elements. It is expected to return
\r
3155 * a negative value if first argument is less than second argument, zero if they're equal and a positive
\r
3156 * value otherwise. If omitted, the elements are sorted in ascending order.
\r
3158 * [11,2,22,1].sort((a, b) => a - b)
\r
3161 sort(compareFn?: (a: number, b: number) => number): this;
\r
3164 * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements
\r
3165 * at begin, inclusive, up to end, exclusive.
\r
3166 * @param begin The index of the beginning of the array.
\r
3167 * @param end The index of the end of the array.
\r
3169 subarray(begin?: number, end?: number): Uint16Array;
\r
3172 * Converts a number to a string by using the current locale.
\r
3174 toLocaleString(): string;
\r
3177 * Returns a string representation of an array.
\r
3179 toString(): string;
\r
3181 /** Returns the primitive value of the specified object. */
\r
3182 valueOf(): Uint16Array;
\r
3184 [index: number]: number;
\r
3187 interface Uint16ArrayConstructor {
\r
3188 readonly prototype: Uint16Array;
\r
3189 new(length: number): Uint16Array;
\r
3190 new(array: ArrayLike<number> | ArrayBufferLike): Uint16Array;
\r
3191 new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint16Array;
\r
3194 * The size in bytes of each element in the array.
\r
3196 readonly BYTES_PER_ELEMENT: number;
\r
3199 * Returns a new array from a set of elements.
\r
3200 * @param items A set of elements to include in the new array object.
\r
3202 of(...items: number[]): Uint16Array;
\r
3205 * Creates an array from an array-like or iterable object.
\r
3206 * @param arrayLike An array-like or iterable object to convert to an array.
\r
3208 from(arrayLike: ArrayLike<number>): Uint16Array;
\r
3211 * Creates an array from an array-like or iterable object.
\r
3212 * @param arrayLike An array-like or iterable object to convert to an array.
\r
3213 * @param mapfn A mapping function to call on every element of the array.
\r
3214 * @param thisArg Value of 'this' used to invoke the mapfn.
\r
3216 from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array;
\r
3220 declare var Uint16Array: Uint16ArrayConstructor;
\r
3222 * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
\r
3223 * requested number of bytes could not be allocated an exception is raised.
\r
3225 interface Int32Array {
\r
3227 * The size in bytes of each element in the array.
\r
3229 readonly BYTES_PER_ELEMENT: number;
\r
3232 * The ArrayBuffer instance referenced by the array.
\r
3234 readonly buffer: ArrayBufferLike;
\r
3237 * The length in bytes of the array.
\r
3239 readonly byteLength: number;
\r
3242 * The offset in bytes of the array.
\r
3244 readonly byteOffset: number;
\r
3247 * Returns the this object after copying a section of the array identified by start and end
\r
3248 * to the same array starting at position target
\r
3249 * @param target If target is negative, it is treated as length+target where length is the
\r
3250 * length of the array.
\r
3251 * @param start If start is negative, it is treated as length+start. If end is negative, it
\r
3252 * is treated as length+end.
\r
3253 * @param end If not specified, length of the this object is used as its default value.
\r
3255 copyWithin(target: number, start: number, end?: number): this;
\r
3258 * Determines whether all the members of an array satisfy the specified test.
\r
3259 * @param predicate A function that accepts up to three arguments. The every method calls
\r
3260 * the predicate function for each element in the array until the predicate returns a value
\r
3261 * which is coercible to the Boolean value false, or until the end of the array.
\r
3262 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
3263 * If thisArg is omitted, undefined is used as the this value.
\r
3265 every(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): boolean;
\r
3268 * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
\r
3269 * @param value value to fill array section with
\r
3270 * @param start index to start filling the array at. If start is negative, it is treated as
\r
3271 * length+start where length is the length of the array.
\r
3272 * @param end index to stop filling the array at. If end is negative, it is treated as
\r
3275 fill(value: number, start?: number, end?: number): this;
\r
3278 * Returns the elements of an array that meet the condition specified in a callback function.
\r
3279 * @param predicate A function that accepts up to three arguments. The filter method calls
\r
3280 * the predicate function one time for each element in the array.
\r
3281 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
3282 * If thisArg is omitted, undefined is used as the this value.
\r
3284 filter(predicate: (value: number, index: number, array: Int32Array) => any, thisArg?: any): Int32Array;
\r
3287 * Returns the value of the first element in the array where predicate is true, and undefined
\r
3289 * @param predicate find calls predicate once for each element of the array, in ascending
\r
3290 * order, until it finds one where predicate returns true. If such an element is found, find
\r
3291 * immediately returns that element value. Otherwise, find returns undefined.
\r
3292 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
3293 * predicate. If it is not provided, undefined is used instead.
\r
3295 find(predicate: (value: number, index: number, obj: Int32Array) => boolean, thisArg?: any): number | undefined;
\r
3298 * Returns the index of the first element in the array where predicate is true, and -1
\r
3300 * @param predicate find calls predicate once for each element of the array, in ascending
\r
3301 * order, until it finds one where predicate returns true. If such an element is found,
\r
3302 * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
\r
3303 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
3304 * predicate. If it is not provided, undefined is used instead.
\r
3306 findIndex(predicate: (value: number, index: number, obj: Int32Array) => boolean, thisArg?: any): number;
\r
3309 * Performs the specified action for each element in an array.
\r
3310 * @param callbackfn A function that accepts up to three arguments. forEach calls the
\r
3311 * callbackfn function one time for each element in the array.
\r
3312 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3313 * If thisArg is omitted, undefined is used as the this value.
\r
3315 forEach(callbackfn: (value: number, index: number, array: Int32Array) => void, thisArg?: any): void;
\r
3318 * Returns the index of the first occurrence of a value in an array.
\r
3319 * @param searchElement The value to locate in the array.
\r
3320 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
3321 * search starts at index 0.
\r
3323 indexOf(searchElement: number, fromIndex?: number): number;
\r
3326 * Adds all the elements of an array separated by the specified separator string.
\r
3327 * @param separator A string used to separate one element of an array from the next in the
\r
3328 * resulting String. If omitted, the array elements are separated with a comma.
\r
3330 join(separator?: string): string;
\r
3333 * Returns the index of the last occurrence of a value in an array.
\r
3334 * @param searchElement The value to locate in the array.
\r
3335 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
3336 * search starts at index 0.
\r
3338 lastIndexOf(searchElement: number, fromIndex?: number): number;
\r
3341 * The length of the array.
\r
3343 readonly length: number;
\r
3346 * Calls a defined callback function on each element of an array, and returns an array that
\r
3347 * contains the results.
\r
3348 * @param callbackfn A function that accepts up to three arguments. The map method calls the
\r
3349 * callbackfn function one time for each element in the array.
\r
3350 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3351 * If thisArg is omitted, undefined is used as the this value.
\r
3353 map(callbackfn: (value: number, index: number, array: Int32Array) => number, thisArg?: any): Int32Array;
\r
3356 * Calls the specified callback function for all the elements in an array. The return value of
\r
3357 * the callback function is the accumulated result, and is provided as an argument in the next
\r
3358 * call to the callback function.
\r
3359 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
3360 * callbackfn function one time for each element in the array.
\r
3361 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3362 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
3363 * instead of an array value.
\r
3365 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number): number;
\r
3366 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue: number): number;
\r
3369 * Calls the specified callback function for all the elements in an array. The return value of
\r
3370 * the callback function is the accumulated result, and is provided as an argument in the next
\r
3371 * call to the callback function.
\r
3372 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
3373 * callbackfn function one time for each element in the array.
\r
3374 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3375 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
3376 * instead of an array value.
\r
3378 reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
\r
3381 * Calls the specified callback function for all the elements in an array, in descending order.
\r
3382 * The return value of the callback function is the accumulated result, and is provided as an
\r
3383 * argument in the next call to the callback function.
\r
3384 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
3385 * the callbackfn function one time for each element in the array.
\r
3386 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3387 * the accumulation. The first call to the callbackfn function provides this value as an
\r
3388 * argument instead of an array value.
\r
3390 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number): number;
\r
3391 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue: number): number;
\r
3394 * Calls the specified callback function for all the elements in an array, in descending order.
\r
3395 * The return value of the callback function is the accumulated result, and is provided as an
\r
3396 * argument in the next call to the callback function.
\r
3397 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
3398 * the callbackfn function one time for each element in the array.
\r
3399 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3400 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
3401 * instead of an array value.
\r
3403 reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
\r
3406 * Reverses the elements in an Array.
\r
3408 reverse(): Int32Array;
\r
3411 * Sets a value or an array of values.
\r
3412 * @param array A typed or untyped array of values to set.
\r
3413 * @param offset The index in the current array at which the values are to be written.
\r
3415 set(array: ArrayLike<number>, offset?: number): void;
\r
3418 * Returns a section of an array.
\r
3419 * @param start The beginning of the specified portion of the array.
\r
3420 * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
\r
3422 slice(start?: number, end?: number): Int32Array;
\r
3425 * Determines whether the specified callback function returns true for any element of an array.
\r
3426 * @param predicate A function that accepts up to three arguments. The some method calls
\r
3427 * the predicate function for each element in the array until the predicate returns a value
\r
3428 * which is coercible to the Boolean value true, or until the end of the array.
\r
3429 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
3430 * If thisArg is omitted, undefined is used as the this value.
\r
3432 some(predicate: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): boolean;
\r
3436 * @param compareFn Function used to determine the order of the elements. It is expected to return
\r
3437 * a negative value if first argument is less than second argument, zero if they're equal and a positive
\r
3438 * value otherwise. If omitted, the elements are sorted in ascending order.
\r
3440 * [11,2,22,1].sort((a, b) => a - b)
\r
3443 sort(compareFn?: (a: number, b: number) => number): this;
\r
3446 * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements
\r
3447 * at begin, inclusive, up to end, exclusive.
\r
3448 * @param begin The index of the beginning of the array.
\r
3449 * @param end The index of the end of the array.
\r
3451 subarray(begin?: number, end?: number): Int32Array;
\r
3454 * Converts a number to a string by using the current locale.
\r
3456 toLocaleString(): string;
\r
3459 * Returns a string representation of an array.
\r
3461 toString(): string;
\r
3463 /** Returns the primitive value of the specified object. */
\r
3464 valueOf(): Int32Array;
\r
3466 [index: number]: number;
\r
3469 interface Int32ArrayConstructor {
\r
3470 readonly prototype: Int32Array;
\r
3471 new(length: number): Int32Array;
\r
3472 new(array: ArrayLike<number> | ArrayBufferLike): Int32Array;
\r
3473 new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int32Array;
\r
3476 * The size in bytes of each element in the array.
\r
3478 readonly BYTES_PER_ELEMENT: number;
\r
3481 * Returns a new array from a set of elements.
\r
3482 * @param items A set of elements to include in the new array object.
\r
3484 of(...items: number[]): Int32Array;
\r
3487 * Creates an array from an array-like or iterable object.
\r
3488 * @param arrayLike An array-like or iterable object to convert to an array.
\r
3490 from(arrayLike: ArrayLike<number>): Int32Array;
\r
3493 * Creates an array from an array-like or iterable object.
\r
3494 * @param arrayLike An array-like or iterable object to convert to an array.
\r
3495 * @param mapfn A mapping function to call on every element of the array.
\r
3496 * @param thisArg Value of 'this' used to invoke the mapfn.
\r
3498 from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array;
\r
3501 declare var Int32Array: Int32ArrayConstructor;
\r
3504 * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
\r
3505 * requested number of bytes could not be allocated an exception is raised.
\r
3507 interface Uint32Array {
\r
3509 * The size in bytes of each element in the array.
\r
3511 readonly BYTES_PER_ELEMENT: number;
\r
3514 * The ArrayBuffer instance referenced by the array.
\r
3516 readonly buffer: ArrayBufferLike;
\r
3519 * The length in bytes of the array.
\r
3521 readonly byteLength: number;
\r
3524 * The offset in bytes of the array.
\r
3526 readonly byteOffset: number;
\r
3529 * Returns the this object after copying a section of the array identified by start and end
\r
3530 * to the same array starting at position target
\r
3531 * @param target If target is negative, it is treated as length+target where length is the
\r
3532 * length of the array.
\r
3533 * @param start If start is negative, it is treated as length+start. If end is negative, it
\r
3534 * is treated as length+end.
\r
3535 * @param end If not specified, length of the this object is used as its default value.
\r
3537 copyWithin(target: number, start: number, end?: number): this;
\r
3540 * Determines whether all the members of an array satisfy the specified test.
\r
3541 * @param predicate A function that accepts up to three arguments. The every method calls
\r
3542 * the predicate function for each element in the array until the predicate returns a value
\r
3543 * which is coercible to the Boolean value false, or until the end of the array.
\r
3544 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
3545 * If thisArg is omitted, undefined is used as the this value.
\r
3547 every(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): boolean;
\r
3550 * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
\r
3551 * @param value value to fill array section with
\r
3552 * @param start index to start filling the array at. If start is negative, it is treated as
\r
3553 * length+start where length is the length of the array.
\r
3554 * @param end index to stop filling the array at. If end is negative, it is treated as
\r
3557 fill(value: number, start?: number, end?: number): this;
\r
3560 * Returns the elements of an array that meet the condition specified in a callback function.
\r
3561 * @param predicate A function that accepts up to three arguments. The filter method calls
\r
3562 * the predicate function one time for each element in the array.
\r
3563 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
3564 * If thisArg is omitted, undefined is used as the this value.
\r
3566 filter(predicate: (value: number, index: number, array: Uint32Array) => any, thisArg?: any): Uint32Array;
\r
3569 * Returns the value of the first element in the array where predicate is true, and undefined
\r
3571 * @param predicate find calls predicate once for each element of the array, in ascending
\r
3572 * order, until it finds one where predicate returns true. If such an element is found, find
\r
3573 * immediately returns that element value. Otherwise, find returns undefined.
\r
3574 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
3575 * predicate. If it is not provided, undefined is used instead.
\r
3577 find(predicate: (value: number, index: number, obj: Uint32Array) => boolean, thisArg?: any): number | undefined;
\r
3580 * Returns the index of the first element in the array where predicate is true, and -1
\r
3582 * @param predicate find calls predicate once for each element of the array, in ascending
\r
3583 * order, until it finds one where predicate returns true. If such an element is found,
\r
3584 * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
\r
3585 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
3586 * predicate. If it is not provided, undefined is used instead.
\r
3588 findIndex(predicate: (value: number, index: number, obj: Uint32Array) => boolean, thisArg?: any): number;
\r
3591 * Performs the specified action for each element in an array.
\r
3592 * @param callbackfn A function that accepts up to three arguments. forEach calls the
\r
3593 * callbackfn function one time for each element in the array.
\r
3594 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3595 * If thisArg is omitted, undefined is used as the this value.
\r
3597 forEach(callbackfn: (value: number, index: number, array: Uint32Array) => void, thisArg?: any): void;
\r
3599 * Returns the index of the first occurrence of a value in an array.
\r
3600 * @param searchElement The value to locate in the array.
\r
3601 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
3602 * search starts at index 0.
\r
3604 indexOf(searchElement: number, fromIndex?: number): number;
\r
3607 * Adds all the elements of an array separated by the specified separator string.
\r
3608 * @param separator A string used to separate one element of an array from the next in the
\r
3609 * resulting String. If omitted, the array elements are separated with a comma.
\r
3611 join(separator?: string): string;
\r
3614 * Returns the index of the last occurrence of a value in an array.
\r
3615 * @param searchElement The value to locate in the array.
\r
3616 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
3617 * search starts at index 0.
\r
3619 lastIndexOf(searchElement: number, fromIndex?: number): number;
\r
3622 * The length of the array.
\r
3624 readonly length: number;
\r
3627 * Calls a defined callback function on each element of an array, and returns an array that
\r
3628 * contains the results.
\r
3629 * @param callbackfn A function that accepts up to three arguments. The map method calls the
\r
3630 * callbackfn function one time for each element in the array.
\r
3631 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3632 * If thisArg is omitted, undefined is used as the this value.
\r
3634 map(callbackfn: (value: number, index: number, array: Uint32Array) => number, thisArg?: any): Uint32Array;
\r
3637 * Calls the specified callback function for all the elements in an array. The return value of
\r
3638 * the callback function is the accumulated result, and is provided as an argument in the next
\r
3639 * call to the callback function.
\r
3640 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
3641 * callbackfn function one time for each element in the array.
\r
3642 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3643 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
3644 * instead of an array value.
\r
3646 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number): number;
\r
3647 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue: number): number;
\r
3650 * Calls the specified callback function for all the elements in an array. The return value of
\r
3651 * the callback function is the accumulated result, and is provided as an argument in the next
\r
3652 * call to the callback function.
\r
3653 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
3654 * callbackfn function one time for each element in the array.
\r
3655 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3656 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
3657 * instead of an array value.
\r
3659 reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
\r
3662 * Calls the specified callback function for all the elements in an array, in descending order.
\r
3663 * The return value of the callback function is the accumulated result, and is provided as an
\r
3664 * argument in the next call to the callback function.
\r
3665 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
3666 * the callbackfn function one time for each element in the array.
\r
3667 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3668 * the accumulation. The first call to the callbackfn function provides this value as an
\r
3669 * argument instead of an array value.
\r
3671 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number): number;
\r
3672 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue: number): number;
\r
3675 * Calls the specified callback function for all the elements in an array, in descending order.
\r
3676 * The return value of the callback function is the accumulated result, and is provided as an
\r
3677 * argument in the next call to the callback function.
\r
3678 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
3679 * the callbackfn function one time for each element in the array.
\r
3680 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3681 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
3682 * instead of an array value.
\r
3684 reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
\r
3687 * Reverses the elements in an Array.
\r
3689 reverse(): Uint32Array;
\r
3692 * Sets a value or an array of values.
\r
3693 * @param array A typed or untyped array of values to set.
\r
3694 * @param offset The index in the current array at which the values are to be written.
\r
3696 set(array: ArrayLike<number>, offset?: number): void;
\r
3699 * Returns a section of an array.
\r
3700 * @param start The beginning of the specified portion of the array.
\r
3701 * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
\r
3703 slice(start?: number, end?: number): Uint32Array;
\r
3706 * Determines whether the specified callback function returns true for any element of an array.
\r
3707 * @param predicate A function that accepts up to three arguments. The some method calls
\r
3708 * the predicate function for each element in the array until the predicate returns a value
\r
3709 * which is coercible to the Boolean value true, or until the end of the array.
\r
3710 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
3711 * If thisArg is omitted, undefined is used as the this value.
\r
3713 some(predicate: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): boolean;
\r
3717 * @param compareFn Function used to determine the order of the elements. It is expected to return
\r
3718 * a negative value if first argument is less than second argument, zero if they're equal and a positive
\r
3719 * value otherwise. If omitted, the elements are sorted in ascending order.
\r
3721 * [11,2,22,1].sort((a, b) => a - b)
\r
3724 sort(compareFn?: (a: number, b: number) => number): this;
\r
3727 * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements
\r
3728 * at begin, inclusive, up to end, exclusive.
\r
3729 * @param begin The index of the beginning of the array.
\r
3730 * @param end The index of the end of the array.
\r
3732 subarray(begin?: number, end?: number): Uint32Array;
\r
3735 * Converts a number to a string by using the current locale.
\r
3737 toLocaleString(): string;
\r
3740 * Returns a string representation of an array.
\r
3742 toString(): string;
\r
3744 /** Returns the primitive value of the specified object. */
\r
3745 valueOf(): Uint32Array;
\r
3747 [index: number]: number;
\r
3750 interface Uint32ArrayConstructor {
\r
3751 readonly prototype: Uint32Array;
\r
3752 new(length: number): Uint32Array;
\r
3753 new(array: ArrayLike<number> | ArrayBufferLike): Uint32Array;
\r
3754 new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint32Array;
\r
3757 * The size in bytes of each element in the array.
\r
3759 readonly BYTES_PER_ELEMENT: number;
\r
3762 * Returns a new array from a set of elements.
\r
3763 * @param items A set of elements to include in the new array object.
\r
3765 of(...items: number[]): Uint32Array;
\r
3768 * Creates an array from an array-like or iterable object.
\r
3769 * @param arrayLike An array-like or iterable object to convert to an array.
\r
3771 from(arrayLike: ArrayLike<number>): Uint32Array;
\r
3774 * Creates an array from an array-like or iterable object.
\r
3775 * @param arrayLike An array-like or iterable object to convert to an array.
\r
3776 * @param mapfn A mapping function to call on every element of the array.
\r
3777 * @param thisArg Value of 'this' used to invoke the mapfn.
\r
3779 from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array;
\r
3782 declare var Uint32Array: Uint32ArrayConstructor;
\r
3785 * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
\r
3786 * of bytes could not be allocated an exception is raised.
\r
3788 interface Float32Array {
\r
3790 * The size in bytes of each element in the array.
\r
3792 readonly BYTES_PER_ELEMENT: number;
\r
3795 * The ArrayBuffer instance referenced by the array.
\r
3797 readonly buffer: ArrayBufferLike;
\r
3800 * The length in bytes of the array.
\r
3802 readonly byteLength: number;
\r
3805 * The offset in bytes of the array.
\r
3807 readonly byteOffset: number;
\r
3810 * Returns the this object after copying a section of the array identified by start and end
\r
3811 * to the same array starting at position target
\r
3812 * @param target If target is negative, it is treated as length+target where length is the
\r
3813 * length of the array.
\r
3814 * @param start If start is negative, it is treated as length+start. If end is negative, it
\r
3815 * is treated as length+end.
\r
3816 * @param end If not specified, length of the this object is used as its default value.
\r
3818 copyWithin(target: number, start: number, end?: number): this;
\r
3821 * Determines whether all the members of an array satisfy the specified test.
\r
3822 * @param predicate A function that accepts up to three arguments. The every method calls
\r
3823 * the predicate function for each element in the array until the predicate returns a value
\r
3824 * which is coercible to the Boolean value false, or until the end of the array.
\r
3825 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
3826 * If thisArg is omitted, undefined is used as the this value.
\r
3828 every(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): boolean;
\r
3831 * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
\r
3832 * @param value value to fill array section with
\r
3833 * @param start index to start filling the array at. If start is negative, it is treated as
\r
3834 * length+start where length is the length of the array.
\r
3835 * @param end index to stop filling the array at. If end is negative, it is treated as
\r
3838 fill(value: number, start?: number, end?: number): this;
\r
3841 * Returns the elements of an array that meet the condition specified in a callback function.
\r
3842 * @param predicate A function that accepts up to three arguments. The filter method calls
\r
3843 * the predicate function one time for each element in the array.
\r
3844 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
3845 * If thisArg is omitted, undefined is used as the this value.
\r
3847 filter(predicate: (value: number, index: number, array: Float32Array) => any, thisArg?: any): Float32Array;
\r
3850 * Returns the value of the first element in the array where predicate is true, and undefined
\r
3852 * @param predicate find calls predicate once for each element of the array, in ascending
\r
3853 * order, until it finds one where predicate returns true. If such an element is found, find
\r
3854 * immediately returns that element value. Otherwise, find returns undefined.
\r
3855 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
3856 * predicate. If it is not provided, undefined is used instead.
\r
3858 find(predicate: (value: number, index: number, obj: Float32Array) => boolean, thisArg?: any): number | undefined;
\r
3861 * Returns the index of the first element in the array where predicate is true, and -1
\r
3863 * @param predicate find calls predicate once for each element of the array, in ascending
\r
3864 * order, until it finds one where predicate returns true. If such an element is found,
\r
3865 * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
\r
3866 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
3867 * predicate. If it is not provided, undefined is used instead.
\r
3869 findIndex(predicate: (value: number, index: number, obj: Float32Array) => boolean, thisArg?: any): number;
\r
3872 * Performs the specified action for each element in an array.
\r
3873 * @param callbackfn A function that accepts up to three arguments. forEach calls the
\r
3874 * callbackfn function one time for each element in the array.
\r
3875 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3876 * If thisArg is omitted, undefined is used as the this value.
\r
3878 forEach(callbackfn: (value: number, index: number, array: Float32Array) => void, thisArg?: any): void;
\r
3881 * Returns the index of the first occurrence of a value in an array.
\r
3882 * @param searchElement The value to locate in the array.
\r
3883 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
3884 * search starts at index 0.
\r
3886 indexOf(searchElement: number, fromIndex?: number): number;
\r
3889 * Adds all the elements of an array separated by the specified separator string.
\r
3890 * @param separator A string used to separate one element of an array from the next in the
\r
3891 * resulting String. If omitted, the array elements are separated with a comma.
\r
3893 join(separator?: string): string;
\r
3896 * Returns the index of the last occurrence of a value in an array.
\r
3897 * @param searchElement The value to locate in the array.
\r
3898 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
3899 * search starts at index 0.
\r
3901 lastIndexOf(searchElement: number, fromIndex?: number): number;
\r
3904 * The length of the array.
\r
3906 readonly length: number;
\r
3909 * Calls a defined callback function on each element of an array, and returns an array that
\r
3910 * contains the results.
\r
3911 * @param callbackfn A function that accepts up to three arguments. The map method calls the
\r
3912 * callbackfn function one time for each element in the array.
\r
3913 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3914 * If thisArg is omitted, undefined is used as the this value.
\r
3916 map(callbackfn: (value: number, index: number, array: Float32Array) => number, thisArg?: any): Float32Array;
\r
3919 * Calls the specified callback function for all the elements in an array. The return value of
\r
3920 * the callback function is the accumulated result, and is provided as an argument in the next
\r
3921 * call to the callback function.
\r
3922 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
3923 * callbackfn function one time for each element in the array.
\r
3924 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3925 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
3926 * instead of an array value.
\r
3928 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number): number;
\r
3929 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue: number): number;
\r
3932 * Calls the specified callback function for all the elements in an array. The return value of
\r
3933 * the callback function is the accumulated result, and is provided as an argument in the next
\r
3934 * call to the callback function.
\r
3935 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
3936 * callbackfn function one time for each element in the array.
\r
3937 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3938 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
3939 * instead of an array value.
\r
3941 reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
\r
3944 * Calls the specified callback function for all the elements in an array, in descending order.
\r
3945 * The return value of the callback function is the accumulated result, and is provided as an
\r
3946 * argument in the next call to the callback function.
\r
3947 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
3948 * the callbackfn function one time for each element in the array.
\r
3949 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3950 * the accumulation. The first call to the callbackfn function provides this value as an
\r
3951 * argument instead of an array value.
\r
3953 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number): number;
\r
3954 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue: number): number;
\r
3957 * Calls the specified callback function for all the elements in an array, in descending order.
\r
3958 * The return value of the callback function is the accumulated result, and is provided as an
\r
3959 * argument in the next call to the callback function.
\r
3960 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
3961 * the callbackfn function one time for each element in the array.
\r
3962 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3963 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
3964 * instead of an array value.
\r
3966 reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
\r
3969 * Reverses the elements in an Array.
\r
3971 reverse(): Float32Array;
\r
3974 * Sets a value or an array of values.
\r
3975 * @param array A typed or untyped array of values to set.
\r
3976 * @param offset The index in the current array at which the values are to be written.
\r
3978 set(array: ArrayLike<number>, offset?: number): void;
\r
3981 * Returns a section of an array.
\r
3982 * @param start The beginning of the specified portion of the array.
\r
3983 * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
\r
3985 slice(start?: number, end?: number): Float32Array;
\r
3988 * Determines whether the specified callback function returns true for any element of an array.
\r
3989 * @param predicate A function that accepts up to three arguments. The some method calls
\r
3990 * the predicate function for each element in the array until the predicate returns a value
\r
3991 * which is coercible to the Boolean value true, or until the end of the array.
\r
3992 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
3993 * If thisArg is omitted, undefined is used as the this value.
\r
3995 some(predicate: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): boolean;
\r
3999 * @param compareFn Function used to determine the order of the elements. It is expected to return
\r
4000 * a negative value if first argument is less than second argument, zero if they're equal and a positive
\r
4001 * value otherwise. If omitted, the elements are sorted in ascending order.
\r
4003 * [11,2,22,1].sort((a, b) => a - b)
\r
4006 sort(compareFn?: (a: number, b: number) => number): this;
\r
4009 * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements
\r
4010 * at begin, inclusive, up to end, exclusive.
\r
4011 * @param begin The index of the beginning of the array.
\r
4012 * @param end The index of the end of the array.
\r
4014 subarray(begin?: number, end?: number): Float32Array;
\r
4017 * Converts a number to a string by using the current locale.
\r
4019 toLocaleString(): string;
\r
4022 * Returns a string representation of an array.
\r
4024 toString(): string;
\r
4026 /** Returns the primitive value of the specified object. */
\r
4027 valueOf(): Float32Array;
\r
4029 [index: number]: number;
\r
4032 interface Float32ArrayConstructor {
\r
4033 readonly prototype: Float32Array;
\r
4034 new(length: number): Float32Array;
\r
4035 new(array: ArrayLike<number> | ArrayBufferLike): Float32Array;
\r
4036 new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float32Array;
\r
4039 * The size in bytes of each element in the array.
\r
4041 readonly BYTES_PER_ELEMENT: number;
\r
4044 * Returns a new array from a set of elements.
\r
4045 * @param items A set of elements to include in the new array object.
\r
4047 of(...items: number[]): Float32Array;
\r
4050 * Creates an array from an array-like or iterable object.
\r
4051 * @param arrayLike An array-like or iterable object to convert to an array.
\r
4053 from(arrayLike: ArrayLike<number>): Float32Array;
\r
4056 * Creates an array from an array-like or iterable object.
\r
4057 * @param arrayLike An array-like or iterable object to convert to an array.
\r
4058 * @param mapfn A mapping function to call on every element of the array.
\r
4059 * @param thisArg Value of 'this' used to invoke the mapfn.
\r
4061 from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array;
\r
4065 declare var Float32Array: Float32ArrayConstructor;
\r
4068 * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
\r
4069 * number of bytes could not be allocated an exception is raised.
\r
4071 interface Float64Array {
\r
4073 * The size in bytes of each element in the array.
\r
4075 readonly BYTES_PER_ELEMENT: number;
\r
4078 * The ArrayBuffer instance referenced by the array.
\r
4080 readonly buffer: ArrayBufferLike;
\r
4083 * The length in bytes of the array.
\r
4085 readonly byteLength: number;
\r
4088 * The offset in bytes of the array.
\r
4090 readonly byteOffset: number;
\r
4093 * Returns the this object after copying a section of the array identified by start and end
\r
4094 * to the same array starting at position target
\r
4095 * @param target If target is negative, it is treated as length+target where length is the
\r
4096 * length of the array.
\r
4097 * @param start If start is negative, it is treated as length+start. If end is negative, it
\r
4098 * is treated as length+end.
\r
4099 * @param end If not specified, length of the this object is used as its default value.
\r
4101 copyWithin(target: number, start: number, end?: number): this;
\r
4104 * Determines whether all the members of an array satisfy the specified test.
\r
4105 * @param predicate A function that accepts up to three arguments. The every method calls
\r
4106 * the predicate function for each element in the array until the predicate returns a value
\r
4107 * which is coercible to the Boolean value false, or until the end of the array.
\r
4108 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
4109 * If thisArg is omitted, undefined is used as the this value.
\r
4111 every(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): boolean;
\r
4114 * Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
\r
4115 * @param value value to fill array section with
\r
4116 * @param start index to start filling the array at. If start is negative, it is treated as
\r
4117 * length+start where length is the length of the array.
\r
4118 * @param end index to stop filling the array at. If end is negative, it is treated as
\r
4121 fill(value: number, start?: number, end?: number): this;
\r
4124 * Returns the elements of an array that meet the condition specified in a callback function.
\r
4125 * @param predicate A function that accepts up to three arguments. The filter method calls
\r
4126 * the predicate function one time for each element in the array.
\r
4127 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
4128 * If thisArg is omitted, undefined is used as the this value.
\r
4130 filter(predicate: (value: number, index: number, array: Float64Array) => any, thisArg?: any): Float64Array;
\r
4133 * Returns the value of the first element in the array where predicate is true, and undefined
\r
4135 * @param predicate find calls predicate once for each element of the array, in ascending
\r
4136 * order, until it finds one where predicate returns true. If such an element is found, find
\r
4137 * immediately returns that element value. Otherwise, find returns undefined.
\r
4138 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
4139 * predicate. If it is not provided, undefined is used instead.
\r
4141 find(predicate: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any): number | undefined;
\r
4144 * Returns the index of the first element in the array where predicate is true, and -1
\r
4146 * @param predicate find calls predicate once for each element of the array, in ascending
\r
4147 * order, until it finds one where predicate returns true. If such an element is found,
\r
4148 * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
\r
4149 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
4150 * predicate. If it is not provided, undefined is used instead.
\r
4152 findIndex(predicate: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any): number;
\r
4155 * Performs the specified action for each element in an array.
\r
4156 * @param callbackfn A function that accepts up to three arguments. forEach calls the
\r
4157 * callbackfn function one time for each element in the array.
\r
4158 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
4159 * If thisArg is omitted, undefined is used as the this value.
\r
4161 forEach(callbackfn: (value: number, index: number, array: Float64Array) => void, thisArg?: any): void;
\r
4164 * Returns the index of the first occurrence of a value in an array.
\r
4165 * @param searchElement The value to locate in the array.
\r
4166 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
4167 * search starts at index 0.
\r
4169 indexOf(searchElement: number, fromIndex?: number): number;
\r
4172 * Adds all the elements of an array separated by the specified separator string.
\r
4173 * @param separator A string used to separate one element of an array from the next in the
\r
4174 * resulting String. If omitted, the array elements are separated with a comma.
\r
4176 join(separator?: string): string;
\r
4179 * Returns the index of the last occurrence of a value in an array.
\r
4180 * @param searchElement The value to locate in the array.
\r
4181 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
4182 * search starts at index 0.
\r
4184 lastIndexOf(searchElement: number, fromIndex?: number): number;
\r
4187 * The length of the array.
\r
4189 readonly length: number;
\r
4192 * Calls a defined callback function on each element of an array, and returns an array that
\r
4193 * contains the results.
\r
4194 * @param callbackfn A function that accepts up to three arguments. The map method calls the
\r
4195 * callbackfn function one time for each element in the array.
\r
4196 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
4197 * If thisArg is omitted, undefined is used as the this value.
\r
4199 map(callbackfn: (value: number, index: number, array: Float64Array) => number, thisArg?: any): Float64Array;
\r
4202 * Calls the specified callback function for all the elements in an array. The return value of
\r
4203 * the callback function is the accumulated result, and is provided as an argument in the next
\r
4204 * call to the callback function.
\r
4205 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
4206 * callbackfn function one time for each element in the array.
\r
4207 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
4208 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
4209 * instead of an array value.
\r
4211 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number): number;
\r
4212 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue: number): number;
\r
4215 * Calls the specified callback function for all the elements in an array. The return value of
\r
4216 * the callback function is the accumulated result, and is provided as an argument in the next
\r
4217 * call to the callback function.
\r
4218 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
4219 * callbackfn function one time for each element in the array.
\r
4220 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
4221 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
4222 * instead of an array value.
\r
4224 reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
\r
4227 * Calls the specified callback function for all the elements in an array, in descending order.
\r
4228 * The return value of the callback function is the accumulated result, and is provided as an
\r
4229 * argument in the next call to the callback function.
\r
4230 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
4231 * the callbackfn function one time for each element in the array.
\r
4232 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
4233 * the accumulation. The first call to the callbackfn function provides this value as an
\r
4234 * argument instead of an array value.
\r
4236 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number): number;
\r
4237 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue: number): number;
\r
4240 * Calls the specified callback function for all the elements in an array, in descending order.
\r
4241 * The return value of the callback function is the accumulated result, and is provided as an
\r
4242 * argument in the next call to the callback function.
\r
4243 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
4244 * the callbackfn function one time for each element in the array.
\r
4245 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
4246 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
4247 * instead of an array value.
\r
4249 reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
\r
4252 * Reverses the elements in an Array.
\r
4254 reverse(): Float64Array;
\r
4257 * Sets a value or an array of values.
\r
4258 * @param array A typed or untyped array of values to set.
\r
4259 * @param offset The index in the current array at which the values are to be written.
\r
4261 set(array: ArrayLike<number>, offset?: number): void;
\r
4264 * Returns a section of an array.
\r
4265 * @param start The beginning of the specified portion of the array.
\r
4266 * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
\r
4268 slice(start?: number, end?: number): Float64Array;
\r
4271 * Determines whether the specified callback function returns true for any element of an array.
\r
4272 * @param predicate A function that accepts up to three arguments. The some method calls
\r
4273 * the predicate function for each element in the array until the predicate returns a value
\r
4274 * which is coercible to the Boolean value true, or until the end of the array.
\r
4275 * @param thisArg An object to which the this keyword can refer in the predicate function.
\r
4276 * If thisArg is omitted, undefined is used as the this value.
\r
4278 some(predicate: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): boolean;
\r
4282 * @param compareFn Function used to determine the order of the elements. It is expected to return
\r
4283 * a negative value if first argument is less than second argument, zero if they're equal and a positive
\r
4284 * value otherwise. If omitted, the elements are sorted in ascending order.
\r
4286 * [11,2,22,1].sort((a, b) => a - b)
\r
4289 sort(compareFn?: (a: number, b: number) => number): this;
\r
4292 * at begin, inclusive, up to end, exclusive.
\r
4293 * @param begin The index of the beginning of the array.
\r
4294 * @param end The index of the end of the array.
\r
4296 subarray(begin?: number, end?: number): Float64Array;
\r
4298 toString(): string;
\r
4300 /** Returns the primitive value of the specified object. */
\r
4301 valueOf(): Float64Array;
\r
4303 [index: number]: number;
\r
4306 interface Float64ArrayConstructor {
\r
4307 readonly prototype: Float64Array;
\r
4308 new(length: number): Float64Array;
\r
4309 new(array: ArrayLike<number> | ArrayBufferLike): Float64Array;
\r
4310 new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float64Array;
\r
4313 * The size in bytes of each element in the array.
\r
4315 readonly BYTES_PER_ELEMENT: number;
\r
4318 * Returns a new array from a set of elements.
\r
4319 * @param items A set of elements to include in the new array object.
\r
4321 of(...items: number[]): Float64Array;
\r
4324 * Creates an array from an array-like or iterable object.
\r
4325 * @param arrayLike An array-like or iterable object to convert to an array.
\r
4327 from(arrayLike: ArrayLike<number>): Float64Array;
\r
4330 * Creates an array from an array-like or iterable object.
\r
4331 * @param arrayLike An array-like or iterable object to convert to an array.
\r
4332 * @param mapfn A mapping function to call on every element of the array.
\r
4333 * @param thisArg Value of 'this' used to invoke the mapfn.
\r
4335 from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array;
\r
4338 declare var Float64Array: Float64ArrayConstructor;
\r
4340 /////////////////////////////
\r
4341 /// ECMAScript Internationalization API
\r
4342 /////////////////////////////
\r
4344 declare namespace Intl {
\r
4345 interface CollatorOptions {
\r
4346 usage?: string | undefined;
\r
4347 localeMatcher?: string | undefined;
\r
4348 numeric?: boolean | undefined;
\r
4349 caseFirst?: string | undefined;
\r
4350 sensitivity?: string | undefined;
\r
4351 ignorePunctuation?: boolean | undefined;
\r
4354 interface ResolvedCollatorOptions {
\r
4357 sensitivity: string;
\r
4358 ignorePunctuation: boolean;
\r
4359 collation: string;
\r
4360 caseFirst: string;
\r
4364 interface Collator {
\r
4365 compare(x: string, y: string): number;
\r
4366 resolvedOptions(): ResolvedCollatorOptions;
\r
4369 new(locales?: string | string[], options?: CollatorOptions): Collator;
\r
4370 (locales?: string | string[], options?: CollatorOptions): Collator;
\r
4371 supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[];
\r
4374 interface NumberFormatOptions {
\r
4375 localeMatcher?: string | undefined;
\r
4376 style?: string | undefined;
\r
4377 currency?: string | undefined;
\r
4378 currencyDisplay?: string | undefined;
\r
4379 currencySign?: string | undefined;
\r
4380 useGrouping?: boolean | undefined;
\r
4381 minimumIntegerDigits?: number | undefined;
\r
4382 minimumFractionDigits?: number | undefined;
\r
4383 maximumFractionDigits?: number | undefined;
\r
4384 minimumSignificantDigits?: number | undefined;
\r
4385 maximumSignificantDigits?: number | undefined;
\r
4388 interface ResolvedNumberFormatOptions {
\r
4390 numberingSystem: string;
\r
4392 currency?: string;
\r
4393 currencyDisplay?: string;
\r
4394 minimumIntegerDigits: number;
\r
4395 minimumFractionDigits: number;
\r
4396 maximumFractionDigits: number;
\r
4397 minimumSignificantDigits?: number;
\r
4398 maximumSignificantDigits?: number;
\r
4399 useGrouping: boolean;
\r
4402 interface NumberFormat {
\r
4403 format(value: number): string;
\r
4404 resolvedOptions(): ResolvedNumberFormatOptions;
\r
4406 var NumberFormat: {
\r
4407 new(locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
\r
4408 (locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
\r
4409 supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[];
\r
4412 interface DateTimeFormatOptions {
\r
4413 localeMatcher?: "best fit" | "lookup" | undefined;
\r
4414 weekday?: "long" | "short" | "narrow" | undefined;
\r
4415 era?: "long" | "short" | "narrow" | undefined;
\r
4416 year?: "numeric" | "2-digit" | undefined;
\r
4417 month?: "numeric" | "2-digit" | "long" | "short" | "narrow" | undefined;
\r
4418 day?: "numeric" | "2-digit" | undefined;
\r
4419 hour?: "numeric" | "2-digit" | undefined;
\r
4420 minute?: "numeric" | "2-digit" | undefined;
\r
4421 second?: "numeric" | "2-digit" | undefined;
\r
4422 timeZoneName?: "long" | "short" | undefined;
\r
4423 formatMatcher?: "best fit" | "basic" | undefined;
\r
4424 hour12?: boolean | undefined;
\r
4425 timeZone?: string | undefined;
\r
4428 interface ResolvedDateTimeFormatOptions {
\r
4431 numberingSystem: string;
\r
4442 timeZoneName?: string;
\r
4445 interface DateTimeFormat {
\r
4446 format(date?: Date | number): string;
\r
4447 resolvedOptions(): ResolvedDateTimeFormatOptions;
\r
4449 var DateTimeFormat: {
\r
4450 new(locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
\r
4451 (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
\r
4452 supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[];
\r
4456 interface String {
\r
4458 * Determines whether two strings are equivalent in the current or specified locale.
\r
4459 * @param that String to compare to target string
\r
4460 * @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
4461 * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
\r
4463 localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number;
\r
4466 interface Number {
\r
4468 * Converts a number to a string by using the current or specified locale.
\r
4469 * @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
4470 * @param options An object that contains one or more properties that specify comparison options.
\r
4472 toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string;
\r
4477 * Converts a date and time to a string by using the current or specified locale.
\r
4478 * @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
4479 * @param options An object that contains one or more properties that specify comparison options.
\r
4481 toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
\r
4483 * Converts a date to a string by using the current or specified locale.
\r
4484 * @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
4485 * @param options An object that contains one or more properties that specify comparison options.
\r
4487 toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
\r
4490 * Converts a time to a string by using the current or specified locale.
\r
4491 * @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
4492 * @param options An object that contains one or more properties that specify comparison options.
\r
4494 toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
\r