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 s A string to convert into a number.
\r
37 * @param radix A value between 2 and 36 that specifies the base of the number in numString.
\r
38 * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
\r
39 * All other strings are considered decimal.
\r
41 declare function parseInt(s: 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 * @param string A string value
\r
89 declare function escape(string: string): string;
\r
92 * Computes a new string in which hexadecimal escape sequences are replaced with the character that it represents.
\r
93 * @param string A string value
\r
95 declare function unescape(string: string): string;
\r
98 /** Returns a string representation of an object. */
\r
101 /** Returns the primitive value of the specified object. */
\r
105 declare type PropertyKey = string | number | symbol;
\r
107 interface PropertyDescriptor {
\r
108 configurable?: boolean;
\r
109 enumerable?: boolean;
\r
111 writable?: boolean;
\r
113 set?(v: any): void;
\r
116 interface PropertyDescriptorMap {
\r
117 [s: string]: PropertyDescriptor;
\r
121 /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */
\r
122 constructor: Function;
\r
124 /** Returns a string representation of an object. */
\r
125 toString(): string;
\r
127 /** Returns a date converted to a string using the current locale. */
\r
128 toLocaleString(): string;
\r
130 /** Returns the primitive value of the specified object. */
\r
134 * Determines whether an object has a property with the specified name.
\r
135 * @param v A property name.
\r
137 hasOwnProperty(v: PropertyKey): boolean;
\r
140 * Determines whether an object exists in another object's prototype chain.
\r
141 * @param v Another object whose prototype chain is to be checked.
\r
143 isPrototypeOf(v: Object): boolean;
\r
146 * Determines whether a specified property is enumerable.
\r
147 * @param v A property name.
\r
149 propertyIsEnumerable(v: PropertyKey): boolean;
\r
152 interface ObjectConstructor {
\r
153 new(value?: any): Object;
\r
157 /** A reference to the prototype for a class of objects. */
\r
158 readonly prototype: Object;
\r
161 * Returns the prototype of an object.
\r
162 * @param o The object that references the prototype.
\r
164 getPrototypeOf(o: any): any;
\r
167 * Gets the own property descriptor of the specified object.
\r
168 * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
\r
169 * @param o Object that contains the property.
\r
170 * @param p Name of the property.
\r
172 getOwnPropertyDescriptor(o: any, p: PropertyKey): PropertyDescriptor | undefined;
\r
175 * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly
\r
176 * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
\r
177 * @param o Object that contains the own properties.
\r
179 getOwnPropertyNames(o: any): string[];
\r
182 * Creates an object that has the specified prototype or that has null prototype.
\r
183 * @param o Object to use as a prototype. May be null.
\r
185 create(o: object | null): any;
\r
188 * Creates an object that has the specified prototype, and that optionally contains specified properties.
\r
189 * @param o Object to use as a prototype. May be null
\r
190 * @param properties JavaScript object that contains one or more property descriptors.
\r
192 create(o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;
\r
195 * Adds a property to an object, or modifies attributes of an existing property.
\r
196 * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.
\r
197 * @param p The property name.
\r
198 * @param attributes Descriptor for the property. It can be for a data property or an accessor property.
\r
200 defineProperty(o: any, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>): any;
\r
203 * Adds one or more properties to an object, and/or modifies attributes of existing properties.
\r
204 * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.
\r
205 * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.
\r
207 defineProperties(o: any, properties: PropertyDescriptorMap & ThisType<any>): any;
\r
210 * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
\r
211 * @param o Object on which to lock the attributes.
\r
216 * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
\r
217 * @param o Object on which to lock the attributes.
\r
219 freeze<T>(a: T[]): readonly T[];
\r
222 * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
\r
223 * @param o Object on which to lock the attributes.
\r
225 freeze<T extends Function>(f: T): T;
\r
228 * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
\r
229 * @param o Object on which to lock the attributes.
\r
231 freeze<T>(o: T): Readonly<T>;
\r
234 * Prevents the addition of new properties to an object.
\r
235 * @param o Object to make non-extensible.
\r
237 preventExtensions<T>(o: T): T;
\r
240 * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
\r
241 * @param o Object to test.
\r
243 isSealed(o: any): boolean;
\r
246 * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
\r
247 * @param o Object to test.
\r
249 isFrozen(o: any): boolean;
\r
252 * Returns a value that indicates whether new properties can be added to an object.
\r
253 * @param o Object to test.
\r
255 isExtensible(o: any): boolean;
\r
258 * Returns the names of the enumerable string properties and methods of an object.
\r
259 * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
\r
261 keys(o: object): string[];
\r
265 * Provides functionality common to all JavaScript objects.
\r
267 declare var Object: ObjectConstructor;
\r
270 * Creates a new function.
\r
272 interface Function {
\r
274 * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.
\r
275 * @param thisArg The object to be used as the this object.
\r
276 * @param argArray A set of arguments to be passed to the function.
\r
278 apply(this: Function, thisArg: any, argArray?: any): any;
\r
281 * Calls a method of an object, substituting another object for the current object.
\r
282 * @param thisArg The object to be used as the current object.
\r
283 * @param argArray A list of arguments to be passed to the method.
\r
285 call(this: Function, thisArg: any, ...argArray: any[]): any;
\r
288 * For a given function, creates a bound function that has the same body as the original function.
\r
289 * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
\r
290 * @param thisArg An object to which the this keyword can refer inside the new function.
\r
291 * @param argArray A list of arguments to be passed to the new function.
\r
293 bind(this: Function, thisArg: any, ...argArray: any[]): any;
\r
295 /** Returns a string representation of a function. */
\r
296 toString(): string;
\r
299 readonly length: number;
\r
301 // Non-standard extensions
\r
306 interface FunctionConstructor {
\r
308 * Creates a new function.
\r
309 * @param args A list of arguments the function accepts.
\r
311 new(...args: string[]): Function;
\r
312 (...args: string[]): Function;
\r
313 readonly prototype: Function;
\r
316 declare var Function: FunctionConstructor;
\r
319 * Extracts the type of the 'this' parameter of a function type, or 'unknown' if the function type has no 'this' parameter.
\r
321 type ThisParameterType<T> = T extends (this: infer U, ...args: any[]) => any ? U : unknown;
\r
324 * Removes the 'this' parameter from a function type.
\r
326 type OmitThisParameter<T> = unknown extends ThisParameterType<T> ? T : T extends (...args: infer A) => infer R ? (...args: A) => R : T;
\r
328 interface CallableFunction extends Function {
\r
330 * Calls the function with the specified object as the this value and the elements of specified array as the arguments.
\r
331 * @param thisArg The object to be used as the this object.
\r
332 * @param args An array of argument values to be passed to the function.
\r
334 apply<T, R>(this: (this: T) => R, thisArg: T): R;
\r
335 apply<T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R;
\r
338 * Calls the function with the specified object as the this value and the specified rest arguments as the arguments.
\r
339 * @param thisArg The object to be used as the this object.
\r
340 * @param args Argument values to be passed to the function.
\r
342 call<T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R;
\r
345 * For a given function, creates a bound function that has the same body as the original function.
\r
346 * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
\r
347 * @param thisArg The object to be used as the this object.
\r
348 * @param args Arguments to bind to the parameters of the function.
\r
350 bind<T>(this: T, thisArg: ThisParameterType<T>): OmitThisParameter<T>;
\r
351 bind<T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R;
\r
352 bind<T, A0, A1, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R;
\r
353 bind<T, A0, A1, A2, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R;
\r
354 bind<T, A0, A1, A2, A3, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R;
\r
355 bind<T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R;
\r
358 interface NewableFunction extends Function {
\r
360 * Calls the function with the specified object as the this value and the elements of specified array as the arguments.
\r
361 * @param thisArg The object to be used as the this object.
\r
362 * @param args An array of argument values to be passed to the function.
\r
364 apply<T>(this: new () => T, thisArg: T): void;
\r
365 apply<T, A extends any[]>(this: new (...args: A) => T, thisArg: T, args: A): void;
\r
368 * Calls the function with the specified object as the this value and the specified rest arguments as the arguments.
\r
369 * @param thisArg The object to be used as the this object.
\r
370 * @param args Argument values to be passed to the function.
\r
372 call<T, A extends any[]>(this: new (...args: A) => T, thisArg: T, ...args: A): void;
\r
375 * For a given function, creates a bound function that has the same body as the original function.
\r
376 * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
\r
377 * @param thisArg The object to be used as the this object.
\r
378 * @param args Arguments to bind to the parameters of the function.
\r
380 bind<T>(this: T, thisArg: any): T;
\r
381 bind<A0, A extends any[], R>(this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R;
\r
382 bind<A0, A1, A extends any[], R>(this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R;
\r
383 bind<A0, A1, A2, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R;
\r
384 bind<A0, A1, A2, A3, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R;
\r
385 bind<AX, R>(this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R;
\r
388 interface IArguments {
\r
389 [index: number]: any;
\r
395 /** Returns a string representation of a string. */
\r
396 toString(): string;
\r
399 * Returns the character at the specified index.
\r
400 * @param pos The zero-based index of the desired character.
\r
402 charAt(pos: number): string;
\r
405 * Returns the Unicode value of the character at the specified location.
\r
406 * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.
\r
408 charCodeAt(index: number): number;
\r
411 * Returns a string that contains the concatenation of two or more strings.
\r
412 * @param strings The strings to append to the end of the string.
\r
414 concat(...strings: string[]): string;
\r
417 * Returns the position of the first occurrence of a substring.
\r
418 * @param searchString The substring to search for in the string
\r
419 * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
\r
421 indexOf(searchString: string, position?: number): number;
\r
424 * Returns the last occurrence of a substring in the string.
\r
425 * @param searchString The substring to search for.
\r
426 * @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
\r
428 lastIndexOf(searchString: string, position?: number): number;
\r
431 * Determines whether two strings are equivalent in the current locale.
\r
432 * @param that String to compare to target string
\r
434 localeCompare(that: string): number;
\r
437 * Matches a string with a regular expression, and returns an array containing the results of that search.
\r
438 * @param regexp A variable name or string literal containing the regular expression pattern and flags.
\r
440 match(regexp: string | RegExp): RegExpMatchArray | null;
\r
443 * Replaces text in a string, using a regular expression or search string.
\r
444 * @param searchValue A string to search for.
\r
445 * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
\r
447 replace(searchValue: string | RegExp, replaceValue: string): string;
\r
450 * Replaces text in a string, using a regular expression or search string.
\r
451 * @param searchValue A string to search for.
\r
452 * @param replacer A function that returns the replacement text.
\r
454 replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
\r
457 * Finds the first substring match in a regular expression search.
\r
458 * @param regexp The regular expression pattern and applicable flags.
\r
460 search(regexp: string | RegExp): number;
\r
463 * Returns a section of a string.
\r
464 * @param start The index to the beginning of the specified portion of stringObj.
\r
465 * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.
\r
466 * If this value is not specified, the substring continues to the end of stringObj.
\r
468 slice(start?: number, end?: number): string;
\r
471 * Split a string into substrings using the specified separator and return them as an array.
\r
472 * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.
\r
473 * @param limit A value used to limit the number of elements returned in the array.
\r
475 split(separator: string | RegExp, limit?: number): string[];
\r
478 * Returns the substring at the specified location within a String object.
\r
479 * @param start The zero-based index number indicating the beginning of the substring.
\r
480 * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.
\r
481 * If end is omitted, the characters from start through the end of the original string are returned.
\r
483 substring(start: number, end?: number): string;
\r
485 /** Converts all the alphabetic characters in a string to lowercase. */
\r
486 toLowerCase(): string;
\r
488 /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
\r
489 toLocaleLowerCase(locales?: string | string[]): string;
\r
491 /** Converts all the alphabetic characters in a string to uppercase. */
\r
492 toUpperCase(): string;
\r
494 /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */
\r
495 toLocaleUpperCase(locales?: string | string[]): string;
\r
497 /** Removes the leading and trailing white space and line terminator characters from a string. */
\r
500 /** Returns the length of a String object. */
\r
501 readonly length: number;
\r
505 * Gets a substring beginning at the specified location and having the specified length.
\r
506 * @param from The starting position of the desired substring. The index of the first character in the string is zero.
\r
507 * @param length The number of characters to include in the returned substring.
\r
509 substr(from: number, length?: number): string;
\r
511 /** Returns the primitive value of the specified object. */
\r
514 readonly [index: number]: string;
\r
517 interface StringConstructor {
\r
518 new(value?: any): String;
\r
519 (value?: any): string;
\r
520 readonly prototype: String;
\r
521 fromCharCode(...codes: number[]): string;
\r
525 * Allows manipulation and formatting of text strings and determination and location of substrings within strings.
\r
527 declare var String: StringConstructor;
\r
529 interface Boolean {
\r
530 /** Returns the primitive value of the specified object. */
\r
531 valueOf(): boolean;
\r
534 interface BooleanConstructor {
\r
535 new(value?: any): Boolean;
\r
536 <T>(value?: T): boolean;
\r
537 readonly prototype: Boolean;
\r
540 declare var Boolean: BooleanConstructor;
\r
544 * Returns a string representation of an object.
\r
545 * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.
\r
547 toString(radix?: number): string;
\r
550 * Returns a string representing a number in fixed-point notation.
\r
551 * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
\r
553 toFixed(fractionDigits?: number): string;
\r
556 * Returns a string containing a number represented in exponential notation.
\r
557 * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
\r
559 toExponential(fractionDigits?: number): string;
\r
562 * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
\r
563 * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
\r
565 toPrecision(precision?: number): string;
\r
567 /** Returns the primitive value of the specified object. */
\r
571 interface NumberConstructor {
\r
572 new(value?: any): Number;
\r
573 (value?: any): number;
\r
574 readonly prototype: Number;
\r
576 /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */
\r
577 readonly MAX_VALUE: number;
\r
579 /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */
\r
580 readonly MIN_VALUE: number;
\r
583 * A value that is not a number.
\r
584 * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.
\r
586 readonly NaN: number;
\r
589 * A value that is less than the largest negative number that can be represented in JavaScript.
\r
590 * JavaScript displays NEGATIVE_INFINITY values as -infinity.
\r
592 readonly NEGATIVE_INFINITY: number;
\r
595 * A value greater than the largest number that can be represented in JavaScript.
\r
596 * JavaScript displays POSITIVE_INFINITY values as infinity.
\r
598 readonly POSITIVE_INFINITY: number;
\r
601 /** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */
\r
602 declare var Number: NumberConstructor;
\r
604 interface TemplateStringsArray extends ReadonlyArray<string> {
\r
605 readonly raw: readonly string[];
\r
609 * The type of `import.meta`.
\r
611 * If you need to declare that a given property exists on `import.meta`,
\r
612 * this type may be augmented via interface merging.
\r
614 interface ImportMeta {
\r
618 /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */
\r
619 readonly E: number;
\r
620 /** The natural logarithm of 10. */
\r
621 readonly LN10: number;
\r
622 /** The natural logarithm of 2. */
\r
623 readonly LN2: number;
\r
624 /** The base-2 logarithm of e. */
\r
625 readonly LOG2E: number;
\r
626 /** The base-10 logarithm of e. */
\r
627 readonly LOG10E: number;
\r
628 /** Pi. This is the ratio of the circumference of a circle to its diameter. */
\r
629 readonly PI: number;
\r
630 /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */
\r
631 readonly SQRT1_2: number;
\r
632 /** The square root of 2. */
\r
633 readonly SQRT2: number;
\r
635 * Returns the absolute value of a number (the value without regard to whether it is positive or negative).
\r
636 * For example, the absolute value of -5 is the same as the absolute value of 5.
\r
637 * @param x A numeric expression for which the absolute value is needed.
\r
639 abs(x: number): number;
\r
641 * Returns the arc cosine (or inverse cosine) of a number.
\r
642 * @param x A numeric expression.
\r
644 acos(x: number): number;
\r
646 * Returns the arcsine of a number.
\r
647 * @param x A numeric expression.
\r
649 asin(x: number): number;
\r
651 * Returns the arctangent of a number.
\r
652 * @param x A numeric expression for which the arctangent is needed.
\r
654 atan(x: number): number;
\r
656 * Returns the angle (in radians) from the X axis to a point.
\r
657 * @param y A numeric expression representing the cartesian y-coordinate.
\r
658 * @param x A numeric expression representing the cartesian x-coordinate.
\r
660 atan2(y: number, x: number): number;
\r
662 * Returns the smallest integer greater than or equal to its numeric argument.
\r
663 * @param x A numeric expression.
\r
665 ceil(x: number): number;
\r
667 * Returns the cosine of a number.
\r
668 * @param x A numeric expression that contains an angle measured in radians.
\r
670 cos(x: number): number;
\r
672 * Returns e (the base of natural logarithms) raised to a power.
\r
673 * @param x A numeric expression representing the power of e.
\r
675 exp(x: number): number;
\r
677 * Returns the greatest integer less than or equal to its numeric argument.
\r
678 * @param x A numeric expression.
\r
680 floor(x: number): number;
\r
682 * Returns the natural logarithm (base e) of a number.
\r
683 * @param x A numeric expression.
\r
685 log(x: number): number;
\r
687 * Returns the larger of a set of supplied numeric expressions.
\r
688 * @param values Numeric expressions to be evaluated.
\r
690 max(...values: number[]): number;
\r
692 * Returns the smaller of a set of supplied numeric expressions.
\r
693 * @param values Numeric expressions to be evaluated.
\r
695 min(...values: number[]): number;
\r
697 * Returns the value of a base expression taken to a specified power.
\r
698 * @param x The base value of the expression.
\r
699 * @param y The exponent value of the expression.
\r
701 pow(x: number, y: number): number;
\r
702 /** Returns a pseudorandom number between 0 and 1. */
\r
705 * Returns a supplied numeric expression rounded to the nearest integer.
\r
706 * @param x The value to be rounded to the nearest integer.
\r
708 round(x: number): number;
\r
710 * Returns the sine of a number.
\r
711 * @param x A numeric expression that contains an angle measured in radians.
\r
713 sin(x: number): number;
\r
715 * Returns the square root of a number.
\r
716 * @param x A numeric expression.
\r
718 sqrt(x: number): number;
\r
720 * Returns the tangent of a number.
\r
721 * @param x A numeric expression that contains an angle measured in radians.
\r
723 tan(x: number): number;
\r
725 /** An intrinsic object that provides basic mathematics functionality and constants. */
\r
726 declare var Math: Math;
\r
728 /** Enables basic storage and retrieval of dates and times. */
\r
730 /** Returns a string representation of a date. The format of the string depends on the locale. */
\r
731 toString(): string;
\r
732 /** Returns a date as a string value. */
\r
733 toDateString(): string;
\r
734 /** Returns a time as a string value. */
\r
735 toTimeString(): string;
\r
736 /** Returns a value as a string value appropriate to the host environment's current locale. */
\r
737 toLocaleString(): string;
\r
738 /** Returns a date as a string value appropriate to the host environment's current locale. */
\r
739 toLocaleDateString(): string;
\r
740 /** Returns a time as a string value appropriate to the host environment's current locale. */
\r
741 toLocaleTimeString(): string;
\r
742 /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */
\r
744 /** Gets the time value in milliseconds. */
\r
746 /** Gets the year, using local time. */
\r
747 getFullYear(): number;
\r
748 /** Gets the year using Universal Coordinated Time (UTC). */
\r
749 getUTCFullYear(): number;
\r
750 /** Gets the month, using local time. */
\r
751 getMonth(): number;
\r
752 /** Gets the month of a Date object using Universal Coordinated Time (UTC). */
\r
753 getUTCMonth(): number;
\r
754 /** Gets the day-of-the-month, using local time. */
\r
756 /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */
\r
757 getUTCDate(): number;
\r
758 /** Gets the day of the week, using local time. */
\r
760 /** Gets the day of the week using Universal Coordinated Time (UTC). */
\r
761 getUTCDay(): number;
\r
762 /** Gets the hours in a date, using local time. */
\r
763 getHours(): number;
\r
764 /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */
\r
765 getUTCHours(): number;
\r
766 /** Gets the minutes of a Date object, using local time. */
\r
767 getMinutes(): number;
\r
768 /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */
\r
769 getUTCMinutes(): number;
\r
770 /** Gets the seconds of a Date object, using local time. */
\r
771 getSeconds(): number;
\r
772 /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */
\r
773 getUTCSeconds(): number;
\r
774 /** Gets the milliseconds of a Date, using local time. */
\r
775 getMilliseconds(): number;
\r
776 /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */
\r
777 getUTCMilliseconds(): number;
\r
778 /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */
\r
779 getTimezoneOffset(): number;
\r
781 * Sets the date and time value in the Date object.
\r
782 * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
\r
784 setTime(time: number): number;
\r
786 * Sets the milliseconds value in the Date object using local time.
\r
787 * @param ms A numeric value equal to the millisecond value.
\r
789 setMilliseconds(ms: number): number;
\r
791 * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
\r
792 * @param ms A numeric value equal to the millisecond value.
\r
794 setUTCMilliseconds(ms: number): number;
\r
797 * Sets the seconds value in the Date object using local time.
\r
798 * @param sec A numeric value equal to the seconds value.
\r
799 * @param ms A numeric value equal to the milliseconds value.
\r
801 setSeconds(sec: number, ms?: number): number;
\r
803 * Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
\r
804 * @param sec A numeric value equal to the seconds value.
\r
805 * @param ms A numeric value equal to the milliseconds value.
\r
807 setUTCSeconds(sec: number, ms?: number): number;
\r
809 * Sets the minutes value in the Date object using local time.
\r
810 * @param min A numeric value equal to the minutes value.
\r
811 * @param sec A numeric value equal to the seconds value.
\r
812 * @param ms A numeric value equal to the milliseconds value.
\r
814 setMinutes(min: number, sec?: number, ms?: number): number;
\r
816 * Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
\r
817 * @param min A numeric value equal to the minutes value.
\r
818 * @param sec A numeric value equal to the seconds value.
\r
819 * @param ms A numeric value equal to the milliseconds value.
\r
821 setUTCMinutes(min: number, sec?: number, ms?: number): number;
\r
823 * Sets the hour value in the Date object using local time.
\r
824 * @param hours A numeric value equal to the hours value.
\r
825 * @param min A numeric value equal to the minutes value.
\r
826 * @param sec A numeric value equal to the seconds value.
\r
827 * @param ms A numeric value equal to the milliseconds value.
\r
829 setHours(hours: number, min?: number, sec?: number, ms?: number): number;
\r
831 * Sets the hours value in the Date object using Universal Coordinated Time (UTC).
\r
832 * @param hours A numeric value equal to the hours value.
\r
833 * @param min A numeric value equal to the minutes value.
\r
834 * @param sec A numeric value equal to the seconds value.
\r
835 * @param ms A numeric value equal to the milliseconds value.
\r
837 setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
\r
839 * Sets the numeric day-of-the-month value of the Date object using local time.
\r
840 * @param date A numeric value equal to the day of the month.
\r
842 setDate(date: number): number;
\r
844 * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
\r
845 * @param date A numeric value equal to the day of the month.
\r
847 setUTCDate(date: number): number;
\r
849 * Sets the month value in the Date object using local time.
\r
850 * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
\r
851 * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.
\r
853 setMonth(month: number, date?: number): number;
\r
855 * Sets the month value in the Date object using Universal Coordinated Time (UTC).
\r
856 * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
\r
857 * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.
\r
859 setUTCMonth(month: number, date?: number): number;
\r
861 * Sets the year of the Date object using local time.
\r
862 * @param year A numeric value for the year.
\r
863 * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
\r
864 * @param date A numeric value equal for the day of the month.
\r
866 setFullYear(year: number, month?: number, date?: number): number;
\r
868 * Sets the year value in the Date object using Universal Coordinated Time (UTC).
\r
869 * @param year A numeric value equal to the year.
\r
870 * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.
\r
871 * @param date A numeric value equal to the day of the month.
\r
873 setUTCFullYear(year: number, month?: number, date?: number): number;
\r
874 /** Returns a date converted to a string using Universal Coordinated Time (UTC). */
\r
875 toUTCString(): string;
\r
876 /** Returns a date as a string value in ISO format. */
\r
877 toISOString(): string;
\r
878 /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */
\r
879 toJSON(key?: any): string;
\r
882 interface DateConstructor {
\r
884 new(value: number | string): Date;
\r
885 new(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
\r
887 readonly prototype: Date;
\r
889 * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.
\r
890 * @param s A date string
\r
892 parse(s: string): number;
\r
894 * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
\r
895 * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
\r
896 * @param month The month as a number between 0 and 11 (January to December).
\r
897 * @param date The date as a number between 1 and 31.
\r
898 * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.
\r
899 * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.
\r
900 * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.
\r
901 * @param ms A number from 0 to 999 that specifies the milliseconds.
\r
903 UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
\r
907 declare var Date: DateConstructor;
\r
909 interface RegExpMatchArray extends Array<string> {
\r
914 interface RegExpExecArray extends Array<string> {
\r
921 * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.
\r
922 * @param string The String object or string literal on which to perform the search.
\r
924 exec(string: string): RegExpExecArray | null;
\r
927 * Returns a Boolean value that indicates whether or not a pattern exists in a searched string.
\r
928 * @param string String on which to perform the search.
\r
930 test(string: string): boolean;
\r
932 /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */
\r
933 readonly source: string;
\r
935 /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */
\r
936 readonly global: boolean;
\r
938 /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */
\r
939 readonly ignoreCase: boolean;
\r
941 /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */
\r
942 readonly multiline: boolean;
\r
946 // Non-standard extensions
\r
950 interface RegExpConstructor {
\r
951 new(pattern: RegExp | string): RegExp;
\r
952 new(pattern: string, flags?: string): RegExp;
\r
953 (pattern: RegExp | string): RegExp;
\r
954 (pattern: string, flags?: string): RegExp;
\r
955 readonly prototype: RegExp;
\r
957 // Non-standard extensions
\r
970 declare var RegExp: RegExpConstructor;
\r
978 interface ErrorConstructor {
\r
979 new(message?: string): Error;
\r
980 (message?: string): Error;
\r
981 readonly prototype: Error;
\r
984 declare var Error: ErrorConstructor;
\r
986 interface EvalError extends Error {
\r
989 interface EvalErrorConstructor extends ErrorConstructor {
\r
990 new(message?: string): EvalError;
\r
991 (message?: string): EvalError;
\r
992 readonly prototype: EvalError;
\r
995 declare var EvalError: EvalErrorConstructor;
\r
997 interface RangeError extends Error {
\r
1000 interface RangeErrorConstructor extends ErrorConstructor {
\r
1001 new(message?: string): RangeError;
\r
1002 (message?: string): RangeError;
\r
1003 readonly prototype: RangeError;
\r
1006 declare var RangeError: RangeErrorConstructor;
\r
1008 interface ReferenceError extends Error {
\r
1011 interface ReferenceErrorConstructor extends ErrorConstructor {
\r
1012 new(message?: string): ReferenceError;
\r
1013 (message?: string): ReferenceError;
\r
1014 readonly prototype: ReferenceError;
\r
1017 declare var ReferenceError: ReferenceErrorConstructor;
\r
1019 interface SyntaxError extends Error {
\r
1022 interface SyntaxErrorConstructor extends ErrorConstructor {
\r
1023 new(message?: string): SyntaxError;
\r
1024 (message?: string): SyntaxError;
\r
1025 readonly prototype: SyntaxError;
\r
1028 declare var SyntaxError: SyntaxErrorConstructor;
\r
1030 interface TypeError extends Error {
\r
1033 interface TypeErrorConstructor extends ErrorConstructor {
\r
1034 new(message?: string): TypeError;
\r
1035 (message?: string): TypeError;
\r
1036 readonly prototype: TypeError;
\r
1039 declare var TypeError: TypeErrorConstructor;
\r
1041 interface URIError extends Error {
\r
1044 interface URIErrorConstructor extends ErrorConstructor {
\r
1045 new(message?: string): URIError;
\r
1046 (message?: string): URIError;
\r
1047 readonly prototype: URIError;
\r
1050 declare var URIError: URIErrorConstructor;
\r
1054 * Converts a JavaScript Object Notation (JSON) string into an object.
\r
1055 * @param text A valid JSON string.
\r
1056 * @param reviver A function that transforms the results. This function is called for each member of the object.
\r
1057 * If a member contains nested objects, the nested objects are transformed before the parent object is.
\r
1059 parse(text: string, reviver?: (this: any, key: string, value: any) => any): any;
\r
1061 * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
\r
1062 * @param value A JavaScript value, usually an object or array, to be converted.
\r
1063 * @param replacer A function that transforms the results.
\r
1064 * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
\r
1066 stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
\r
1068 * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
\r
1069 * @param value A JavaScript value, usually an object or array, to be converted.
\r
1070 * @param replacer An array of strings and numbers that acts as a approved list for selecting the object properties that will be stringified.
\r
1071 * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
\r
1073 stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
\r
1077 * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
\r
1079 declare var JSON: JSON;
\r
1082 /////////////////////////////
\r
1083 /// ECMAScript Array API (specially handled by compiler)
\r
1084 /////////////////////////////
\r
1086 interface ReadonlyArray<T> {
\r
1088 * Gets the length of the array. This is a number one higher than the highest element defined in an array.
\r
1090 readonly length: number;
\r
1092 * Returns a string representation of an array.
\r
1094 toString(): string;
\r
1096 * Returns a string representation of an array. The elements are converted to string using their toLocalString methods.
\r
1098 toLocaleString(): string;
\r
1100 * Combines two or more arrays.
\r
1101 * @param items Additional items to add to the end of array1.
\r
1103 concat(...items: ConcatArray<T>[]): T[];
\r
1105 * Combines two or more arrays.
\r
1106 * @param items Additional items to add to the end of array1.
\r
1108 concat(...items: (T | ConcatArray<T>)[]): T[];
\r
1110 * Adds all the elements of an array separated by the specified separator string.
\r
1111 * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
\r
1113 join(separator?: string): string;
\r
1115 * Returns a section of an array.
\r
1116 * @param start The beginning of the specified portion of the array.
\r
1117 * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
\r
1119 slice(start?: number, end?: number): T[];
\r
1121 * Returns the index of the first occurrence of a value in an array.
\r
1122 * @param searchElement The value to locate in the array.
\r
1123 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
\r
1125 indexOf(searchElement: T, fromIndex?: number): number;
\r
1127 * Returns the index of the last occurrence of a specified value in an array.
\r
1128 * @param searchElement The value to locate in the array.
\r
1129 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
\r
1131 lastIndexOf(searchElement: T, fromIndex?: number): number;
\r
1133 * Determines whether all the members of an array satisfy the specified test.
\r
1134 * @param callbackfn A function that accepts up to three arguments. The every method calls
\r
1135 * the callbackfn function for each element in the array until the callbackfn returns a value
\r
1136 * which is coercible to the Boolean value false, or until the end of the array.
\r
1137 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
1138 * If thisArg is omitted, undefined is used as the this value.
\r
1140 every(callbackfn: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean;
\r
1142 * Determines whether the specified callback function returns true for any element of an array.
\r
1143 * @param callbackfn A function that accepts up to three arguments. The some method calls
\r
1144 * the callbackfn function for each element in the array until the callbackfn returns a value
\r
1145 * which is coercible to the Boolean value true, or until the end of the array.
\r
1146 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
1147 * If thisArg is omitted, undefined is used as the this value.
\r
1149 some(callbackfn: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean;
\r
1151 * Performs the specified action for each element in an array.
\r
1152 * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
\r
1153 * @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
1155 forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void;
\r
1157 * Calls a defined callback function on each element of an array, and returns an array that contains the results.
\r
1158 * @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
1159 * @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
1161 map<U>(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[];
\r
1163 * Returns the elements of an array that meet the condition specified in a callback function.
\r
1164 * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
\r
1165 * @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
1167 filter<S extends T>(callbackfn: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[];
\r
1169 * Returns the elements of an array that meet the condition specified in a callback function.
\r
1170 * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
\r
1171 * @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
1173 filter(callbackfn: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[];
\r
1175 * 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
1176 * @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
1177 * @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
1179 reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T;
\r
1180 reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T;
\r
1182 * 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
1183 * @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
1184 * @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
1186 reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U;
\r
1188 * 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
1189 * @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
1190 * @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
1192 reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T;
\r
1193 reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T;
\r
1195 * 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
1196 * @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
1197 * @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
1199 reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U;
\r
1201 readonly [n: number]: T;
\r
1204 interface ConcatArray<T> {
\r
1205 readonly length: number;
\r
1206 readonly [n: number]: T;
\r
1207 join(separator?: string): string;
\r
1208 slice(start?: number, end?: number): T[];
\r
1211 interface Array<T> {
\r
1213 * Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.
\r
1217 * Returns a string representation of an array.
\r
1219 toString(): string;
\r
1221 * Returns a string representation of an array. The elements are converted to string using their toLocalString methods.
\r
1223 toLocaleString(): string;
\r
1225 * Removes the last element from an array and returns it.
\r
1227 pop(): T | undefined;
\r
1229 * Appends new elements to an array, and returns the new length of the array.
\r
1230 * @param items New elements of the Array.
\r
1232 push(...items: T[]): number;
\r
1234 * Combines two or more arrays.
\r
1235 * @param items Additional items to add to the end of array1.
\r
1237 concat(...items: ConcatArray<T>[]): T[];
\r
1239 * Combines two or more arrays.
\r
1240 * @param items Additional items to add to the end of array1.
\r
1242 concat(...items: (T | ConcatArray<T>)[]): T[];
\r
1244 * Adds all the elements of an array separated by the specified separator string.
\r
1245 * @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
1247 join(separator?: string): string;
\r
1249 * Reverses the elements in an Array.
\r
1253 * Removes the first element from an array and returns it.
\r
1255 shift(): T | undefined;
\r
1257 * Returns a section of an array.
\r
1258 * @param start The beginning of the specified portion of the array.
\r
1259 * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
\r
1261 slice(start?: number, end?: number): T[];
\r
1264 * @param compareFn Function used to determine the order of the elements. It is expected to return
\r
1265 * a negative value if first argument is less than second argument, zero if they're equal and a positive
\r
1266 * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
\r
1268 * [11,2,22,1].sort((a, b) => a - b)
\r
1271 sort(compareFn?: (a: T, b: T) => number): this;
\r
1273 * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
\r
1274 * @param start The zero-based location in the array from which to start removing elements.
\r
1275 * @param deleteCount The number of elements to remove.
\r
1277 splice(start: number, deleteCount?: number): T[];
\r
1279 * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
\r
1280 * @param start The zero-based location in the array from which to start removing elements.
\r
1281 * @param deleteCount The number of elements to remove.
\r
1282 * @param items Elements to insert into the array in place of the deleted elements.
\r
1284 splice(start: number, deleteCount: number, ...items: T[]): T[];
\r
1286 * Inserts new elements at the start of an array.
\r
1287 * @param items Elements to insert at the start of the Array.
\r
1289 unshift(...items: T[]): number;
\r
1291 * Returns the index of the first occurrence of a value in an array.
\r
1292 * @param searchElement The value to locate in the array.
\r
1293 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
\r
1295 indexOf(searchElement: T, fromIndex?: number): number;
\r
1297 * Returns the index of the last occurrence of a specified value in an array.
\r
1298 * @param searchElement The value to locate in the array.
\r
1299 * @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
1301 lastIndexOf(searchElement: T, fromIndex?: number): number;
\r
1303 * Determines whether all the members of an array satisfy the specified test.
\r
1304 * @param callbackfn A function that accepts up to three arguments. The every method calls
\r
1305 * the callbackfn function for each element in the array until the callbackfn returns a value
\r
1306 * which is coercible to the Boolean value false, or until the end of the array.
\r
1307 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
1308 * If thisArg is omitted, undefined is used as the this value.
\r
1310 every(callbackfn: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean;
\r
1312 * Determines whether the specified callback function returns true for any element of an array.
\r
1313 * @param callbackfn A function that accepts up to three arguments. The some method calls
\r
1314 * the callbackfn function for each element in the array until the callbackfn returns a value
\r
1315 * which is coercible to the Boolean value true, or until the end of the array.
\r
1316 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
1317 * If thisArg is omitted, undefined is used as the this value.
\r
1319 some(callbackfn: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean;
\r
1321 * Performs the specified action for each element in an array.
\r
1322 * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
\r
1323 * @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
1325 forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void;
\r
1327 * Calls a defined callback function on each element of an array, and returns an array that contains the results.
\r
1328 * @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
1329 * @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
1331 map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];
\r
1333 * Returns the elements of an array that meet the condition specified in a callback function.
\r
1334 * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
\r
1335 * @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
1337 filter<S extends T>(callbackfn: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[];
\r
1339 * Returns the elements of an array that meet the condition specified in a callback function.
\r
1340 * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
\r
1341 * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
\r
1343 filter(callbackfn: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[];
\r
1345 * 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
1346 * @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
1347 * @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
1349 reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T;
\r
1350 reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T;
\r
1352 * 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
1353 * @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
1354 * @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
1356 reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
\r
1358 * 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
1359 * @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
1360 * @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
1362 reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T;
\r
1363 reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T;
\r
1365 * 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
1366 * @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
1367 * @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
1369 reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
\r
1374 interface ArrayConstructor {
\r
1375 new(arrayLength?: number): any[];
\r
1376 new <T>(arrayLength: number): T[];
\r
1377 new <T>(...items: T[]): T[];
\r
1378 (arrayLength?: number): any[];
\r
1379 <T>(arrayLength: number): T[];
\r
1380 <T>(...items: T[]): T[];
\r
1381 isArray(arg: any): arg is any[];
\r
1382 readonly prototype: any[];
\r
1385 declare var Array: ArrayConstructor;
\r
1387 interface TypedPropertyDescriptor<T> {
\r
1388 enumerable?: boolean;
\r
1389 configurable?: boolean;
\r
1390 writable?: boolean;
\r
1393 set?: (value: T) => void;
\r
1396 declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
\r
1397 declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
\r
1398 declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
\r
1399 declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
\r
1401 declare type PromiseConstructorLike = new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) => PromiseLike<T>;
\r
1403 interface PromiseLike<T> {
\r
1405 * Attaches callbacks for the resolution and/or rejection of the Promise.
\r
1406 * @param onfulfilled The callback to execute when the Promise is resolved.
\r
1407 * @param onrejected The callback to execute when the Promise is rejected.
\r
1408 * @returns A Promise for the completion of which ever callback is executed.
\r
1410 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
1414 * Represents the completion of an asynchronous operation
\r
1416 interface Promise<T> {
\r
1418 * Attaches callbacks for the resolution and/or rejection of the Promise.
\r
1419 * @param onfulfilled The callback to execute when the Promise is resolved.
\r
1420 * @param onrejected The callback to execute when the Promise is rejected.
\r
1421 * @returns A Promise for the completion of which ever callback is executed.
\r
1423 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
1426 * Attaches a callback for only the rejection of the Promise.
\r
1427 * @param onrejected The callback to execute when the Promise is rejected.
\r
1428 * @returns A Promise for the completion of the callback.
\r
1430 catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
\r
1433 interface ArrayLike<T> {
\r
1434 readonly length: number;
\r
1435 readonly [n: number]: T;
\r
1439 * Make all properties in T optional
\r
1441 type Partial<T> = {
\r
1442 [P in keyof T]?: T[P];
\r
1446 * Make all properties in T required
\r
1448 type Required<T> = {
\r
1449 [P in keyof T]-?: T[P];
\r
1453 * Make all properties in T readonly
\r
1455 type Readonly<T> = {
\r
1456 readonly [P in keyof T]: T[P];
\r
1460 * From T, pick a set of properties whose keys are in the union K
\r
1462 type Pick<T, K extends keyof T> = {
\r
1467 * Construct a type with a set of properties K of type T
\r
1469 type Record<K extends keyof any, T> = {
\r
1474 * Exclude from T those types that are assignable to U
\r
1476 type Exclude<T, U> = T extends U ? never : T;
\r
1479 * Extract from T those types that are assignable to U
\r
1481 type Extract<T, U> = T extends U ? T : never;
\r
1484 * Construct a type with the properties of T except for those in type K.
\r
1486 type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
\r
1489 * Exclude null and undefined from T
\r
1491 type NonNullable<T> = T extends null | undefined ? never : T;
\r
1494 * Obtain the parameters of a function type in a tuple
\r
1496 type Parameters<T extends (...args: any) => any> = T extends (...args: infer P) => any ? P : never;
\r
1499 * Obtain the parameters of a constructor function type in a tuple
\r
1501 type ConstructorParameters<T extends new (...args: any) => any> = T extends new (...args: infer P) => any ? P : never;
\r
1504 * Obtain the return type of a function type
\r
1506 type ReturnType<T extends (...args: any) => any> = T extends (...args: any) => infer R ? R : any;
\r
1509 * Obtain the return type of a constructor function type
\r
1511 type InstanceType<T extends new (...args: any) => any> = T extends new (...args: any) => infer R ? R : any;
\r
1514 * Marker for contextual 'this' type
\r
1516 interface ThisType<T> { }
\r
1519 * Represents a raw buffer of binary data, which is used to store data for the
\r
1520 * different typed arrays. ArrayBuffers cannot be read from or written to directly,
\r
1521 * but can be passed to a typed array or DataView Object to interpret the raw
\r
1522 * buffer as needed.
\r
1524 interface ArrayBuffer {
\r
1526 * Read-only. The length of the ArrayBuffer (in bytes).
\r
1528 readonly byteLength: number;
\r
1531 * Returns a section of an ArrayBuffer.
\r
1533 slice(begin: number, end?: number): ArrayBuffer;
\r
1537 * Allowed ArrayBuffer types for the buffer of an ArrayBufferView and related Typed Arrays.
\r
1539 interface ArrayBufferTypes {
\r
1540 ArrayBuffer: ArrayBuffer;
\r
1542 type ArrayBufferLike = ArrayBufferTypes[keyof ArrayBufferTypes];
\r
1544 interface ArrayBufferConstructor {
\r
1545 readonly prototype: ArrayBuffer;
\r
1546 new(byteLength: number): ArrayBuffer;
\r
1547 isView(arg: any): arg is ArrayBufferView;
\r
1549 declare var ArrayBuffer: ArrayBufferConstructor;
\r
1551 interface ArrayBufferView {
\r
1553 * The ArrayBuffer instance referenced by the array.
\r
1555 buffer: ArrayBufferLike;
\r
1558 * The length in bytes of the array.
\r
1560 byteLength: number;
\r
1563 * The offset in bytes of the array.
\r
1565 byteOffset: number;
\r
1568 interface DataView {
\r
1569 readonly buffer: ArrayBuffer;
\r
1570 readonly byteLength: number;
\r
1571 readonly byteOffset: number;
\r
1573 * Gets the Float32 value at the specified byte offset from the start of the view. There is
\r
1574 * no alignment constraint; multi-byte values may be fetched from any offset.
\r
1575 * @param byteOffset The place in the buffer at which the value should be retrieved.
\r
1577 getFloat32(byteOffset: number, littleEndian?: boolean): number;
\r
1580 * Gets the Float64 value at the specified byte offset from the start of the view. There is
\r
1581 * no alignment constraint; multi-byte values may be fetched from any offset.
\r
1582 * @param byteOffset The place in the buffer at which the value should be retrieved.
\r
1584 getFloat64(byteOffset: number, littleEndian?: boolean): number;
\r
1587 * Gets the Int8 value at the specified byte offset from the start of the view. There is
\r
1588 * no alignment constraint; multi-byte values may be fetched from any offset.
\r
1589 * @param byteOffset The place in the buffer at which the value should be retrieved.
\r
1591 getInt8(byteOffset: number): number;
\r
1594 * Gets the Int16 value at the specified byte offset from the start of the view. There is
\r
1595 * no alignment constraint; multi-byte values may be fetched from any offset.
\r
1596 * @param byteOffset The place in the buffer at which the value should be retrieved.
\r
1598 getInt16(byteOffset: number, littleEndian?: boolean): number;
\r
1600 * Gets the Int32 value at the specified byte offset from the start of the view. There is
\r
1601 * no alignment constraint; multi-byte values may be fetched from any offset.
\r
1602 * @param byteOffset The place in the buffer at which the value should be retrieved.
\r
1604 getInt32(byteOffset: number, littleEndian?: boolean): number;
\r
1607 * Gets the Uint8 value at the specified byte offset from the start of the view. There is
\r
1608 * no alignment constraint; multi-byte values may be fetched from any offset.
\r
1609 * @param byteOffset The place in the buffer at which the value should be retrieved.
\r
1611 getUint8(byteOffset: number): number;
\r
1614 * Gets the Uint16 value at the specified byte offset from the start of the view. There is
\r
1615 * no alignment constraint; multi-byte values may be fetched from any offset.
\r
1616 * @param byteOffset The place in the buffer at which the value should be retrieved.
\r
1618 getUint16(byteOffset: number, littleEndian?: boolean): number;
\r
1621 * Gets the Uint32 value at the specified byte offset from the start of the view. There is
\r
1622 * no alignment constraint; multi-byte values may be fetched from any offset.
\r
1623 * @param byteOffset The place in the buffer at which the value should be retrieved.
\r
1625 getUint32(byteOffset: number, littleEndian?: boolean): number;
\r
1628 * Stores an Float32 value at the specified byte offset from the start of the view.
\r
1629 * @param byteOffset The place in the buffer at which the value should be set.
\r
1630 * @param value The value to set.
\r
1631 * @param littleEndian If false or undefined, a big-endian value should be written,
\r
1632 * otherwise a little-endian value should be written.
\r
1634 setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void;
\r
1637 * Stores an Float64 value at the specified byte offset from the start of the view.
\r
1638 * @param byteOffset The place in the buffer at which the value should be set.
\r
1639 * @param value The value to set.
\r
1640 * @param littleEndian If false or undefined, a big-endian value should be written,
\r
1641 * otherwise a little-endian value should be written.
\r
1643 setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void;
\r
1646 * Stores an Int8 value at the specified byte offset from the start of the view.
\r
1647 * @param byteOffset The place in the buffer at which the value should be set.
\r
1648 * @param value The value to set.
\r
1650 setInt8(byteOffset: number, value: number): void;
\r
1653 * Stores an Int16 value at the specified byte offset from the start of the view.
\r
1654 * @param byteOffset The place in the buffer at which the value should be set.
\r
1655 * @param value The value to set.
\r
1656 * @param littleEndian If false or undefined, a big-endian value should be written,
\r
1657 * otherwise a little-endian value should be written.
\r
1659 setInt16(byteOffset: number, value: number, littleEndian?: boolean): void;
\r
1662 * Stores an Int32 value at the specified byte offset from the start of the view.
\r
1663 * @param byteOffset The place in the buffer at which the value should be set.
\r
1664 * @param value The value to set.
\r
1665 * @param littleEndian If false or undefined, a big-endian value should be written,
\r
1666 * otherwise a little-endian value should be written.
\r
1668 setInt32(byteOffset: number, value: number, littleEndian?: boolean): void;
\r
1671 * Stores an Uint8 value at the specified byte offset from the start of the view.
\r
1672 * @param byteOffset The place in the buffer at which the value should be set.
\r
1673 * @param value The value to set.
\r
1675 setUint8(byteOffset: number, value: number): void;
\r
1678 * Stores an Uint16 value at the specified byte offset from the start of the view.
\r
1679 * @param byteOffset The place in the buffer at which the value should be set.
\r
1680 * @param value The value to set.
\r
1681 * @param littleEndian If false or undefined, a big-endian value should be written,
\r
1682 * otherwise a little-endian value should be written.
\r
1684 setUint16(byteOffset: number, value: number, littleEndian?: boolean): void;
\r
1687 * Stores an Uint32 value at the specified byte offset from the start of the view.
\r
1688 * @param byteOffset The place in the buffer at which the value should be set.
\r
1689 * @param value The value to set.
\r
1690 * @param littleEndian If false or undefined, a big-endian value should be written,
\r
1691 * otherwise a little-endian value should be written.
\r
1693 setUint32(byteOffset: number, value: number, littleEndian?: boolean): void;
\r
1696 interface DataViewConstructor {
\r
1697 new(buffer: ArrayBufferLike, byteOffset?: number, byteLength?: number): DataView;
\r
1699 declare var DataView: DataViewConstructor;
\r
1702 * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
\r
1703 * number of bytes could not be allocated an exception is raised.
\r
1705 interface Int8Array {
\r
1707 * The size in bytes of each element in the array.
\r
1709 readonly BYTES_PER_ELEMENT: number;
\r
1712 * The ArrayBuffer instance referenced by the array.
\r
1714 readonly buffer: ArrayBufferLike;
\r
1717 * The length in bytes of the array.
\r
1719 readonly byteLength: number;
\r
1722 * The offset in bytes of the array.
\r
1724 readonly byteOffset: number;
\r
1727 * Returns the this object after copying a section of the array identified by start and end
\r
1728 * to the same array starting at position target
\r
1729 * @param target If target is negative, it is treated as length+target where length is the
\r
1730 * length of the array.
\r
1731 * @param start If start is negative, it is treated as length+start. If end is negative, it
\r
1732 * is treated as length+end.
\r
1733 * @param end If not specified, length of the this object is used as its default value.
\r
1735 copyWithin(target: number, start: number, end?: number): this;
\r
1738 * Determines whether all the members of an array satisfy the specified test.
\r
1739 * @param callbackfn A function that accepts up to three arguments. The every method calls
\r
1740 * the callbackfn function for each element in the array until the callbackfn returns a value
\r
1741 * which is coercible to the Boolean value false, or until the end of the array.
\r
1742 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
1743 * If thisArg is omitted, undefined is used as the this value.
\r
1745 every(callbackfn: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): boolean;
\r
1748 * Returns the this object after filling the section identified by start and end with value
\r
1749 * @param value value to fill array section with
\r
1750 * @param start index to start filling the array at. If start is negative, it is treated as
\r
1751 * length+start where length is the length of the array.
\r
1752 * @param end index to stop filling the array at. If end is negative, it is treated as
\r
1755 fill(value: number, start?: number, end?: number): this;
\r
1758 * Returns the elements of an array that meet the condition specified in a callback function.
\r
1759 * @param callbackfn A function that accepts up to three arguments. The filter method calls
\r
1760 * the callbackfn function one time for each element in the array.
\r
1761 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
1762 * If thisArg is omitted, undefined is used as the this value.
\r
1764 filter(callbackfn: (value: number, index: number, array: Int8Array) => any, thisArg?: any): Int8Array;
\r
1767 * Returns the value of the first element in the array where predicate is true, and undefined
\r
1769 * @param predicate find calls predicate once for each element of the array, in ascending
\r
1770 * order, until it finds one where predicate returns true. If such an element is found, find
\r
1771 * immediately returns that element value. Otherwise, find returns undefined.
\r
1772 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
1773 * predicate. If it is not provided, undefined is used instead.
\r
1775 find(predicate: (value: number, index: number, obj: Int8Array) => boolean, thisArg?: any): number | undefined;
\r
1778 * Returns the index of the first element in the array where predicate is true, and -1
\r
1780 * @param predicate find calls predicate once for each element of the array, in ascending
\r
1781 * order, until it finds one where predicate returns true. If such an element is found,
\r
1782 * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
\r
1783 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
1784 * predicate. If it is not provided, undefined is used instead.
\r
1786 findIndex(predicate: (value: number, index: number, obj: Int8Array) => boolean, thisArg?: any): number;
\r
1789 * Performs the specified action for each element in an array.
\r
1790 * @param callbackfn A function that accepts up to three arguments. forEach calls the
\r
1791 * callbackfn function one time for each element in the array.
\r
1792 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
1793 * If thisArg is omitted, undefined is used as the this value.
\r
1795 forEach(callbackfn: (value: number, index: number, array: Int8Array) => void, thisArg?: any): void;
\r
1798 * Returns the index of the first occurrence of a value in an array.
\r
1799 * @param searchElement The value to locate in the array.
\r
1800 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
1801 * search starts at index 0.
\r
1803 indexOf(searchElement: number, fromIndex?: number): number;
\r
1806 * Adds all the elements of an array separated by the specified separator string.
\r
1807 * @param separator A string used to separate one element of an array from the next in the
\r
1808 * resulting String. If omitted, the array elements are separated with a comma.
\r
1810 join(separator?: string): string;
\r
1813 * Returns the index of the last occurrence of a value in an array.
\r
1814 * @param searchElement The value to locate in the array.
\r
1815 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
1816 * search starts at index 0.
\r
1818 lastIndexOf(searchElement: number, fromIndex?: number): number;
\r
1821 * The length of the array.
\r
1823 readonly length: number;
\r
1826 * Calls a defined callback function on each element of an array, and returns an array that
\r
1827 * contains the results.
\r
1828 * @param callbackfn A function that accepts up to three arguments. The map method calls the
\r
1829 * callbackfn function one time for each element in the array.
\r
1830 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
1831 * If thisArg is omitted, undefined is used as the this value.
\r
1833 map(callbackfn: (value: number, index: number, array: Int8Array) => number, thisArg?: any): Int8Array;
\r
1836 * Calls the specified callback function for all the elements in an array. The return value of
\r
1837 * the callback function is the accumulated result, and is provided as an argument in the next
\r
1838 * call to the callback function.
\r
1839 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
1840 * callbackfn function one time for each element in the array.
\r
1841 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
1842 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
1843 * instead of an array value.
\r
1845 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number): number;
\r
1846 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue: number): number;
\r
1849 * Calls the specified callback function for all the elements in an array. The return value of
\r
1850 * the callback function is the accumulated result, and is provided as an argument in the next
\r
1851 * call to the callback function.
\r
1852 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
1853 * callbackfn function one time for each element in the array.
\r
1854 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
1855 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
1856 * instead of an array value.
\r
1858 reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
\r
1861 * Calls the specified callback function for all the elements in an array, in descending order.
\r
1862 * The return value of the callback function is the accumulated result, and is provided as an
\r
1863 * argument in the next call to the callback function.
\r
1864 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
1865 * the callbackfn function one time for each element in the array.
\r
1866 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
1867 * the accumulation. The first call to the callbackfn function provides this value as an
\r
1868 * argument instead of an array value.
\r
1870 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number): number;
\r
1871 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue: number): number;
\r
1874 * Calls the specified callback function for all the elements in an array, in descending order.
\r
1875 * The return value of the callback function is the accumulated result, and is provided as an
\r
1876 * argument in the next call to the callback function.
\r
1877 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
1878 * the callbackfn function one time for each element in the array.
\r
1879 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
1880 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
1881 * instead of an array value.
\r
1883 reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
\r
1886 * Reverses the elements in an Array.
\r
1888 reverse(): Int8Array;
\r
1891 * Sets a value or an array of values.
\r
1892 * @param array A typed or untyped array of values to set.
\r
1893 * @param offset The index in the current array at which the values are to be written.
\r
1895 set(array: ArrayLike<number>, offset?: number): void;
\r
1898 * Returns a section of an array.
\r
1899 * @param start The beginning of the specified portion of the array.
\r
1900 * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
\r
1902 slice(start?: number, end?: number): Int8Array;
\r
1905 * Determines whether the specified callback function returns true for any element of an array.
\r
1906 * @param callbackfn A function that accepts up to three arguments. The some method calls
\r
1907 * the callbackfn function for each element in the array until the callbackfn returns a value
\r
1908 * which is coercible to the Boolean value true, or until the end of the array.
\r
1909 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
1910 * If thisArg is omitted, undefined is used as the this value.
\r
1912 some(callbackfn: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): boolean;
\r
1916 * @param compareFn Function used to determine the order of the elements. It is expected to return
\r
1917 * a negative value if first argument is less than second argument, zero if they're equal and a positive
\r
1918 * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
\r
1920 * [11,2,22,1].sort((a, b) => a - b)
\r
1923 sort(compareFn?: (a: number, b: number) => number): this;
\r
1926 * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements
\r
1927 * at begin, inclusive, up to end, exclusive.
\r
1928 * @param begin The index of the beginning of the array.
\r
1929 * @param end The index of the end of the array.
\r
1931 subarray(begin?: number, end?: number): Int8Array;
\r
1934 * Converts a number to a string by using the current locale.
\r
1936 toLocaleString(): string;
\r
1939 * Returns a string representation of an array.
\r
1941 toString(): string;
\r
1943 /** Returns the primitive value of the specified object. */
\r
1944 valueOf(): Int8Array;
\r
1946 [index: number]: number;
\r
1948 interface Int8ArrayConstructor {
\r
1949 readonly prototype: Int8Array;
\r
1950 new(length: number): Int8Array;
\r
1951 new(arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Int8Array;
\r
1952 new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Int8Array;
\r
1955 * The size in bytes of each element in the array.
\r
1957 readonly BYTES_PER_ELEMENT: number;
\r
1960 * Returns a new array from a set of elements.
\r
1961 * @param items A set of elements to include in the new array object.
\r
1963 of(...items: number[]): Int8Array;
\r
1966 * Creates an array from an array-like or iterable object.
\r
1967 * @param arrayLike An array-like or iterable object to convert to an array.
\r
1969 from(arrayLike: ArrayLike<number>): Int8Array;
\r
1972 * Creates an array from an array-like or iterable object.
\r
1973 * @param arrayLike An array-like or iterable object to convert to an array.
\r
1974 * @param mapfn A mapping function to call on every element of the array.
\r
1975 * @param thisArg Value of 'this' used to invoke the mapfn.
\r
1977 from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array;
\r
1981 declare var Int8Array: Int8ArrayConstructor;
\r
1984 * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
\r
1985 * requested number of bytes could not be allocated an exception is raised.
\r
1987 interface Uint8Array {
\r
1989 * The size in bytes of each element in the array.
\r
1991 readonly BYTES_PER_ELEMENT: number;
\r
1994 * The ArrayBuffer instance referenced by the array.
\r
1996 readonly buffer: ArrayBufferLike;
\r
1999 * The length in bytes of the array.
\r
2001 readonly byteLength: number;
\r
2004 * The offset in bytes of the array.
\r
2006 readonly byteOffset: number;
\r
2009 * Returns the this object after copying a section of the array identified by start and end
\r
2010 * to the same array starting at position target
\r
2011 * @param target If target is negative, it is treated as length+target where length is the
\r
2012 * length of the array.
\r
2013 * @param start If start is negative, it is treated as length+start. If end is negative, it
\r
2014 * is treated as length+end.
\r
2015 * @param end If not specified, length of the this object is used as its default value.
\r
2017 copyWithin(target: number, start: number, end?: number): this;
\r
2020 * Determines whether all the members of an array satisfy the specified test.
\r
2021 * @param callbackfn A function that accepts up to three arguments. The every method calls
\r
2022 * the callbackfn function for each element in the array until the callbackfn returns a value
\r
2023 * which is coercible to the Boolean value false, or until the end of the array.
\r
2024 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2025 * If thisArg is omitted, undefined is used as the this value.
\r
2027 every(callbackfn: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): boolean;
\r
2030 * Returns the this object after filling the section identified by start and end with value
\r
2031 * @param value value to fill array section with
\r
2032 * @param start index to start filling the array at. If start is negative, it is treated as
\r
2033 * length+start where length is the length of the array.
\r
2034 * @param end index to stop filling the array at. If end is negative, it is treated as
\r
2037 fill(value: number, start?: number, end?: number): this;
\r
2040 * Returns the elements of an array that meet the condition specified in a callback function.
\r
2041 * @param callbackfn A function that accepts up to three arguments. The filter method calls
\r
2042 * the callbackfn function one time for each element in the array.
\r
2043 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2044 * If thisArg is omitted, undefined is used as the this value.
\r
2046 filter(callbackfn: (value: number, index: number, array: Uint8Array) => any, thisArg?: any): Uint8Array;
\r
2049 * Returns the value of the first element in the array where predicate is true, and undefined
\r
2051 * @param predicate find calls predicate once for each element of the array, in ascending
\r
2052 * order, until it finds one where predicate returns true. If such an element is found, find
\r
2053 * immediately returns that element value. Otherwise, find returns undefined.
\r
2054 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
2055 * predicate. If it is not provided, undefined is used instead.
\r
2057 find(predicate: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number | undefined;
\r
2060 * Returns the index of the first element in the array where predicate is true, and -1
\r
2062 * @param predicate find calls predicate once for each element of the array, in ascending
\r
2063 * order, until it finds one where predicate returns true. If such an element is found,
\r
2064 * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
\r
2065 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
2066 * predicate. If it is not provided, undefined is used instead.
\r
2068 findIndex(predicate: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number;
\r
2071 * Performs the specified action for each element in an array.
\r
2072 * @param callbackfn A function that accepts up to three arguments. forEach calls the
\r
2073 * callbackfn function one time for each element in the array.
\r
2074 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2075 * If thisArg is omitted, undefined is used as the this value.
\r
2077 forEach(callbackfn: (value: number, index: number, array: Uint8Array) => void, thisArg?: any): void;
\r
2080 * Returns the index of the first occurrence of a value in an array.
\r
2081 * @param searchElement The value to locate in the array.
\r
2082 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
2083 * search starts at index 0.
\r
2085 indexOf(searchElement: number, fromIndex?: number): number;
\r
2088 * Adds all the elements of an array separated by the specified separator string.
\r
2089 * @param separator A string used to separate one element of an array from the next in the
\r
2090 * resulting String. If omitted, the array elements are separated with a comma.
\r
2092 join(separator?: string): string;
\r
2095 * Returns the index of the last occurrence of a value in an array.
\r
2096 * @param searchElement The value to locate in the array.
\r
2097 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
2098 * search starts at index 0.
\r
2100 lastIndexOf(searchElement: number, fromIndex?: number): number;
\r
2103 * The length of the array.
\r
2105 readonly length: number;
\r
2108 * Calls a defined callback function on each element of an array, and returns an array that
\r
2109 * contains the results.
\r
2110 * @param callbackfn A function that accepts up to three arguments. The map method calls the
\r
2111 * callbackfn function one time for each element in the array.
\r
2112 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2113 * If thisArg is omitted, undefined is used as the this value.
\r
2115 map(callbackfn: (value: number, index: number, array: Uint8Array) => number, thisArg?: any): Uint8Array;
\r
2118 * Calls the specified callback function for all the elements in an array. The return value of
\r
2119 * the callback function is the accumulated result, and is provided as an argument in the next
\r
2120 * call to the callback function.
\r
2121 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
2122 * callbackfn function one time for each element in the array.
\r
2123 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2124 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
2125 * instead of an array value.
\r
2127 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number): number;
\r
2128 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue: number): number;
\r
2131 * Calls the specified callback function for all the elements in an array. The return value of
\r
2132 * the callback function is the accumulated result, and is provided as an argument in the next
\r
2133 * call to the callback function.
\r
2134 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
2135 * callbackfn function one time for each element in the array.
\r
2136 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2137 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
2138 * instead of an array value.
\r
2140 reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
\r
2143 * Calls the specified callback function for all the elements in an array, in descending order.
\r
2144 * The return value of the callback function is the accumulated result, and is provided as an
\r
2145 * argument in the next call to the callback function.
\r
2146 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
2147 * the callbackfn function one time for each element in the array.
\r
2148 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2149 * the accumulation. The first call to the callbackfn function provides this value as an
\r
2150 * argument instead of an array value.
\r
2152 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number): number;
\r
2153 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue: number): number;
\r
2156 * Calls the specified callback function for all the elements in an array, in descending order.
\r
2157 * The return value of the callback function is the accumulated result, and is provided as an
\r
2158 * argument in the next call to the callback function.
\r
2159 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
2160 * the callbackfn function one time for each element in the array.
\r
2161 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2162 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
2163 * instead of an array value.
\r
2165 reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
\r
2168 * Reverses the elements in an Array.
\r
2170 reverse(): Uint8Array;
\r
2173 * Sets a value or an array of values.
\r
2174 * @param array A typed or untyped array of values to set.
\r
2175 * @param offset The index in the current array at which the values are to be written.
\r
2177 set(array: ArrayLike<number>, offset?: number): void;
\r
2180 * Returns a section of an array.
\r
2181 * @param start The beginning of the specified portion of the array.
\r
2182 * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
\r
2184 slice(start?: number, end?: number): Uint8Array;
\r
2187 * Determines whether the specified callback function returns true for any element of an array.
\r
2188 * @param callbackfn A function that accepts up to three arguments. The some method calls
\r
2189 * the callbackfn function for each element in the array until the callbackfn returns a value
\r
2190 * which is coercible to the Boolean value true, or until the end of the array.
\r
2191 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2192 * If thisArg is omitted, undefined is used as the this value.
\r
2194 some(callbackfn: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): boolean;
\r
2198 * @param compareFn Function used to determine the order of the elements. It is expected to return
\r
2199 * a negative value if first argument is less than second argument, zero if they're equal and a positive
\r
2200 * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
\r
2202 * [11,2,22,1].sort((a, b) => a - b)
\r
2205 sort(compareFn?: (a: number, b: number) => number): this;
\r
2208 * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements
\r
2209 * at begin, inclusive, up to end, exclusive.
\r
2210 * @param begin The index of the beginning of the array.
\r
2211 * @param end The index of the end of the array.
\r
2213 subarray(begin?: number, end?: number): Uint8Array;
\r
2216 * Converts a number to a string by using the current locale.
\r
2218 toLocaleString(): string;
\r
2221 * Returns a string representation of an array.
\r
2223 toString(): string;
\r
2225 /** Returns the primitive value of the specified object. */
\r
2226 valueOf(): Uint8Array;
\r
2228 [index: number]: number;
\r
2231 interface Uint8ArrayConstructor {
\r
2232 readonly prototype: Uint8Array;
\r
2233 new(length: number): Uint8Array;
\r
2234 new(arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Uint8Array;
\r
2235 new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Uint8Array;
\r
2238 * The size in bytes of each element in the array.
\r
2240 readonly BYTES_PER_ELEMENT: number;
\r
2243 * Returns a new array from a set of elements.
\r
2244 * @param items A set of elements to include in the new array object.
\r
2246 of(...items: number[]): Uint8Array;
\r
2249 * Creates an array from an array-like or iterable object.
\r
2250 * @param arrayLike An array-like or iterable object to convert to an array.
\r
2252 from(arrayLike: ArrayLike<number>): Uint8Array;
\r
2255 * Creates an array from an array-like or iterable object.
\r
2256 * @param arrayLike An array-like or iterable object to convert to an array.
\r
2257 * @param mapfn A mapping function to call on every element of the array.
\r
2258 * @param thisArg Value of 'this' used to invoke the mapfn.
\r
2260 from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array;
\r
2263 declare var Uint8Array: Uint8ArrayConstructor;
\r
2266 * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
\r
2267 * If the requested number of bytes could not be allocated an exception is raised.
\r
2269 interface Uint8ClampedArray {
\r
2271 * The size in bytes of each element in the array.
\r
2273 readonly BYTES_PER_ELEMENT: number;
\r
2276 * The ArrayBuffer instance referenced by the array.
\r
2278 readonly buffer: ArrayBufferLike;
\r
2281 * The length in bytes of the array.
\r
2283 readonly byteLength: number;
\r
2286 * The offset in bytes of the array.
\r
2288 readonly byteOffset: number;
\r
2291 * Returns the this object after copying a section of the array identified by start and end
\r
2292 * to the same array starting at position target
\r
2293 * @param target If target is negative, it is treated as length+target where length is the
\r
2294 * length of the array.
\r
2295 * @param start If start is negative, it is treated as length+start. If end is negative, it
\r
2296 * is treated as length+end.
\r
2297 * @param end If not specified, length of the this object is used as its default value.
\r
2299 copyWithin(target: number, start: number, end?: number): this;
\r
2302 * Determines whether all the members of an array satisfy the specified test.
\r
2303 * @param callbackfn A function that accepts up to three arguments. The every method calls
\r
2304 * the callbackfn function for each element in the array until the callbackfn returns a value
\r
2305 * which is coercible to the Boolean value false, or until the end of the array.
\r
2306 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2307 * If thisArg is omitted, undefined is used as the this value.
\r
2309 every(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): boolean;
\r
2312 * Returns the this object after filling the section identified by start and end with value
\r
2313 * @param value value to fill array section with
\r
2314 * @param start index to start filling the array at. If start is negative, it is treated as
\r
2315 * length+start where length is the length of the array.
\r
2316 * @param end index to stop filling the array at. If end is negative, it is treated as
\r
2319 fill(value: number, start?: number, end?: number): this;
\r
2322 * Returns the elements of an array that meet the condition specified in a callback function.
\r
2323 * @param callbackfn A function that accepts up to three arguments. The filter method calls
\r
2324 * the callbackfn function one time for each element in the array.
\r
2325 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2326 * If thisArg is omitted, undefined is used as the this value.
\r
2328 filter(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => any, thisArg?: any): Uint8ClampedArray;
\r
2331 * Returns the value of the first element in the array where predicate is true, and undefined
\r
2333 * @param predicate find calls predicate once for each element of the array, in ascending
\r
2334 * order, until it finds one where predicate returns true. If such an element is found, find
\r
2335 * immediately returns that element value. Otherwise, find returns undefined.
\r
2336 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
2337 * predicate. If it is not provided, undefined is used instead.
\r
2339 find(predicate: (value: number, index: number, obj: Uint8ClampedArray) => boolean, thisArg?: any): number | undefined;
\r
2342 * Returns the index of the first element in the array where predicate is true, and -1
\r
2344 * @param predicate find calls predicate once for each element of the array, in ascending
\r
2345 * order, until it finds one where predicate returns true. If such an element is found,
\r
2346 * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
\r
2347 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
2348 * predicate. If it is not provided, undefined is used instead.
\r
2350 findIndex(predicate: (value: number, index: number, obj: Uint8ClampedArray) => boolean, thisArg?: any): number;
\r
2353 * Performs the specified action for each element in an array.
\r
2354 * @param callbackfn A function that accepts up to three arguments. forEach calls the
\r
2355 * callbackfn function one time for each element in the array.
\r
2356 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2357 * If thisArg is omitted, undefined is used as the this value.
\r
2359 forEach(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => void, thisArg?: any): void;
\r
2362 * Returns the index of the first occurrence of a value in an array.
\r
2363 * @param searchElement The value to locate in the array.
\r
2364 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
2365 * search starts at index 0.
\r
2367 indexOf(searchElement: number, fromIndex?: number): number;
\r
2370 * Adds all the elements of an array separated by the specified separator string.
\r
2371 * @param separator A string used to separate one element of an array from the next in the
\r
2372 * resulting String. If omitted, the array elements are separated with a comma.
\r
2374 join(separator?: string): string;
\r
2377 * Returns the index of the last occurrence of a value in an array.
\r
2378 * @param searchElement The value to locate in the array.
\r
2379 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
2380 * search starts at index 0.
\r
2382 lastIndexOf(searchElement: number, fromIndex?: number): number;
\r
2385 * The length of the array.
\r
2387 readonly length: number;
\r
2390 * Calls a defined callback function on each element of an array, and returns an array that
\r
2391 * contains the results.
\r
2392 * @param callbackfn A function that accepts up to three arguments. The map method calls the
\r
2393 * callbackfn function one time for each element in the array.
\r
2394 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2395 * If thisArg is omitted, undefined is used as the this value.
\r
2397 map(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => number, thisArg?: any): Uint8ClampedArray;
\r
2400 * Calls the specified callback function for all the elements in an array. The return value of
\r
2401 * the callback function is the accumulated result, and is provided as an argument in the next
\r
2402 * call to the callback function.
\r
2403 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
2404 * callbackfn function one time for each element in the array.
\r
2405 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2406 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
2407 * instead of an array value.
\r
2409 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number): number;
\r
2410 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue: number): number;
\r
2413 * Calls the specified callback function for all the elements in an array. The return value of
\r
2414 * the callback function is the accumulated result, and is provided as an argument in the next
\r
2415 * call to the callback function.
\r
2416 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
2417 * callbackfn function one time for each element in the array.
\r
2418 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2419 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
2420 * instead of an array value.
\r
2422 reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
\r
2425 * Calls the specified callback function for all the elements in an array, in descending order.
\r
2426 * The return value of the callback function is the accumulated result, and is provided as an
\r
2427 * argument in the next call to the callback function.
\r
2428 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
2429 * the callbackfn function one time for each element in the array.
\r
2430 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2431 * the accumulation. The first call to the callbackfn function provides this value as an
\r
2432 * argument instead of an array value.
\r
2434 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number): number;
\r
2435 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue: number): number;
\r
2438 * Calls the specified callback function for all the elements in an array, in descending order.
\r
2439 * The return value of the callback function is the accumulated result, and is provided as an
\r
2440 * argument in the next call to the callback function.
\r
2441 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
2442 * the callbackfn function one time for each element in the array.
\r
2443 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2444 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
2445 * instead of an array value.
\r
2447 reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
\r
2450 * Reverses the elements in an Array.
\r
2452 reverse(): Uint8ClampedArray;
\r
2455 * Sets a value or an array of values.
\r
2456 * @param array A typed or untyped array of values to set.
\r
2457 * @param offset The index in the current array at which the values are to be written.
\r
2459 set(array: ArrayLike<number>, offset?: number): void;
\r
2462 * Returns a section of an array.
\r
2463 * @param start The beginning of the specified portion of the array.
\r
2464 * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
\r
2466 slice(start?: number, end?: number): Uint8ClampedArray;
\r
2469 * Determines whether the specified callback function returns true for any element of an array.
\r
2470 * @param callbackfn A function that accepts up to three arguments. The some method calls
\r
2471 * the callbackfn function for each element in the array until the callbackfn returns a value
\r
2472 * which is coercible to the Boolean value true, or until the end of the array.
\r
2473 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2474 * If thisArg is omitted, undefined is used as the this value.
\r
2476 some(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): boolean;
\r
2480 * @param compareFn Function used to determine the order of the elements. It is expected to return
\r
2481 * a negative value if first argument is less than second argument, zero if they're equal and a positive
\r
2482 * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
\r
2484 * [11,2,22,1].sort((a, b) => a - b)
\r
2487 sort(compareFn?: (a: number, b: number) => number): this;
\r
2490 * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements
\r
2491 * at begin, inclusive, up to end, exclusive.
\r
2492 * @param begin The index of the beginning of the array.
\r
2493 * @param end The index of the end of the array.
\r
2495 subarray(begin?: number, end?: number): Uint8ClampedArray;
\r
2498 * Converts a number to a string by using the current locale.
\r
2500 toLocaleString(): string;
\r
2503 * Returns a string representation of an array.
\r
2505 toString(): string;
\r
2507 /** Returns the primitive value of the specified object. */
\r
2508 valueOf(): Uint8ClampedArray;
\r
2510 [index: number]: number;
\r
2513 interface Uint8ClampedArrayConstructor {
\r
2514 readonly prototype: Uint8ClampedArray;
\r
2515 new(length: number): Uint8ClampedArray;
\r
2516 new(arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Uint8ClampedArray;
\r
2517 new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Uint8ClampedArray;
\r
2520 * The size in bytes of each element in the array.
\r
2522 readonly BYTES_PER_ELEMENT: number;
\r
2525 * Returns a new array from a set of elements.
\r
2526 * @param items A set of elements to include in the new array object.
\r
2528 of(...items: number[]): Uint8ClampedArray;
\r
2531 * Creates an array from an array-like or iterable object.
\r
2532 * @param arrayLike An array-like or iterable object to convert to an array.
\r
2534 from(arrayLike: ArrayLike<number>): Uint8ClampedArray;
\r
2537 * Creates an array from an array-like or iterable object.
\r
2538 * @param arrayLike An array-like or iterable object to convert to an array.
\r
2539 * @param mapfn A mapping function to call on every element of the array.
\r
2540 * @param thisArg Value of 'this' used to invoke the mapfn.
\r
2542 from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray;
\r
2544 declare var Uint8ClampedArray: Uint8ClampedArrayConstructor;
\r
2547 * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
\r
2548 * requested number of bytes could not be allocated an exception is raised.
\r
2550 interface Int16Array {
\r
2552 * The size in bytes of each element in the array.
\r
2554 readonly BYTES_PER_ELEMENT: number;
\r
2557 * The ArrayBuffer instance referenced by the array.
\r
2559 readonly buffer: ArrayBufferLike;
\r
2562 * The length in bytes of the array.
\r
2564 readonly byteLength: number;
\r
2567 * The offset in bytes of the array.
\r
2569 readonly byteOffset: number;
\r
2572 * Returns the this object after copying a section of the array identified by start and end
\r
2573 * to the same array starting at position target
\r
2574 * @param target If target is negative, it is treated as length+target where length is the
\r
2575 * length of the array.
\r
2576 * @param start If start is negative, it is treated as length+start. If end is negative, it
\r
2577 * is treated as length+end.
\r
2578 * @param end If not specified, length of the this object is used as its default value.
\r
2580 copyWithin(target: number, start: number, end?: number): this;
\r
2583 * Determines whether all the members of an array satisfy the specified test.
\r
2584 * @param callbackfn A function that accepts up to three arguments. The every method calls
\r
2585 * the callbackfn function for each element in the array until the callbackfn returns a value
\r
2586 * which is coercible to the Boolean value false, or until the end of the array.
\r
2587 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2588 * If thisArg is omitted, undefined is used as the this value.
\r
2590 every(callbackfn: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): boolean;
\r
2593 * Returns the this object after filling the section identified by start and end with value
\r
2594 * @param value value to fill array section with
\r
2595 * @param start index to start filling the array at. If start is negative, it is treated as
\r
2596 * length+start where length is the length of the array.
\r
2597 * @param end index to stop filling the array at. If end is negative, it is treated as
\r
2600 fill(value: number, start?: number, end?: number): this;
\r
2603 * Returns the elements of an array that meet the condition specified in a callback function.
\r
2604 * @param callbackfn A function that accepts up to three arguments. The filter method calls
\r
2605 * the callbackfn function one time for each element in the array.
\r
2606 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2607 * If thisArg is omitted, undefined is used as the this value.
\r
2609 filter(callbackfn: (value: number, index: number, array: Int16Array) => any, thisArg?: any): Int16Array;
\r
2612 * Returns the value of the first element in the array where predicate is true, and undefined
\r
2614 * @param predicate find calls predicate once for each element of the array, in ascending
\r
2615 * order, until it finds one where predicate returns true. If such an element is found, find
\r
2616 * immediately returns that element value. Otherwise, find returns undefined.
\r
2617 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
2618 * predicate. If it is not provided, undefined is used instead.
\r
2620 find(predicate: (value: number, index: number, obj: Int16Array) => boolean, thisArg?: any): number | undefined;
\r
2623 * Returns the index of the first element in the array where predicate is true, and -1
\r
2625 * @param predicate find calls predicate once for each element of the array, in ascending
\r
2626 * order, until it finds one where predicate returns true. If such an element is found,
\r
2627 * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
\r
2628 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
2629 * predicate. If it is not provided, undefined is used instead.
\r
2631 findIndex(predicate: (value: number, index: number, obj: Int16Array) => boolean, thisArg?: any): number;
\r
2634 * Performs the specified action for each element in an array.
\r
2635 * @param callbackfn A function that accepts up to three arguments. forEach calls the
\r
2636 * callbackfn function one time for each element in the array.
\r
2637 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2638 * If thisArg is omitted, undefined is used as the this value.
\r
2640 forEach(callbackfn: (value: number, index: number, array: Int16Array) => void, thisArg?: any): void;
\r
2642 * Returns the index of the first occurrence of a value in an array.
\r
2643 * @param searchElement The value to locate in the array.
\r
2644 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
2645 * search starts at index 0.
\r
2647 indexOf(searchElement: number, fromIndex?: number): number;
\r
2650 * Adds all the elements of an array separated by the specified separator string.
\r
2651 * @param separator A string used to separate one element of an array from the next in the
\r
2652 * resulting String. If omitted, the array elements are separated with a comma.
\r
2654 join(separator?: string): string;
\r
2657 * Returns the index of the last occurrence of a value in an array.
\r
2658 * @param searchElement The value to locate in the array.
\r
2659 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
2660 * search starts at index 0.
\r
2662 lastIndexOf(searchElement: number, fromIndex?: number): number;
\r
2665 * The length of the array.
\r
2667 readonly length: number;
\r
2670 * Calls a defined callback function on each element of an array, and returns an array that
\r
2671 * contains the results.
\r
2672 * @param callbackfn A function that accepts up to three arguments. The map method calls the
\r
2673 * callbackfn function one time for each element in the array.
\r
2674 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2675 * If thisArg is omitted, undefined is used as the this value.
\r
2677 map(callbackfn: (value: number, index: number, array: Int16Array) => number, thisArg?: any): Int16Array;
\r
2680 * Calls the specified callback function for all the elements in an array. The return value of
\r
2681 * the callback function is the accumulated result, and is provided as an argument in the next
\r
2682 * call to the callback function.
\r
2683 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
2684 * callbackfn function one time for each element in the array.
\r
2685 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2686 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
2687 * instead of an array value.
\r
2689 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number): number;
\r
2690 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue: number): number;
\r
2693 * Calls the specified callback function for all the elements in an array. The return value of
\r
2694 * the callback function is the accumulated result, and is provided as an argument in the next
\r
2695 * call to the callback function.
\r
2696 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
2697 * callbackfn function one time for each element in the array.
\r
2698 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2699 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
2700 * instead of an array value.
\r
2702 reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
\r
2705 * Calls the specified callback function for all the elements in an array, in descending order.
\r
2706 * The return value of the callback function is the accumulated result, and is provided as an
\r
2707 * argument in the next call to the callback function.
\r
2708 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
2709 * the callbackfn function one time for each element in the array.
\r
2710 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2711 * the accumulation. The first call to the callbackfn function provides this value as an
\r
2712 * argument instead of an array value.
\r
2714 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number): number;
\r
2715 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue: number): number;
\r
2718 * Calls the specified callback function for all the elements in an array, in descending order.
\r
2719 * The return value of the callback function is the accumulated result, and is provided as an
\r
2720 * argument in the next call to the callback function.
\r
2721 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
2722 * the callbackfn function one time for each element in the array.
\r
2723 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2724 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
2725 * instead of an array value.
\r
2727 reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
\r
2730 * Reverses the elements in an Array.
\r
2732 reverse(): Int16Array;
\r
2735 * Sets a value or an array of values.
\r
2736 * @param array A typed or untyped array of values to set.
\r
2737 * @param offset The index in the current array at which the values are to be written.
\r
2739 set(array: ArrayLike<number>, offset?: number): void;
\r
2742 * Returns a section of an array.
\r
2743 * @param start The beginning of the specified portion of the array.
\r
2744 * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
\r
2746 slice(start?: number, end?: number): Int16Array;
\r
2749 * Determines whether the specified callback function returns true for any element of an array.
\r
2750 * @param callbackfn A function that accepts up to three arguments. The some method calls
\r
2751 * the callbackfn function for each element in the array until the callbackfn returns a value
\r
2752 * which is coercible to the Boolean value true, or until the end of the array.
\r
2753 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2754 * If thisArg is omitted, undefined is used as the this value.
\r
2756 some(callbackfn: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): boolean;
\r
2760 * @param compareFn Function used to determine the order of the elements. It is expected to return
\r
2761 * a negative value if first argument is less than second argument, zero if they're equal and a positive
\r
2762 * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
\r
2764 * [11,2,22,1].sort((a, b) => a - b)
\r
2767 sort(compareFn?: (a: number, b: number) => number): this;
\r
2770 * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements
\r
2771 * at begin, inclusive, up to end, exclusive.
\r
2772 * @param begin The index of the beginning of the array.
\r
2773 * @param end The index of the end of the array.
\r
2775 subarray(begin?: number, end?: number): Int16Array;
\r
2778 * Converts a number to a string by using the current locale.
\r
2780 toLocaleString(): string;
\r
2783 * Returns a string representation of an array.
\r
2785 toString(): string;
\r
2787 /** Returns the primitive value of the specified object. */
\r
2788 valueOf(): Int16Array;
\r
2790 [index: number]: number;
\r
2793 interface Int16ArrayConstructor {
\r
2794 readonly prototype: Int16Array;
\r
2795 new(length: number): Int16Array;
\r
2796 new(arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Int16Array;
\r
2797 new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Int16Array;
\r
2800 * The size in bytes of each element in the array.
\r
2802 readonly BYTES_PER_ELEMENT: number;
\r
2805 * Returns a new array from a set of elements.
\r
2806 * @param items A set of elements to include in the new array object.
\r
2808 of(...items: number[]): Int16Array;
\r
2811 * Creates an array from an array-like or iterable object.
\r
2812 * @param arrayLike An array-like or iterable object to convert to an array.
\r
2814 from(arrayLike: ArrayLike<number>): Int16Array;
\r
2817 * Creates an array from an array-like or iterable object.
\r
2818 * @param arrayLike An array-like or iterable object to convert to an array.
\r
2819 * @param mapfn A mapping function to call on every element of the array.
\r
2820 * @param thisArg Value of 'this' used to invoke the mapfn.
\r
2822 from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array;
\r
2826 declare var Int16Array: Int16ArrayConstructor;
\r
2829 * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
\r
2830 * requested number of bytes could not be allocated an exception is raised.
\r
2832 interface Uint16Array {
\r
2834 * The size in bytes of each element in the array.
\r
2836 readonly BYTES_PER_ELEMENT: number;
\r
2839 * The ArrayBuffer instance referenced by the array.
\r
2841 readonly buffer: ArrayBufferLike;
\r
2844 * The length in bytes of the array.
\r
2846 readonly byteLength: number;
\r
2849 * The offset in bytes of the array.
\r
2851 readonly byteOffset: number;
\r
2854 * Returns the this object after copying a section of the array identified by start and end
\r
2855 * to the same array starting at position target
\r
2856 * @param target If target is negative, it is treated as length+target where length is the
\r
2857 * length of the array.
\r
2858 * @param start If start is negative, it is treated as length+start. If end is negative, it
\r
2859 * is treated as length+end.
\r
2860 * @param end If not specified, length of the this object is used as its default value.
\r
2862 copyWithin(target: number, start: number, end?: number): this;
\r
2865 * Determines whether all the members of an array satisfy the specified test.
\r
2866 * @param callbackfn A function that accepts up to three arguments. The every method calls
\r
2867 * the callbackfn function for each element in the array until the callbackfn returns a value
\r
2868 * which is coercible to the Boolean value false, or until the end of the array.
\r
2869 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2870 * If thisArg is omitted, undefined is used as the this value.
\r
2872 every(callbackfn: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): boolean;
\r
2875 * Returns the this object after filling the section identified by start and end with value
\r
2876 * @param value value to fill array section with
\r
2877 * @param start index to start filling the array at. If start is negative, it is treated as
\r
2878 * length+start where length is the length of the array.
\r
2879 * @param end index to stop filling the array at. If end is negative, it is treated as
\r
2882 fill(value: number, start?: number, end?: number): this;
\r
2885 * Returns the elements of an array that meet the condition specified in a callback function.
\r
2886 * @param callbackfn A function that accepts up to three arguments. The filter method calls
\r
2887 * the callbackfn function one time for each element in the array.
\r
2888 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2889 * If thisArg is omitted, undefined is used as the this value.
\r
2891 filter(callbackfn: (value: number, index: number, array: Uint16Array) => any, thisArg?: any): Uint16Array;
\r
2894 * Returns the value of the first element in the array where predicate is true, and undefined
\r
2896 * @param predicate find calls predicate once for each element of the array, in ascending
\r
2897 * order, until it finds one where predicate returns true. If such an element is found, find
\r
2898 * immediately returns that element value. Otherwise, find returns undefined.
\r
2899 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
2900 * predicate. If it is not provided, undefined is used instead.
\r
2902 find(predicate: (value: number, index: number, obj: Uint16Array) => boolean, thisArg?: any): number | undefined;
\r
2905 * Returns the index of the first element in the array where predicate is true, and -1
\r
2907 * @param predicate find calls predicate once for each element of the array, in ascending
\r
2908 * order, until it finds one where predicate returns true. If such an element is found,
\r
2909 * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
\r
2910 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
2911 * predicate. If it is not provided, undefined is used instead.
\r
2913 findIndex(predicate: (value: number, index: number, obj: Uint16Array) => boolean, thisArg?: any): number;
\r
2916 * Performs the specified action for each element in an array.
\r
2917 * @param callbackfn A function that accepts up to three arguments. forEach calls the
\r
2918 * callbackfn function one time for each element in the array.
\r
2919 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2920 * If thisArg is omitted, undefined is used as the this value.
\r
2922 forEach(callbackfn: (value: number, index: number, array: Uint16Array) => void, thisArg?: any): void;
\r
2925 * Returns the index of the first occurrence of a value in an array.
\r
2926 * @param searchElement The value to locate in the array.
\r
2927 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
2928 * search starts at index 0.
\r
2930 indexOf(searchElement: number, fromIndex?: number): number;
\r
2933 * Adds all the elements of an array separated by the specified separator string.
\r
2934 * @param separator A string used to separate one element of an array from the next in the
\r
2935 * resulting String. If omitted, the array elements are separated with a comma.
\r
2937 join(separator?: string): string;
\r
2940 * Returns the index of the last occurrence of a value in an array.
\r
2941 * @param searchElement The value to locate in the array.
\r
2942 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
2943 * search starts at index 0.
\r
2945 lastIndexOf(searchElement: number, fromIndex?: number): number;
\r
2948 * The length of the array.
\r
2950 readonly length: number;
\r
2953 * Calls a defined callback function on each element of an array, and returns an array that
\r
2954 * contains the results.
\r
2955 * @param callbackfn A function that accepts up to three arguments. The map method calls the
\r
2956 * callbackfn function one time for each element in the array.
\r
2957 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
2958 * If thisArg is omitted, undefined is used as the this value.
\r
2960 map(callbackfn: (value: number, index: number, array: Uint16Array) => number, thisArg?: any): Uint16Array;
\r
2963 * Calls the specified callback function for all the elements in an array. The return value of
\r
2964 * the callback function is the accumulated result, and is provided as an argument in the next
\r
2965 * call to the callback function.
\r
2966 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
2967 * callbackfn function one time for each element in the array.
\r
2968 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2969 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
2970 * instead of an array value.
\r
2972 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number): number;
\r
2973 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue: number): number;
\r
2976 * Calls the specified callback function for all the elements in an array. The return value of
\r
2977 * the callback function is the accumulated result, and is provided as an argument in the next
\r
2978 * call to the callback function.
\r
2979 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
2980 * callbackfn function one time for each element in the array.
\r
2981 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2982 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
2983 * instead of an array value.
\r
2985 reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
\r
2988 * Calls the specified callback function for all the elements in an array, in descending order.
\r
2989 * The return value of the callback function is the accumulated result, and is provided as an
\r
2990 * argument in the next call to the callback function.
\r
2991 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
2992 * the callbackfn function one time for each element in the array.
\r
2993 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
2994 * the accumulation. The first call to the callbackfn function provides this value as an
\r
2995 * argument instead of an array value.
\r
2997 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number): number;
\r
2998 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue: number): number;
\r
3001 * Calls the specified callback function for all the elements in an array, in descending order.
\r
3002 * The return value of the callback function is the accumulated result, and is provided as an
\r
3003 * argument in the next call to the callback function.
\r
3004 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
3005 * the callbackfn function one time for each element in the array.
\r
3006 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3007 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
3008 * instead of an array value.
\r
3010 reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
\r
3013 * Reverses the elements in an Array.
\r
3015 reverse(): Uint16Array;
\r
3018 * Sets a value or an array of values.
\r
3019 * @param array A typed or untyped array of values to set.
\r
3020 * @param offset The index in the current array at which the values are to be written.
\r
3022 set(array: ArrayLike<number>, offset?: number): void;
\r
3025 * Returns a section of an array.
\r
3026 * @param start The beginning of the specified portion of the array.
\r
3027 * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
\r
3029 slice(start?: number, end?: number): Uint16Array;
\r
3032 * Determines whether the specified callback function returns true for any element of an array.
\r
3033 * @param callbackfn A function that accepts up to three arguments. The some method calls
\r
3034 * the callbackfn function for each element in the array until the callbackfn returns a value
\r
3035 * which is coercible to the Boolean value true, or until the end of the array.
\r
3036 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3037 * If thisArg is omitted, undefined is used as the this value.
\r
3039 some(callbackfn: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): boolean;
\r
3043 * @param compareFn Function used to determine the order of the elements. It is expected to return
\r
3044 * a negative value if first argument is less than second argument, zero if they're equal and a positive
\r
3045 * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
\r
3047 * [11,2,22,1].sort((a, b) => a - b)
\r
3050 sort(compareFn?: (a: number, b: number) => number): this;
\r
3053 * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements
\r
3054 * at begin, inclusive, up to end, exclusive.
\r
3055 * @param begin The index of the beginning of the array.
\r
3056 * @param end The index of the end of the array.
\r
3058 subarray(begin?: number, end?: number): Uint16Array;
\r
3061 * Converts a number to a string by using the current locale.
\r
3063 toLocaleString(): string;
\r
3066 * Returns a string representation of an array.
\r
3068 toString(): string;
\r
3070 /** Returns the primitive value of the specified object. */
\r
3071 valueOf(): Uint16Array;
\r
3073 [index: number]: number;
\r
3076 interface Uint16ArrayConstructor {
\r
3077 readonly prototype: Uint16Array;
\r
3078 new(length: number): Uint16Array;
\r
3079 new(arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Uint16Array;
\r
3080 new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Uint16Array;
\r
3083 * The size in bytes of each element in the array.
\r
3085 readonly BYTES_PER_ELEMENT: number;
\r
3088 * Returns a new array from a set of elements.
\r
3089 * @param items A set of elements to include in the new array object.
\r
3091 of(...items: number[]): Uint16Array;
\r
3094 * Creates an array from an array-like or iterable object.
\r
3095 * @param arrayLike An array-like or iterable object to convert to an array.
\r
3097 from(arrayLike: ArrayLike<number>): Uint16Array;
\r
3100 * Creates an array from an array-like or iterable object.
\r
3101 * @param arrayLike An array-like or iterable object to convert to an array.
\r
3102 * @param mapfn A mapping function to call on every element of the array.
\r
3103 * @param thisArg Value of 'this' used to invoke the mapfn.
\r
3105 from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array;
\r
3109 declare var Uint16Array: Uint16ArrayConstructor;
\r
3111 * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
\r
3112 * requested number of bytes could not be allocated an exception is raised.
\r
3114 interface Int32Array {
\r
3116 * The size in bytes of each element in the array.
\r
3118 readonly BYTES_PER_ELEMENT: number;
\r
3121 * The ArrayBuffer instance referenced by the array.
\r
3123 readonly buffer: ArrayBufferLike;
\r
3126 * The length in bytes of the array.
\r
3128 readonly byteLength: number;
\r
3131 * The offset in bytes of the array.
\r
3133 readonly byteOffset: number;
\r
3136 * Returns the this object after copying a section of the array identified by start and end
\r
3137 * to the same array starting at position target
\r
3138 * @param target If target is negative, it is treated as length+target where length is the
\r
3139 * length of the array.
\r
3140 * @param start If start is negative, it is treated as length+start. If end is negative, it
\r
3141 * is treated as length+end.
\r
3142 * @param end If not specified, length of the this object is used as its default value.
\r
3144 copyWithin(target: number, start: number, end?: number): this;
\r
3147 * Determines whether all the members of an array satisfy the specified test.
\r
3148 * @param callbackfn A function that accepts up to three arguments. The every method calls
\r
3149 * the callbackfn function for each element in the array until the callbackfn returns a value
\r
3150 * which is coercible to the Boolean value false, or until the end of the array.
\r
3151 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3152 * If thisArg is omitted, undefined is used as the this value.
\r
3154 every(callbackfn: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): boolean;
\r
3157 * Returns the this object after filling the section identified by start and end with value
\r
3158 * @param value value to fill array section with
\r
3159 * @param start index to start filling the array at. If start is negative, it is treated as
\r
3160 * length+start where length is the length of the array.
\r
3161 * @param end index to stop filling the array at. If end is negative, it is treated as
\r
3164 fill(value: number, start?: number, end?: number): this;
\r
3167 * Returns the elements of an array that meet the condition specified in a callback function.
\r
3168 * @param callbackfn A function that accepts up to three arguments. The filter method calls
\r
3169 * the callbackfn function one time for each element in the array.
\r
3170 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3171 * If thisArg is omitted, undefined is used as the this value.
\r
3173 filter(callbackfn: (value: number, index: number, array: Int32Array) => any, thisArg?: any): Int32Array;
\r
3176 * Returns the value of the first element in the array where predicate is true, and undefined
\r
3178 * @param predicate find calls predicate once for each element of the array, in ascending
\r
3179 * order, until it finds one where predicate returns true. If such an element is found, find
\r
3180 * immediately returns that element value. Otherwise, find returns undefined.
\r
3181 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
3182 * predicate. If it is not provided, undefined is used instead.
\r
3184 find(predicate: (value: number, index: number, obj: Int32Array) => boolean, thisArg?: any): number | undefined;
\r
3187 * Returns the index of the first element in the array where predicate is true, and -1
\r
3189 * @param predicate find calls predicate once for each element of the array, in ascending
\r
3190 * order, until it finds one where predicate returns true. If such an element is found,
\r
3191 * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
\r
3192 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
3193 * predicate. If it is not provided, undefined is used instead.
\r
3195 findIndex(predicate: (value: number, index: number, obj: Int32Array) => boolean, thisArg?: any): number;
\r
3198 * Performs the specified action for each element in an array.
\r
3199 * @param callbackfn A function that accepts up to three arguments. forEach calls the
\r
3200 * callbackfn function one time for each element in the array.
\r
3201 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3202 * If thisArg is omitted, undefined is used as the this value.
\r
3204 forEach(callbackfn: (value: number, index: number, array: Int32Array) => void, thisArg?: any): void;
\r
3207 * Returns the index of the first occurrence of a value in an array.
\r
3208 * @param searchElement The value to locate in the array.
\r
3209 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
3210 * search starts at index 0.
\r
3212 indexOf(searchElement: number, fromIndex?: number): number;
\r
3215 * Adds all the elements of an array separated by the specified separator string.
\r
3216 * @param separator A string used to separate one element of an array from the next in the
\r
3217 * resulting String. If omitted, the array elements are separated with a comma.
\r
3219 join(separator?: string): string;
\r
3222 * Returns the index of the last occurrence of a value in an array.
\r
3223 * @param searchElement The value to locate in the array.
\r
3224 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
3225 * search starts at index 0.
\r
3227 lastIndexOf(searchElement: number, fromIndex?: number): number;
\r
3230 * The length of the array.
\r
3232 readonly length: number;
\r
3235 * Calls a defined callback function on each element of an array, and returns an array that
\r
3236 * contains the results.
\r
3237 * @param callbackfn A function that accepts up to three arguments. The map method calls the
\r
3238 * callbackfn function one time for each element in the array.
\r
3239 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3240 * If thisArg is omitted, undefined is used as the this value.
\r
3242 map(callbackfn: (value: number, index: number, array: Int32Array) => number, thisArg?: any): Int32Array;
\r
3245 * Calls the specified callback function for all the elements in an array. The return value of
\r
3246 * the callback function is the accumulated result, and is provided as an argument in the next
\r
3247 * call to the callback function.
\r
3248 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
3249 * callbackfn function one time for each element in the array.
\r
3250 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3251 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
3252 * instead of an array value.
\r
3254 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number): number;
\r
3255 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue: number): number;
\r
3258 * Calls the specified callback function for all the elements in an array. The return value of
\r
3259 * the callback function is the accumulated result, and is provided as an argument in the next
\r
3260 * call to the callback function.
\r
3261 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
3262 * callbackfn function one time for each element in the array.
\r
3263 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3264 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
3265 * instead of an array value.
\r
3267 reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
\r
3270 * Calls the specified callback function for all the elements in an array, in descending order.
\r
3271 * The return value of the callback function is the accumulated result, and is provided as an
\r
3272 * argument in the next call to the callback function.
\r
3273 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
3274 * the callbackfn function one time for each element in the array.
\r
3275 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3276 * the accumulation. The first call to the callbackfn function provides this value as an
\r
3277 * argument instead of an array value.
\r
3279 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number): number;
\r
3280 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue: number): number;
\r
3283 * Calls the specified callback function for all the elements in an array, in descending order.
\r
3284 * The return value of the callback function is the accumulated result, and is provided as an
\r
3285 * argument in the next call to the callback function.
\r
3286 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
3287 * the callbackfn function one time for each element in the array.
\r
3288 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3289 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
3290 * instead of an array value.
\r
3292 reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
\r
3295 * Reverses the elements in an Array.
\r
3297 reverse(): Int32Array;
\r
3300 * Sets a value or an array of values.
\r
3301 * @param array A typed or untyped array of values to set.
\r
3302 * @param offset The index in the current array at which the values are to be written.
\r
3304 set(array: ArrayLike<number>, offset?: number): void;
\r
3307 * Returns a section of an array.
\r
3308 * @param start The beginning of the specified portion of the array.
\r
3309 * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
\r
3311 slice(start?: number, end?: number): Int32Array;
\r
3314 * Determines whether the specified callback function returns true for any element of an array.
\r
3315 * @param callbackfn A function that accepts up to three arguments. The some method calls
\r
3316 * the callbackfn function for each element in the array until the callbackfn returns a value
\r
3317 * which is coercible to the Boolean value true, or until the end of the array.
\r
3318 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3319 * If thisArg is omitted, undefined is used as the this value.
\r
3321 some(callbackfn: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): boolean;
\r
3325 * @param compareFn Function used to determine the order of the elements. It is expected to return
\r
3326 * a negative value if first argument is less than second argument, zero if they're equal and a positive
\r
3327 * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
\r
3329 * [11,2,22,1].sort((a, b) => a - b)
\r
3332 sort(compareFn?: (a: number, b: number) => number): this;
\r
3335 * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements
\r
3336 * at begin, inclusive, up to end, exclusive.
\r
3337 * @param begin The index of the beginning of the array.
\r
3338 * @param end The index of the end of the array.
\r
3340 subarray(begin?: number, end?: number): Int32Array;
\r
3343 * Converts a number to a string by using the current locale.
\r
3345 toLocaleString(): string;
\r
3348 * Returns a string representation of an array.
\r
3350 toString(): string;
\r
3352 /** Returns the primitive value of the specified object. */
\r
3353 valueOf(): Int32Array;
\r
3355 [index: number]: number;
\r
3358 interface Int32ArrayConstructor {
\r
3359 readonly prototype: Int32Array;
\r
3360 new(length: number): Int32Array;
\r
3361 new(arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Int32Array;
\r
3362 new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Int32Array;
\r
3365 * The size in bytes of each element in the array.
\r
3367 readonly BYTES_PER_ELEMENT: number;
\r
3370 * Returns a new array from a set of elements.
\r
3371 * @param items A set of elements to include in the new array object.
\r
3373 of(...items: number[]): Int32Array;
\r
3376 * Creates an array from an array-like or iterable object.
\r
3377 * @param arrayLike An array-like or iterable object to convert to an array.
\r
3379 from(arrayLike: ArrayLike<number>): Int32Array;
\r
3382 * Creates an array from an array-like or iterable object.
\r
3383 * @param arrayLike An array-like or iterable object to convert to an array.
\r
3384 * @param mapfn A mapping function to call on every element of the array.
\r
3385 * @param thisArg Value of 'this' used to invoke the mapfn.
\r
3387 from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array;
\r
3390 declare var Int32Array: Int32ArrayConstructor;
\r
3393 * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
\r
3394 * requested number of bytes could not be allocated an exception is raised.
\r
3396 interface Uint32Array {
\r
3398 * The size in bytes of each element in the array.
\r
3400 readonly BYTES_PER_ELEMENT: number;
\r
3403 * The ArrayBuffer instance referenced by the array.
\r
3405 readonly buffer: ArrayBufferLike;
\r
3408 * The length in bytes of the array.
\r
3410 readonly byteLength: number;
\r
3413 * The offset in bytes of the array.
\r
3415 readonly byteOffset: number;
\r
3418 * Returns the this object after copying a section of the array identified by start and end
\r
3419 * to the same array starting at position target
\r
3420 * @param target If target is negative, it is treated as length+target where length is the
\r
3421 * length of the array.
\r
3422 * @param start If start is negative, it is treated as length+start. If end is negative, it
\r
3423 * is treated as length+end.
\r
3424 * @param end If not specified, length of the this object is used as its default value.
\r
3426 copyWithin(target: number, start: number, end?: number): this;
\r
3429 * Determines whether all the members of an array satisfy the specified test.
\r
3430 * @param callbackfn A function that accepts up to three arguments. The every method calls
\r
3431 * the callbackfn function for each element in the array until the callbackfn returns a value
\r
3432 * which is coercible to the Boolean value false, or until the end of the array.
\r
3433 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3434 * If thisArg is omitted, undefined is used as the this value.
\r
3436 every(callbackfn: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): boolean;
\r
3439 * Returns the this object after filling the section identified by start and end with value
\r
3440 * @param value value to fill array section with
\r
3441 * @param start index to start filling the array at. If start is negative, it is treated as
\r
3442 * length+start where length is the length of the array.
\r
3443 * @param end index to stop filling the array at. If end is negative, it is treated as
\r
3446 fill(value: number, start?: number, end?: number): this;
\r
3449 * Returns the elements of an array that meet the condition specified in a callback function.
\r
3450 * @param callbackfn A function that accepts up to three arguments. The filter method calls
\r
3451 * the callbackfn function one time for each element in the array.
\r
3452 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3453 * If thisArg is omitted, undefined is used as the this value.
\r
3455 filter(callbackfn: (value: number, index: number, array: Uint32Array) => any, thisArg?: any): Uint32Array;
\r
3458 * Returns the value of the first element in the array where predicate is true, and undefined
\r
3460 * @param predicate find calls predicate once for each element of the array, in ascending
\r
3461 * order, until it finds one where predicate returns true. If such an element is found, find
\r
3462 * immediately returns that element value. Otherwise, find returns undefined.
\r
3463 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
3464 * predicate. If it is not provided, undefined is used instead.
\r
3466 find(predicate: (value: number, index: number, obj: Uint32Array) => boolean, thisArg?: any): number | undefined;
\r
3469 * Returns the index of the first element in the array where predicate is true, and -1
\r
3471 * @param predicate find calls predicate once for each element of the array, in ascending
\r
3472 * order, until it finds one where predicate returns true. If such an element is found,
\r
3473 * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
\r
3474 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
3475 * predicate. If it is not provided, undefined is used instead.
\r
3477 findIndex(predicate: (value: number, index: number, obj: Uint32Array) => boolean, thisArg?: any): number;
\r
3480 * Performs the specified action for each element in an array.
\r
3481 * @param callbackfn A function that accepts up to three arguments. forEach calls the
\r
3482 * callbackfn function one time for each element in the array.
\r
3483 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3484 * If thisArg is omitted, undefined is used as the this value.
\r
3486 forEach(callbackfn: (value: number, index: number, array: Uint32Array) => void, thisArg?: any): void;
\r
3488 * Returns the index of the first occurrence of a value in an array.
\r
3489 * @param searchElement The value to locate in the array.
\r
3490 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
3491 * search starts at index 0.
\r
3493 indexOf(searchElement: number, fromIndex?: number): number;
\r
3496 * Adds all the elements of an array separated by the specified separator string.
\r
3497 * @param separator A string used to separate one element of an array from the next in the
\r
3498 * resulting String. If omitted, the array elements are separated with a comma.
\r
3500 join(separator?: string): string;
\r
3503 * Returns the index of the last occurrence of a value in an array.
\r
3504 * @param searchElement The value to locate in the array.
\r
3505 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
3506 * search starts at index 0.
\r
3508 lastIndexOf(searchElement: number, fromIndex?: number): number;
\r
3511 * The length of the array.
\r
3513 readonly length: number;
\r
3516 * Calls a defined callback function on each element of an array, and returns an array that
\r
3517 * contains the results.
\r
3518 * @param callbackfn A function that accepts up to three arguments. The map method calls the
\r
3519 * callbackfn function one time for each element in the array.
\r
3520 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3521 * If thisArg is omitted, undefined is used as the this value.
\r
3523 map(callbackfn: (value: number, index: number, array: Uint32Array) => number, thisArg?: any): Uint32Array;
\r
3526 * Calls the specified callback function for all the elements in an array. The return value of
\r
3527 * the callback function is the accumulated result, and is provided as an argument in the next
\r
3528 * call to the callback function.
\r
3529 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
3530 * callbackfn function one time for each element in the array.
\r
3531 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3532 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
3533 * instead of an array value.
\r
3535 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number): number;
\r
3536 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue: number): number;
\r
3539 * Calls the specified callback function for all the elements in an array. The return value of
\r
3540 * the callback function is the accumulated result, and is provided as an argument in the next
\r
3541 * call to the callback function.
\r
3542 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
3543 * callbackfn function one time for each element in the array.
\r
3544 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3545 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
3546 * instead of an array value.
\r
3548 reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
\r
3551 * Calls the specified callback function for all the elements in an array, in descending order.
\r
3552 * The return value of the callback function is the accumulated result, and is provided as an
\r
3553 * argument in the next call to the callback function.
\r
3554 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
3555 * the callbackfn function one time for each element in the array.
\r
3556 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3557 * the accumulation. The first call to the callbackfn function provides this value as an
\r
3558 * argument instead of an array value.
\r
3560 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number): number;
\r
3561 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue: number): number;
\r
3564 * Calls the specified callback function for all the elements in an array, in descending order.
\r
3565 * The return value of the callback function is the accumulated result, and is provided as an
\r
3566 * argument in the next call to the callback function.
\r
3567 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
3568 * the callbackfn function one time for each element in the array.
\r
3569 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3570 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
3571 * instead of an array value.
\r
3573 reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
\r
3576 * Reverses the elements in an Array.
\r
3578 reverse(): Uint32Array;
\r
3581 * Sets a value or an array of values.
\r
3582 * @param array A typed or untyped array of values to set.
\r
3583 * @param offset The index in the current array at which the values are to be written.
\r
3585 set(array: ArrayLike<number>, offset?: number): void;
\r
3588 * Returns a section of an array.
\r
3589 * @param start The beginning of the specified portion of the array.
\r
3590 * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
\r
3592 slice(start?: number, end?: number): Uint32Array;
\r
3595 * Determines whether the specified callback function returns true for any element of an array.
\r
3596 * @param callbackfn A function that accepts up to three arguments. The some method calls
\r
3597 * the callbackfn function for each element in the array until the callbackfn returns a value
\r
3598 * which is coercible to the Boolean value true, or until the end of the array.
\r
3599 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3600 * If thisArg is omitted, undefined is used as the this value.
\r
3602 some(callbackfn: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): boolean;
\r
3606 * @param compareFn Function used to determine the order of the elements. It is expected to return
\r
3607 * a negative value if first argument is less than second argument, zero if they're equal and a positive
\r
3608 * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
\r
3610 * [11,2,22,1].sort((a, b) => a - b)
\r
3613 sort(compareFn?: (a: number, b: number) => number): this;
\r
3616 * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements
\r
3617 * at begin, inclusive, up to end, exclusive.
\r
3618 * @param begin The index of the beginning of the array.
\r
3619 * @param end The index of the end of the array.
\r
3621 subarray(begin?: number, end?: number): Uint32Array;
\r
3624 * Converts a number to a string by using the current locale.
\r
3626 toLocaleString(): string;
\r
3629 * Returns a string representation of an array.
\r
3631 toString(): string;
\r
3633 /** Returns the primitive value of the specified object. */
\r
3634 valueOf(): Uint32Array;
\r
3636 [index: number]: number;
\r
3639 interface Uint32ArrayConstructor {
\r
3640 readonly prototype: Uint32Array;
\r
3641 new(length: number): Uint32Array;
\r
3642 new(arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Uint32Array;
\r
3643 new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Uint32Array;
\r
3646 * The size in bytes of each element in the array.
\r
3648 readonly BYTES_PER_ELEMENT: number;
\r
3651 * Returns a new array from a set of elements.
\r
3652 * @param items A set of elements to include in the new array object.
\r
3654 of(...items: number[]): Uint32Array;
\r
3657 * Creates an array from an array-like or iterable object.
\r
3658 * @param arrayLike An array-like or iterable object to convert to an array.
\r
3660 from(arrayLike: ArrayLike<number>): Uint32Array;
\r
3663 * Creates an array from an array-like or iterable object.
\r
3664 * @param arrayLike An array-like or iterable object to convert to an array.
\r
3665 * @param mapfn A mapping function to call on every element of the array.
\r
3666 * @param thisArg Value of 'this' used to invoke the mapfn.
\r
3668 from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array;
\r
3671 declare var Uint32Array: Uint32ArrayConstructor;
\r
3674 * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
\r
3675 * of bytes could not be allocated an exception is raised.
\r
3677 interface Float32Array {
\r
3679 * The size in bytes of each element in the array.
\r
3681 readonly BYTES_PER_ELEMENT: number;
\r
3684 * The ArrayBuffer instance referenced by the array.
\r
3686 readonly buffer: ArrayBufferLike;
\r
3689 * The length in bytes of the array.
\r
3691 readonly byteLength: number;
\r
3694 * The offset in bytes of the array.
\r
3696 readonly byteOffset: number;
\r
3699 * Returns the this object after copying a section of the array identified by start and end
\r
3700 * to the same array starting at position target
\r
3701 * @param target If target is negative, it is treated as length+target where length is the
\r
3702 * length of the array.
\r
3703 * @param start If start is negative, it is treated as length+start. If end is negative, it
\r
3704 * is treated as length+end.
\r
3705 * @param end If not specified, length of the this object is used as its default value.
\r
3707 copyWithin(target: number, start: number, end?: number): this;
\r
3710 * Determines whether all the members of an array satisfy the specified test.
\r
3711 * @param callbackfn A function that accepts up to three arguments. The every method calls
\r
3712 * the callbackfn function for each element in the array until the callbackfn returns a value
\r
3713 * which is coercible to the Boolean value false, or until the end of the array.
\r
3714 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3715 * If thisArg is omitted, undefined is used as the this value.
\r
3717 every(callbackfn: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): boolean;
\r
3720 * Returns the this object after filling the section identified by start and end with value
\r
3721 * @param value value to fill array section with
\r
3722 * @param start index to start filling the array at. If start is negative, it is treated as
\r
3723 * length+start where length is the length of the array.
\r
3724 * @param end index to stop filling the array at. If end is negative, it is treated as
\r
3727 fill(value: number, start?: number, end?: number): this;
\r
3730 * Returns the elements of an array that meet the condition specified in a callback function.
\r
3731 * @param callbackfn A function that accepts up to three arguments. The filter method calls
\r
3732 * the callbackfn function one time for each element in the array.
\r
3733 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3734 * If thisArg is omitted, undefined is used as the this value.
\r
3736 filter(callbackfn: (value: number, index: number, array: Float32Array) => any, thisArg?: any): Float32Array;
\r
3739 * Returns the value of the first element in the array where predicate is true, and undefined
\r
3741 * @param predicate find calls predicate once for each element of the array, in ascending
\r
3742 * order, until it finds one where predicate returns true. If such an element is found, find
\r
3743 * immediately returns that element value. Otherwise, find returns undefined.
\r
3744 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
3745 * predicate. If it is not provided, undefined is used instead.
\r
3747 find(predicate: (value: number, index: number, obj: Float32Array) => boolean, thisArg?: any): number | undefined;
\r
3750 * Returns the index of the first element in the array where predicate is true, and -1
\r
3752 * @param predicate find calls predicate once for each element of the array, in ascending
\r
3753 * order, until it finds one where predicate returns true. If such an element is found,
\r
3754 * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
\r
3755 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
3756 * predicate. If it is not provided, undefined is used instead.
\r
3758 findIndex(predicate: (value: number, index: number, obj: Float32Array) => boolean, thisArg?: any): number;
\r
3761 * Performs the specified action for each element in an array.
\r
3762 * @param callbackfn A function that accepts up to three arguments. forEach calls the
\r
3763 * callbackfn function one time for each element in the array.
\r
3764 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3765 * If thisArg is omitted, undefined is used as the this value.
\r
3767 forEach(callbackfn: (value: number, index: number, array: Float32Array) => void, thisArg?: any): void;
\r
3770 * Returns the index of the first occurrence of a value in an array.
\r
3771 * @param searchElement The value to locate in the array.
\r
3772 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
3773 * search starts at index 0.
\r
3775 indexOf(searchElement: number, fromIndex?: number): number;
\r
3778 * Adds all the elements of an array separated by the specified separator string.
\r
3779 * @param separator A string used to separate one element of an array from the next in the
\r
3780 * resulting String. If omitted, the array elements are separated with a comma.
\r
3782 join(separator?: string): string;
\r
3785 * Returns the index of the last occurrence of a value in an array.
\r
3786 * @param searchElement The value to locate in the array.
\r
3787 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
3788 * search starts at index 0.
\r
3790 lastIndexOf(searchElement: number, fromIndex?: number): number;
\r
3793 * The length of the array.
\r
3795 readonly length: number;
\r
3798 * Calls a defined callback function on each element of an array, and returns an array that
\r
3799 * contains the results.
\r
3800 * @param callbackfn A function that accepts up to three arguments. The map method calls the
\r
3801 * callbackfn function one time for each element in the array.
\r
3802 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3803 * If thisArg is omitted, undefined is used as the this value.
\r
3805 map(callbackfn: (value: number, index: number, array: Float32Array) => number, thisArg?: any): Float32Array;
\r
3808 * Calls the specified callback function for all the elements in an array. The return value of
\r
3809 * the callback function is the accumulated result, and is provided as an argument in the next
\r
3810 * call to the callback function.
\r
3811 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
3812 * callbackfn function one time for each element in the array.
\r
3813 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3814 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
3815 * instead of an array value.
\r
3817 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number): number;
\r
3818 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue: number): number;
\r
3821 * Calls the specified callback function for all the elements in an array. The return value of
\r
3822 * the callback function is the accumulated result, and is provided as an argument in the next
\r
3823 * call to the callback function.
\r
3824 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
3825 * callbackfn function one time for each element in the array.
\r
3826 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3827 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
3828 * instead of an array value.
\r
3830 reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
\r
3833 * Calls the specified callback function for all the elements in an array, in descending order.
\r
3834 * The return value of the callback function is the accumulated result, and is provided as an
\r
3835 * argument in the next call to the callback function.
\r
3836 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
3837 * the callbackfn function one time for each element in the array.
\r
3838 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3839 * the accumulation. The first call to the callbackfn function provides this value as an
\r
3840 * argument instead of an array value.
\r
3842 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number): number;
\r
3843 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue: number): number;
\r
3846 * Calls the specified callback function for all the elements in an array, in descending order.
\r
3847 * The return value of the callback function is the accumulated result, and is provided as an
\r
3848 * argument in the next call to the callback function.
\r
3849 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
3850 * the callbackfn function one time for each element in the array.
\r
3851 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
3852 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
3853 * instead of an array value.
\r
3855 reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
\r
3858 * Reverses the elements in an Array.
\r
3860 reverse(): Float32Array;
\r
3863 * Sets a value or an array of values.
\r
3864 * @param array A typed or untyped array of values to set.
\r
3865 * @param offset The index in the current array at which the values are to be written.
\r
3867 set(array: ArrayLike<number>, offset?: number): void;
\r
3870 * Returns a section of an array.
\r
3871 * @param start The beginning of the specified portion of the array.
\r
3872 * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
\r
3874 slice(start?: number, end?: number): Float32Array;
\r
3877 * Determines whether the specified callback function returns true for any element of an array.
\r
3878 * @param callbackfn A function that accepts up to three arguments. The some method calls
\r
3879 * the callbackfn function for each element in the array until the callbackfn returns a value
\r
3880 * which is coercible to the Boolean value true, or until the end of the array.
\r
3881 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3882 * If thisArg is omitted, undefined is used as the this value.
\r
3884 some(callbackfn: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): boolean;
\r
3888 * @param compareFn Function used to determine the order of the elements. It is expected to return
\r
3889 * a negative value if first argument is less than second argument, zero if they're equal and a positive
\r
3890 * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
\r
3892 * [11,2,22,1].sort((a, b) => a - b)
\r
3895 sort(compareFn?: (a: number, b: number) => number): this;
\r
3898 * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements
\r
3899 * at begin, inclusive, up to end, exclusive.
\r
3900 * @param begin The index of the beginning of the array.
\r
3901 * @param end The index of the end of the array.
\r
3903 subarray(begin?: number, end?: number): Float32Array;
\r
3906 * Converts a number to a string by using the current locale.
\r
3908 toLocaleString(): string;
\r
3911 * Returns a string representation of an array.
\r
3913 toString(): string;
\r
3915 /** Returns the primitive value of the specified object. */
\r
3916 valueOf(): Float32Array;
\r
3918 [index: number]: number;
\r
3921 interface Float32ArrayConstructor {
\r
3922 readonly prototype: Float32Array;
\r
3923 new(length: number): Float32Array;
\r
3924 new(arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Float32Array;
\r
3925 new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Float32Array;
\r
3928 * The size in bytes of each element in the array.
\r
3930 readonly BYTES_PER_ELEMENT: number;
\r
3933 * Returns a new array from a set of elements.
\r
3934 * @param items A set of elements to include in the new array object.
\r
3936 of(...items: number[]): Float32Array;
\r
3939 * Creates an array from an array-like or iterable object.
\r
3940 * @param arrayLike An array-like or iterable object to convert to an array.
\r
3942 from(arrayLike: ArrayLike<number>): Float32Array;
\r
3945 * Creates an array from an array-like or iterable object.
\r
3946 * @param arrayLike An array-like or iterable object to convert to an array.
\r
3947 * @param mapfn A mapping function to call on every element of the array.
\r
3948 * @param thisArg Value of 'this' used to invoke the mapfn.
\r
3950 from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array;
\r
3954 declare var Float32Array: Float32ArrayConstructor;
\r
3957 * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
\r
3958 * number of bytes could not be allocated an exception is raised.
\r
3960 interface Float64Array {
\r
3962 * The size in bytes of each element in the array.
\r
3964 readonly BYTES_PER_ELEMENT: number;
\r
3967 * The ArrayBuffer instance referenced by the array.
\r
3969 readonly buffer: ArrayBufferLike;
\r
3972 * The length in bytes of the array.
\r
3974 readonly byteLength: number;
\r
3977 * The offset in bytes of the array.
\r
3979 readonly byteOffset: number;
\r
3982 * Returns the this object after copying a section of the array identified by start and end
\r
3983 * to the same array starting at position target
\r
3984 * @param target If target is negative, it is treated as length+target where length is the
\r
3985 * length of the array.
\r
3986 * @param start If start is negative, it is treated as length+start. If end is negative, it
\r
3987 * is treated as length+end.
\r
3988 * @param end If not specified, length of the this object is used as its default value.
\r
3990 copyWithin(target: number, start: number, end?: number): this;
\r
3993 * Determines whether all the members of an array satisfy the specified test.
\r
3994 * @param callbackfn A function that accepts up to three arguments. The every method calls
\r
3995 * the callbackfn function for each element in the array until the callbackfn returns a value
\r
3996 * which is coercible to the Boolean value false, or until the end of the array.
\r
3997 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
3998 * If thisArg is omitted, undefined is used as the this value.
\r
4000 every(callbackfn: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): boolean;
\r
4003 * Returns the this object after filling the section identified by start and end with value
\r
4004 * @param value value to fill array section with
\r
4005 * @param start index to start filling the array at. If start is negative, it is treated as
\r
4006 * length+start where length is the length of the array.
\r
4007 * @param end index to stop filling the array at. If end is negative, it is treated as
\r
4010 fill(value: number, start?: number, end?: number): this;
\r
4013 * Returns the elements of an array that meet the condition specified in a callback function.
\r
4014 * @param callbackfn A function that accepts up to three arguments. The filter method calls
\r
4015 * the callbackfn function one time for each element in the array.
\r
4016 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
4017 * If thisArg is omitted, undefined is used as the this value.
\r
4019 filter(callbackfn: (value: number, index: number, array: Float64Array) => any, thisArg?: any): Float64Array;
\r
4022 * Returns the value of the first element in the array where predicate is true, and undefined
\r
4024 * @param predicate find calls predicate once for each element of the array, in ascending
\r
4025 * order, until it finds one where predicate returns true. If such an element is found, find
\r
4026 * immediately returns that element value. Otherwise, find returns undefined.
\r
4027 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
4028 * predicate. If it is not provided, undefined is used instead.
\r
4030 find(predicate: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any): number | undefined;
\r
4033 * Returns the index of the first element in the array where predicate is true, and -1
\r
4035 * @param predicate find calls predicate once for each element of the array, in ascending
\r
4036 * order, until it finds one where predicate returns true. If such an element is found,
\r
4037 * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
\r
4038 * @param thisArg If provided, it will be used as the this value for each invocation of
\r
4039 * predicate. If it is not provided, undefined is used instead.
\r
4041 findIndex(predicate: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any): number;
\r
4044 * Performs the specified action for each element in an array.
\r
4045 * @param callbackfn A function that accepts up to three arguments. forEach calls the
\r
4046 * callbackfn function one time for each element in the array.
\r
4047 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
4048 * If thisArg is omitted, undefined is used as the this value.
\r
4050 forEach(callbackfn: (value: number, index: number, array: Float64Array) => void, thisArg?: any): void;
\r
4053 * Returns the index of the first occurrence of a value in an array.
\r
4054 * @param searchElement The value to locate in the array.
\r
4055 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
4056 * search starts at index 0.
\r
4058 indexOf(searchElement: number, fromIndex?: number): number;
\r
4061 * Adds all the elements of an array separated by the specified separator string.
\r
4062 * @param separator A string used to separate one element of an array from the next in the
\r
4063 * resulting String. If omitted, the array elements are separated with a comma.
\r
4065 join(separator?: string): string;
\r
4068 * Returns the index of the last occurrence of a value in an array.
\r
4069 * @param searchElement The value to locate in the array.
\r
4070 * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
\r
4071 * search starts at index 0.
\r
4073 lastIndexOf(searchElement: number, fromIndex?: number): number;
\r
4076 * The length of the array.
\r
4078 readonly length: number;
\r
4081 * Calls a defined callback function on each element of an array, and returns an array that
\r
4082 * contains the results.
\r
4083 * @param callbackfn A function that accepts up to three arguments. The map method calls the
\r
4084 * callbackfn function one time for each element in the array.
\r
4085 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
4086 * If thisArg is omitted, undefined is used as the this value.
\r
4088 map(callbackfn: (value: number, index: number, array: Float64Array) => number, thisArg?: any): Float64Array;
\r
4091 * Calls the specified callback function for all the elements in an array. The return value of
\r
4092 * the callback function is the accumulated result, and is provided as an argument in the next
\r
4093 * call to the callback function.
\r
4094 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
4095 * callbackfn function one time for each element in the array.
\r
4096 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
4097 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
4098 * instead of an array value.
\r
4100 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number): number;
\r
4101 reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue: number): number;
\r
4104 * Calls the specified callback function for all the elements in an array. The return value of
\r
4105 * the callback function is the accumulated result, and is provided as an argument in the next
\r
4106 * call to the callback function.
\r
4107 * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
\r
4108 * callbackfn function one time for each element in the array.
\r
4109 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
4110 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
4111 * instead of an array value.
\r
4113 reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
\r
4116 * Calls the specified callback function for all the elements in an array, in descending order.
\r
4117 * The return value of the callback function is the accumulated result, and is provided as an
\r
4118 * argument in the next call to the callback function.
\r
4119 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
4120 * the callbackfn function one time for each element in the array.
\r
4121 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
4122 * the accumulation. The first call to the callbackfn function provides this value as an
\r
4123 * argument instead of an array value.
\r
4125 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number): number;
\r
4126 reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue: number): number;
\r
4129 * Calls the specified callback function for all the elements in an array, in descending order.
\r
4130 * The return value of the callback function is the accumulated result, and is provided as an
\r
4131 * argument in the next call to the callback function.
\r
4132 * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
\r
4133 * the callbackfn function one time for each element in the array.
\r
4134 * @param initialValue If initialValue is specified, it is used as the initial value to start
\r
4135 * the accumulation. The first call to the callbackfn function provides this value as an argument
\r
4136 * instead of an array value.
\r
4138 reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
\r
4141 * Reverses the elements in an Array.
\r
4143 reverse(): Float64Array;
\r
4146 * Sets a value or an array of values.
\r
4147 * @param array A typed or untyped array of values to set.
\r
4148 * @param offset The index in the current array at which the values are to be written.
\r
4150 set(array: ArrayLike<number>, offset?: number): void;
\r
4153 * Returns a section of an array.
\r
4154 * @param start The beginning of the specified portion of the array.
\r
4155 * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
\r
4157 slice(start?: number, end?: number): Float64Array;
\r
4160 * Determines whether the specified callback function returns true for any element of an array.
\r
4161 * @param callbackfn A function that accepts up to three arguments. The some method calls
\r
4162 * the callbackfn function for each element in the array until the callbackfn returns a value
\r
4163 * which is coercible to the Boolean value true, or until the end of the array.
\r
4164 * @param thisArg An object to which the this keyword can refer in the callbackfn function.
\r
4165 * If thisArg is omitted, undefined is used as the this value.
\r
4167 some(callbackfn: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): boolean;
\r
4171 * @param compareFn Function used to determine the order of the elements. It is expected to return
\r
4172 * a negative value if first argument is less than second argument, zero if they're equal and a positive
\r
4173 * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
\r
4175 * [11,2,22,1].sort((a, b) => a - b)
\r
4178 sort(compareFn?: (a: number, b: number) => number): this;
\r
4181 * at begin, inclusive, up to end, exclusive.
\r
4182 * @param begin The index of the beginning of the array.
\r
4183 * @param end The index of the end of the array.
\r
4185 subarray(begin?: number, end?: number): Float64Array;
\r
4187 toString(): string;
\r
4189 /** Returns the primitive value of the specified object. */
\r
4190 valueOf(): Float64Array;
\r
4192 [index: number]: number;
\r
4195 interface Float64ArrayConstructor {
\r
4196 readonly prototype: Float64Array;
\r
4197 new(length: number): Float64Array;
\r
4198 new(arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Float64Array;
\r
4199 new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Float64Array;
\r
4202 * The size in bytes of each element in the array.
\r
4204 readonly BYTES_PER_ELEMENT: number;
\r
4207 * Returns a new array from a set of elements.
\r
4208 * @param items A set of elements to include in the new array object.
\r
4210 of(...items: number[]): Float64Array;
\r
4213 * Creates an array from an array-like or iterable object.
\r
4214 * @param arrayLike An array-like or iterable object to convert to an array.
\r
4216 from(arrayLike: ArrayLike<number>): Float64Array;
\r
4219 * Creates an array from an array-like or iterable object.
\r
4220 * @param arrayLike An array-like or iterable object to convert to an array.
\r
4221 * @param mapfn A mapping function to call on every element of the array.
\r
4222 * @param thisArg Value of 'this' used to invoke the mapfn.
\r
4224 from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array;
\r
4227 declare var Float64Array: Float64ArrayConstructor;
\r
4229 /////////////////////////////
\r
4230 /// ECMAScript Internationalization API
\r
4231 /////////////////////////////
\r
4233 declare namespace Intl {
\r
4234 interface CollatorOptions {
\r
4236 localeMatcher?: string;
\r
4237 numeric?: boolean;
\r
4238 caseFirst?: string;
\r
4239 sensitivity?: string;
\r
4240 ignorePunctuation?: boolean;
\r
4243 interface ResolvedCollatorOptions {
\r
4246 sensitivity: string;
\r
4247 ignorePunctuation: boolean;
\r
4248 collation: string;
\r
4249 caseFirst: string;
\r
4253 interface Collator {
\r
4254 compare(x: string, y: string): number;
\r
4255 resolvedOptions(): ResolvedCollatorOptions;
\r
4258 new(locales?: string | string[], options?: CollatorOptions): Collator;
\r
4259 (locales?: string | string[], options?: CollatorOptions): Collator;
\r
4260 supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[];
\r
4263 interface NumberFormatOptions {
\r
4264 localeMatcher?: string;
\r
4266 currency?: string;
\r
4267 currencyDisplay?: string;
\r
4268 useGrouping?: boolean;
\r
4269 minimumIntegerDigits?: number;
\r
4270 minimumFractionDigits?: number;
\r
4271 maximumFractionDigits?: number;
\r
4272 minimumSignificantDigits?: number;
\r
4273 maximumSignificantDigits?: number;
\r
4276 interface ResolvedNumberFormatOptions {
\r
4278 numberingSystem: string;
\r
4280 currency?: string;
\r
4281 currencyDisplay?: string;
\r
4282 minimumIntegerDigits: number;
\r
4283 minimumFractionDigits: number;
\r
4284 maximumFractionDigits: number;
\r
4285 minimumSignificantDigits?: number;
\r
4286 maximumSignificantDigits?: number;
\r
4287 useGrouping: boolean;
\r
4290 interface NumberFormat {
\r
4291 format(value: number): string;
\r
4292 resolvedOptions(): ResolvedNumberFormatOptions;
\r
4294 var NumberFormat: {
\r
4295 new(locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
\r
4296 (locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
\r
4297 supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[];
\r
4300 interface DateTimeFormatOptions {
\r
4301 localeMatcher?: string;
\r
4310 timeZoneName?: string;
\r
4311 formatMatcher?: string;
\r
4313 timeZone?: string;
\r
4316 interface ResolvedDateTimeFormatOptions {
\r
4319 numberingSystem: string;
\r
4330 timeZoneName?: string;
\r
4333 interface DateTimeFormat {
\r
4334 format(date?: Date | number): string;
\r
4335 resolvedOptions(): ResolvedDateTimeFormatOptions;
\r
4337 var DateTimeFormat: {
\r
4338 new(locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
\r
4339 (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
\r
4340 supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[];
\r
4344 interface String {
\r
4346 * Determines whether two strings are equivalent in the current or specified locale.
\r
4347 * @param that String to compare to target string
\r
4348 * @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
4349 * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
\r
4351 localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number;
\r
4354 interface Number {
\r
4356 * Converts a number to a string by using the current or specified locale.
\r
4357 * @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
4358 * @param options An object that contains one or more properties that specify comparison options.
\r
4360 toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string;
\r
4365 * Converts a date and time to a string by using the current or specified locale.
\r
4366 * @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
4367 * @param options An object that contains one or more properties that specify comparison options.
\r
4369 toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
\r
4371 * Converts a date to a string by using the current or specified locale.
\r
4372 * @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
4373 * @param options An object that contains one or more properties that specify comparison options.
\r
4375 toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
\r
4378 * Converts a time to a string by using the current or specified locale.
\r
4379 * @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
4380 * @param options An object that contains one or more properties that specify comparison options.
\r
4382 toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
\r