typescript-src 1.4.1.3 → 1.6.2.0

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