tsrc 2.1.5.0

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