typescript-src 1.0.1.2 → 1.4.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +21 -21
  3. data/CHANGES.md +14 -11
  4. data/Gemfile +7 -7
  5. data/README.md +38 -35
  6. data/Rakefile +24 -21
  7. data/lib/typescript-src.rb +64 -52
  8. data/lib/typescript-src/support/typescript/.npmignore +7 -12
  9. data/lib/typescript-src/support/typescript/CONTRIBUTING.md +74 -0
  10. data/lib/typescript-src/support/typescript/README.md +78 -0
  11. data/lib/typescript-src/support/typescript/ThirdPartyNoticeText.txt +10 -60
  12. data/lib/typescript-src/support/typescript/bin/lib.core.d.ts +1164 -0
  13. data/lib/typescript-src/support/typescript/bin/lib.core.es6.d.ts +4801 -0
  14. data/lib/typescript-src/support/typescript/bin/lib.d.ts +12097 -12836
  15. data/lib/typescript-src/support/typescript/bin/lib.dom.d.ts +13043 -0
  16. data/lib/typescript-src/support/typescript/bin/lib.es6.d.ts +17195 -0
  17. data/lib/typescript-src/support/typescript/bin/lib.scriptHost.d.ts +38 -0
  18. data/lib/typescript-src/support/typescript/bin/lib.webworker.d.ts +1652 -0
  19. data/lib/typescript-src/support/typescript/bin/tsc +2 -2
  20. data/lib/typescript-src/support/typescript/bin/tsc.js +17276 -61916
  21. data/lib/typescript-src/support/typescript/bin/typescript.d.ts +1849 -0
  22. data/lib/typescript-src/support/typescript/bin/typescriptServices.d.ts +1849 -0
  23. data/lib/typescript-src/support/typescript/bin/typescriptServices.js +26273 -0
  24. data/lib/typescript-src/support/typescript/bin/typescriptServices_internal.d.ts +258 -0
  25. data/lib/typescript-src/support/typescript/bin/typescript_internal.d.ts +258 -0
  26. data/lib/typescript-src/support/typescript/package.json +69 -61
  27. data/lib/typescript-src/version.rb +4 -4
  28. data/test/test_type_script_src.rb +35 -35
  29. data/typescript-src.gemspec +22 -22
  30. metadata +16 -26
  31. data/lib/typescript-src/support/typescript/README.txt +0 -27
  32. data/lib/typescript-src/support/typescript/bin/resources/cs/cz/diagnosticMessages.generated.json +0 -374
  33. data/lib/typescript-src/support/typescript/bin/resources/cs/diagnosticMessages.generated.json +0 -374
  34. data/lib/typescript-src/support/typescript/bin/resources/cz/diagnosticMessages.generated.json +0 -374
  35. data/lib/typescript-src/support/typescript/bin/resources/de/diagnosticMessages.generated.json +0 -374
  36. data/lib/typescript-src/support/typescript/bin/resources/diagnosticMessages.generated.json +0 -374
  37. data/lib/typescript-src/support/typescript/bin/resources/en/diagnosticMessages.generated.json +0 -374
  38. data/lib/typescript-src/support/typescript/bin/resources/en/us/diagnosticMessages.generated.json +0 -374
  39. data/lib/typescript-src/support/typescript/bin/resources/es/diagnosticMessages.generated.json +0 -374
  40. data/lib/typescript-src/support/typescript/bin/resources/fr/diagnosticMessages.generated.json +0 -374
  41. data/lib/typescript-src/support/typescript/bin/resources/it/diagnosticMessages.generated.json +0 -374
  42. data/lib/typescript-src/support/typescript/bin/resources/ja/diagnosticMessages.generated.json +0 -374
  43. data/lib/typescript-src/support/typescript/bin/resources/ja/jp/diagnosticMessages.generated.json +0 -374
  44. data/lib/typescript-src/support/typescript/bin/resources/ko/diagnosticMessages.generated.json +0 -374
  45. data/lib/typescript-src/support/typescript/bin/resources/ko/kr/diagnosticMessages.generated.json +0 -374
  46. data/lib/typescript-src/support/typescript/bin/resources/pl/diagnosticMessages.generated.json +0 -374
  47. data/lib/typescript-src/support/typescript/bin/resources/pt/br/diagnosticMessages.generated.json +0 -374
  48. data/lib/typescript-src/support/typescript/bin/resources/pt/diagnosticMessages.generated.json +0 -374
  49. data/lib/typescript-src/support/typescript/bin/resources/ru/diagnosticMessages.generated.json +0 -374
  50. data/lib/typescript-src/support/typescript/bin/resources/tr/diagnosticMessages.generated.json +0 -374
  51. data/lib/typescript-src/support/typescript/bin/resources/zh/cn/diagnosticMessages.generated.json +0 -373
  52. data/lib/typescript-src/support/typescript/bin/resources/zh/tw/diagnosticMessages.generated.json +0 -373
  53. data/lib/typescript-src/support/typescript/bin/typescript.js +0 -61516
@@ -0,0 +1,4801 @@
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(o: any): any;
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(o: any): any;
189
+
190
+ /**
191
+ * Prevents the addition of new properties to an object.
192
+ * @param o Object to make non-extensible.
193
+ */
194
+ preventExtensions(o: any): any;
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 object or string literal that represents the regular expression
335
+ * @param replaceValue A String object or string literal containing the text to replace for every successful match of rgExp in stringObj.
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 object or string literal that represents the regular expression
342
+ * @param replaceValue A function that returns the replacement text.
343
+ */
344
+ replace(searchValue: string, replaceValue: (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 object or string literal containing the text to replace for every successful match of rgExp in stringObj.
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 replaceValue A function that returns the replacement text.
357
+ */
358
+ replace(searchValue: RegExp, replaceValue: (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
+ [index: number]: string;
429
+ }
430
+
431
+ interface StringConstructor {
432
+ new (value?: any): String;
433
+ (value?: any): string;
434
+ prototype: String;
435
+ fromCharCode(...codes: number[]): string;
436
+ }
437
+
438
+ /**
439
+ * Allows manipulation and formatting of text strings and determination and location of substrings within strings.
440
+ */
441
+ declare var String: StringConstructor;
442
+
443
+ interface Boolean {
444
+ }
445
+
446
+ interface BooleanConstructor {
447
+ new (value?: any): Boolean;
448
+ (value?: any): boolean;
449
+ prototype: Boolean;
450
+ }
451
+
452
+ declare var Boolean: BooleanConstructor;
453
+
454
+ interface Number {
455
+ /**
456
+ * Returns a string representation of an object.
457
+ * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.
458
+ */
459
+ toString(radix?: number): string;
460
+
461
+ /**
462
+ * Returns a string representing a number in fixed-point notation.
463
+ * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
464
+ */
465
+ toFixed(fractionDigits?: number): string;
466
+
467
+ /**
468
+ * Returns a string containing a number represented in exponential notation.
469
+ * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
470
+ */
471
+ toExponential(fractionDigits?: number): string;
472
+
473
+ /**
474
+ * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
475
+ * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
476
+ */
477
+ toPrecision(precision?: number): string;
478
+ }
479
+
480
+ interface NumberConstructor {
481
+ new (value?: any): Number;
482
+ (value?: any): number;
483
+ prototype: Number;
484
+
485
+ /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */
486
+ MAX_VALUE: number;
487
+
488
+ /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */
489
+ MIN_VALUE: number;
490
+
491
+ /**
492
+ * A value that is not a number.
493
+ * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.
494
+ */
495
+ NaN: number;
496
+
497
+ /**
498
+ * A value that is less than the largest negative number that can be represented in JavaScript.
499
+ * JavaScript displays NEGATIVE_INFINITY values as -infinity.
500
+ */
501
+ NEGATIVE_INFINITY: number;
502
+
503
+ /**
504
+ * A value greater than the largest number that can be represented in JavaScript.
505
+ * JavaScript displays POSITIVE_INFINITY values as infinity.
506
+ */
507
+ POSITIVE_INFINITY: number;
508
+ }
509
+
510
+ /** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */
511
+ declare var Number: NumberConstructor;
512
+
513
+ interface TemplateStringsArray extends Array<string> {
514
+ raw: string[];
515
+ }
516
+
517
+ interface Math {
518
+ /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */
519
+ E: number;
520
+ /** The natural logarithm of 10. */
521
+ LN10: number;
522
+ /** The natural logarithm of 2. */
523
+ LN2: number;
524
+ /** The base-2 logarithm of e. */
525
+ LOG2E: number;
526
+ /** The base-10 logarithm of e. */
527
+ LOG10E: number;
528
+ /** Pi. This is the ratio of the circumference of a circle to its diameter. */
529
+ PI: number;
530
+ /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */
531
+ SQRT1_2: number;
532
+ /** The square root of 2. */
533
+ SQRT2: number;
534
+ /**
535
+ * Returns the absolute value of a number (the value without regard to whether it is positive or negative).
536
+ * For example, the absolute value of -5 is the same as the absolute value of 5.
537
+ * @param x A numeric expression for which the absolute value is needed.
538
+ */
539
+ abs(x: number): number;
540
+ /**
541
+ * Returns the arc cosine (or inverse cosine) of a number.
542
+ * @param x A numeric expression.
543
+ */
544
+ acos(x: number): number;
545
+ /**
546
+ * Returns the arcsine of a number.
547
+ * @param x A numeric expression.
548
+ */
549
+ asin(x: number): number;
550
+ /**
551
+ * Returns the arctangent of a number.
552
+ * @param x A numeric expression for which the arctangent is needed.
553
+ */
554
+ atan(x: number): number;
555
+ /**
556
+ * Returns the angle (in radians) from the X axis to a point (y,x).
557
+ * @param y A numeric expression representing the cartesian y-coordinate.
558
+ * @param x A numeric expression representing the cartesian x-coordinate.
559
+ */
560
+ atan2(y: number, x: number): number;
561
+ /**
562
+ * Returns the smallest number greater than or equal to its numeric argument.
563
+ * @param x A numeric expression.
564
+ */
565
+ ceil(x: number): number;
566
+ /**
567
+ * Returns the cosine of a number.
568
+ * @param x A numeric expression that contains an angle measured in radians.
569
+ */
570
+ cos(x: number): number;
571
+ /**
572
+ * Returns e (the base of natural logarithms) raised to a power.
573
+ * @param x A numeric expression representing the power of e.
574
+ */
575
+ exp(x: number): number;
576
+ /**
577
+ * Returns the greatest number less than or equal to its numeric argument.
578
+ * @param x A numeric expression.
579
+ */
580
+ floor(x: number): number;
581
+ /**
582
+ * Returns the natural logarithm (base e) of a number.
583
+ * @param x A numeric expression.
584
+ */
585
+ log(x: number): number;
586
+ /**
587
+ * Returns the larger of a set of supplied numeric expressions.
588
+ * @param values Numeric expressions to be evaluated.
589
+ */
590
+ max(...values: number[]): number;
591
+ /**
592
+ * Returns the smaller of a set of supplied numeric expressions.
593
+ * @param values Numeric expressions to be evaluated.
594
+ */
595
+ min(...values: number[]): number;
596
+ /**
597
+ * Returns the value of a base expression taken to a specified power.
598
+ * @param x The base value of the expression.
599
+ * @param y The exponent value of the expression.
600
+ */
601
+ pow(x: number, y: number): number;
602
+ /** Returns a pseudorandom number between 0 and 1. */
603
+ random(): number;
604
+ /**
605
+ * Returns a supplied numeric expression rounded to the nearest number.
606
+ * @param x The value to be rounded to the nearest number.
607
+ */
608
+ round(x: number): number;
609
+ /**
610
+ * Returns the sine of a number.
611
+ * @param x A numeric expression that contains an angle measured in radians.
612
+ */
613
+ sin(x: number): number;
614
+ /**
615
+ * Returns the square root of a number.
616
+ * @param x A numeric expression.
617
+ */
618
+ sqrt(x: number): number;
619
+ /**
620
+ * Returns the tangent of a number.
621
+ * @param x A numeric expression that contains an angle measured in radians.
622
+ */
623
+ tan(x: number): number;
624
+ }
625
+ /** An intrinsic object that provides basic mathematics functionality and constants. */
626
+ declare var Math: Math;
627
+
628
+ /** Enables basic storage and retrieval of dates and times. */
629
+ interface Date {
630
+ /** Returns a string representation of a date. The format of the string depends on the locale. */
631
+ toString(): string;
632
+ /** Returns a date as a string value. */
633
+ toDateString(): string;
634
+ /** Returns a time as a string value. */
635
+ toTimeString(): string;
636
+ /** Returns a value as a string value appropriate to the host environment's current locale. */
637
+ toLocaleString(): string;
638
+ /** Returns a date as a string value appropriate to the host environment's current locale. */
639
+ toLocaleDateString(): string;
640
+ /** Returns a time as a string value appropriate to the host environment's current locale. */
641
+ toLocaleTimeString(): string;
642
+ /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */
643
+ valueOf(): number;
644
+ /** Gets the time value in milliseconds. */
645
+ getTime(): number;
646
+ /** Gets the year, using local time. */
647
+ getFullYear(): number;
648
+ /** Gets the year using Universal Coordinated Time (UTC). */
649
+ getUTCFullYear(): number;
650
+ /** Gets the month, using local time. */
651
+ getMonth(): number;
652
+ /** Gets the month of a Date object using Universal Coordinated Time (UTC). */
653
+ getUTCMonth(): number;
654
+ /** Gets the day-of-the-month, using local time. */
655
+ getDate(): number;
656
+ /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */
657
+ getUTCDate(): number;
658
+ /** Gets the day of the week, using local time. */
659
+ getDay(): number;
660
+ /** Gets the day of the week using Universal Coordinated Time (UTC). */
661
+ getUTCDay(): number;
662
+ /** Gets the hours in a date, using local time. */
663
+ getHours(): number;
664
+ /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */
665
+ getUTCHours(): number;
666
+ /** Gets the minutes of a Date object, using local time. */
667
+ getMinutes(): number;
668
+ /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */
669
+ getUTCMinutes(): number;
670
+ /** Gets the seconds of a Date object, using local time. */
671
+ getSeconds(): number;
672
+ /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */
673
+ getUTCSeconds(): number;
674
+ /** Gets the milliseconds of a Date, using local time. */
675
+ getMilliseconds(): number;
676
+ /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */
677
+ getUTCMilliseconds(): number;
678
+ /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */
679
+ getTimezoneOffset(): number;
680
+ /**
681
+ * Sets the date and time value in the Date object.
682
+ * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
683
+ */
684
+ setTime(time: number): number;
685
+ /**
686
+ * Sets the milliseconds value in the Date object using local time.
687
+ * @param ms A numeric value equal to the millisecond value.
688
+ */
689
+ setMilliseconds(ms: number): number;
690
+ /**
691
+ * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
692
+ * @param ms A numeric value equal to the millisecond value.
693
+ */
694
+ setUTCMilliseconds(ms: number): number;
695
+
696
+ /**
697
+ * Sets the seconds value in the Date object using local time.
698
+ * @param sec A numeric value equal to the seconds value.
699
+ * @param ms A numeric value equal to the milliseconds value.
700
+ */
701
+ setSeconds(sec: number, ms?: number): number;
702
+ /**
703
+ * Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
704
+ * @param sec A numeric value equal to the seconds value.
705
+ * @param ms A numeric value equal to the milliseconds value.
706
+ */
707
+ setUTCSeconds(sec: number, ms?: number): number;
708
+ /**
709
+ * Sets the minutes value in the Date object using local time.
710
+ * @param min A numeric value equal to the minutes value.
711
+ * @param sec A numeric value equal to the seconds value.
712
+ * @param ms A numeric value equal to the milliseconds value.
713
+ */
714
+ setMinutes(min: number, sec?: number, ms?: number): number;
715
+ /**
716
+ * Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
717
+ * @param min A numeric value equal to the minutes value.
718
+ * @param sec A numeric value equal to the seconds value.
719
+ * @param ms A numeric value equal to the milliseconds value.
720
+ */
721
+ setUTCMinutes(min: number, sec?: number, ms?: number): number;
722
+ /**
723
+ * Sets the hour value in the Date object using local time.
724
+ * @param hours A numeric value equal to the hours value.
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
+ setHours(hours: number, min?: number, sec?: number, ms?: number): number;
730
+ /**
731
+ * Sets the hours value in the Date object using Universal Coordinated Time (UTC).
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
+ setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
738
+ /**
739
+ * Sets the numeric day-of-the-month value of the Date object using local time.
740
+ * @param date A numeric value equal to the day of the month.
741
+ */
742
+ setDate(date: number): number;
743
+ /**
744
+ * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
745
+ * @param date A numeric value equal to the day of the month.
746
+ */
747
+ setUTCDate(date: number): number;
748
+ /**
749
+ * Sets the month value in the Date object using local time.
750
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
751
+ * @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.
752
+ */
753
+ setMonth(month: number, date?: number): number;
754
+ /**
755
+ * Sets the month value in the Date object using Universal Coordinated Time (UTC).
756
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
757
+ * @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.
758
+ */
759
+ setUTCMonth(month: number, date?: number): number;
760
+ /**
761
+ * Sets the year of the Date object using local time.
762
+ * @param year A numeric value for the year.
763
+ * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
764
+ * @param date A numeric value equal for the day of the month.
765
+ */
766
+ setFullYear(year: number, month?: number, date?: number): number;
767
+ /**
768
+ * Sets the year value in the Date object using Universal Coordinated Time (UTC).
769
+ * @param year A numeric value equal to the year.
770
+ * @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.
771
+ * @param date A numeric value equal to the day of the month.
772
+ */
773
+ setUTCFullYear(year: number, month?: number, date?: number): number;
774
+ /** Returns a date converted to a string using Universal Coordinated Time (UTC). */
775
+ toUTCString(): string;
776
+ /** Returns a date as a string value in ISO format. */
777
+ toISOString(): string;
778
+ /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */
779
+ toJSON(key?: any): string;
780
+ }
781
+
782
+ interface DateConstructor {
783
+ new (): Date;
784
+ new (value: number): Date;
785
+ new (value: string): Date;
786
+ new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
787
+ (): string;
788
+ prototype: Date;
789
+ /**
790
+ * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.
791
+ * @param s A date string
792
+ */
793
+ parse(s: string): number;
794
+ /**
795
+ * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
796
+ * @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.
797
+ * @param month The month as an number between 0 and 11 (January to December).
798
+ * @param date The date as an number between 1 and 31.
799
+ * @param hours Must be supplied if minutes is supplied. An number from 0 to 23 (midnight to 11pm) that specifies the hour.
800
+ * @param minutes Must be supplied if seconds is supplied. An number from 0 to 59 that specifies the minutes.
801
+ * @param seconds Must be supplied if milliseconds is supplied. An number from 0 to 59 that specifies the seconds.
802
+ * @param ms An number from 0 to 999 that specifies the milliseconds.
803
+ */
804
+ UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
805
+ now(): number;
806
+ }
807
+
808
+ declare var Date: DateConstructor;
809
+
810
+ interface RegExpMatchArray extends Array<string> {
811
+ index?: number;
812
+ input?: string;
813
+ }
814
+
815
+ interface RegExpExecArray extends Array<string> {
816
+ index: number;
817
+ input: string;
818
+ }
819
+
820
+ interface RegExp {
821
+ /**
822
+ * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.
823
+ * @param string The String object or string literal on which to perform the search.
824
+ */
825
+ exec(string: string): RegExpExecArray;
826
+
827
+ /**
828
+ * Returns a Boolean value that indicates whether or not a pattern exists in a searched string.
829
+ * @param string String on which to perform the search.
830
+ */
831
+ test(string: string): boolean;
832
+
833
+ /** Returns a copy of the text of the regular expression pattern. Read-only. The rgExp argument is a Regular expression object. It can be a variable name or a literal. */
834
+ source: string;
835
+
836
+ /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */
837
+ global: boolean;
838
+
839
+ /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */
840
+ ignoreCase: boolean;
841
+
842
+ /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */
843
+ multiline: boolean;
844
+
845
+ lastIndex: number;
846
+
847
+ // Non-standard extensions
848
+ compile(): RegExp;
849
+ }
850
+
851
+ interface RegExpConstructor {
852
+ new (pattern: string, flags?: string): RegExp;
853
+ (pattern: string, flags?: string): RegExp;
854
+ prototype: RegExp;
855
+
856
+ // Non-standard extensions
857
+ $1: string;
858
+ $2: string;
859
+ $3: string;
860
+ $4: string;
861
+ $5: string;
862
+ $6: string;
863
+ $7: string;
864
+ $8: string;
865
+ $9: string;
866
+ lastMatch: string;
867
+ }
868
+
869
+ declare var RegExp: RegExpConstructor;
870
+
871
+ interface Error {
872
+ name: string;
873
+ message: string;
874
+ }
875
+
876
+ interface ErrorConstructor {
877
+ new (message?: string): Error;
878
+ (message?: string): Error;
879
+ prototype: Error;
880
+ }
881
+
882
+ declare var Error: ErrorConstructor;
883
+
884
+ interface EvalError extends Error {
885
+ }
886
+
887
+ interface EvalErrorConstructor {
888
+ new (message?: string): EvalError;
889
+ (message?: string): EvalError;
890
+ prototype: EvalError;
891
+ }
892
+
893
+ declare var EvalError: EvalErrorConstructor;
894
+
895
+ interface RangeError extends Error {
896
+ }
897
+
898
+ interface RangeErrorConstructor {
899
+ new (message?: string): RangeError;
900
+ (message?: string): RangeError;
901
+ prototype: RangeError;
902
+ }
903
+
904
+ declare var RangeError: RangeErrorConstructor;
905
+
906
+ interface ReferenceError extends Error {
907
+ }
908
+
909
+ interface ReferenceErrorConstructor {
910
+ new (message?: string): ReferenceError;
911
+ (message?: string): ReferenceError;
912
+ prototype: ReferenceError;
913
+ }
914
+
915
+ declare var ReferenceError: ReferenceErrorConstructor;
916
+
917
+ interface SyntaxError extends Error {
918
+ }
919
+
920
+ interface SyntaxErrorConstructor {
921
+ new (message?: string): SyntaxError;
922
+ (message?: string): SyntaxError;
923
+ prototype: SyntaxError;
924
+ }
925
+
926
+ declare var SyntaxError: SyntaxErrorConstructor;
927
+
928
+ interface TypeError extends Error {
929
+ }
930
+
931
+ interface TypeErrorConstructor {
932
+ new (message?: string): TypeError;
933
+ (message?: string): TypeError;
934
+ prototype: TypeError;
935
+ }
936
+
937
+ declare var TypeError: TypeErrorConstructor;
938
+
939
+ interface URIError extends Error {
940
+ }
941
+
942
+ interface URIErrorConstructor {
943
+ new (message?: string): URIError;
944
+ (message?: string): URIError;
945
+ prototype: URIError;
946
+ }
947
+
948
+ declare var URIError: URIErrorConstructor;
949
+
950
+ interface JSON {
951
+ /**
952
+ * Converts a JavaScript Object Notation (JSON) string into an object.
953
+ * @param text A valid JSON string.
954
+ * @param reviver A function that transforms the results. This function is called for each member of the object.
955
+ * If a member contains nested objects, the nested objects are transformed before the parent object is.
956
+ */
957
+ parse(text: string, reviver?: (key: any, value: any) => any): any;
958
+ /**
959
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
960
+ * @param value A JavaScript value, usually an object or array, to be converted.
961
+ */
962
+ stringify(value: any): string;
963
+ /**
964
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
965
+ * @param value A JavaScript value, usually an object or array, to be converted.
966
+ * @param replacer A function that transforms the results.
967
+ */
968
+ stringify(value: any, replacer: (key: string, value: any) => any): string;
969
+ /**
970
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
971
+ * @param value A JavaScript value, usually an object or array, to be converted.
972
+ * @param replacer Array that transforms the results.
973
+ */
974
+ stringify(value: any, replacer: any[]): string;
975
+ /**
976
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
977
+ * @param value A JavaScript value, usually an object or array, to be converted.
978
+ * @param replacer A function that transforms the results.
979
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
980
+ */
981
+ stringify(value: any, replacer: (key: string, value: any) => any, space: any): string;
982
+ /**
983
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
984
+ * @param value A JavaScript value, usually an object or array, to be converted.
985
+ * @param replacer Array that transforms the results.
986
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
987
+ */
988
+ stringify(value: any, replacer: any[], space: any): string;
989
+ }
990
+ /**
991
+ * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
992
+ */
993
+ declare var JSON: JSON;
994
+
995
+
996
+ /////////////////////////////
997
+ /// ECMAScript Array API (specially handled by compiler)
998
+ /////////////////////////////
999
+
1000
+ interface Array<T> {
1001
+ /**
1002
+ * Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.
1003
+ */
1004
+ length: number;
1005
+ /**
1006
+ * Returns a string representation of an array.
1007
+ */
1008
+ toString(): string;
1009
+ toLocaleString(): string;
1010
+ /**
1011
+ * Appends new elements to an array, and returns the new length of the array.
1012
+ * @param items New elements of the Array.
1013
+ */
1014
+ push(...items: T[]): number;
1015
+ /**
1016
+ * Removes the last element from an array and returns it.
1017
+ */
1018
+ pop(): T;
1019
+ /**
1020
+ * Combines two or more arrays.
1021
+ * @param items Additional items to add to the end of array1.
1022
+ */
1023
+ concat<U extends T[]>(...items: U[]): T[];
1024
+ /**
1025
+ * Combines two or more arrays.
1026
+ * @param items Additional items to add to the end of array1.
1027
+ */
1028
+ concat(...items: T[]): T[];
1029
+ /**
1030
+ * Adds all the elements of an array separated by the specified separator string.
1031
+ * @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.
1032
+ */
1033
+ join(separator?: string): string;
1034
+ /**
1035
+ * Reverses the elements in an Array.
1036
+ */
1037
+ reverse(): T[];
1038
+ /**
1039
+ * Removes the first element from an array and returns it.
1040
+ */
1041
+ shift(): T;
1042
+ /**
1043
+ * Returns a section of an array.
1044
+ * @param start The beginning of the specified portion of the array.
1045
+ * @param end The end of the specified portion of the array.
1046
+ */
1047
+ slice(start?: number, end?: number): T[];
1048
+
1049
+ /**
1050
+ * Sorts an array.
1051
+ * @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.
1052
+ */
1053
+ sort(compareFn?: (a: T, b: T) => number): T[];
1054
+
1055
+ /**
1056
+ * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
1057
+ * @param start The zero-based location in the array from which to start removing elements.
1058
+ */
1059
+ splice(start: number): T[];
1060
+
1061
+ /**
1062
+ * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
1063
+ * @param start The zero-based location in the array from which to start removing elements.
1064
+ * @param deleteCount The number of elements to remove.
1065
+ * @param items Elements to insert into the array in place of the deleted elements.
1066
+ */
1067
+ splice(start: number, deleteCount: number, ...items: T[]): T[];
1068
+
1069
+ /**
1070
+ * Inserts new elements at the start of an array.
1071
+ * @param items Elements to insert at the start of the Array.
1072
+ */
1073
+ unshift(...items: T[]): number;
1074
+
1075
+ /**
1076
+ * Returns the index of the first occurrence of a value in an array.
1077
+ * @param searchElement The value to locate in the array.
1078
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
1079
+ */
1080
+ indexOf(searchElement: T, fromIndex?: number): number;
1081
+
1082
+ /**
1083
+ * Returns the index of the last occurrence of a specified value in an array.
1084
+ * @param searchElement The value to locate in the array.
1085
+ * @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.
1086
+ */
1087
+ lastIndexOf(searchElement: T, fromIndex?: number): number;
1088
+
1089
+ /**
1090
+ * Determines whether all the members of an array satisfy the specified test.
1091
+ * @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.
1092
+ * @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.
1093
+ */
1094
+ every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;
1095
+
1096
+ /**
1097
+ * Determines whether the specified callback function returns true for any element of an array.
1098
+ * @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.
1099
+ * @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.
1100
+ */
1101
+ some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;
1102
+
1103
+ /**
1104
+ * Performs the specified action for each element in an array.
1105
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
1106
+ * @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.
1107
+ */
1108
+ forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void;
1109
+
1110
+ /**
1111
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
1112
+ * @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.
1113
+ * @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.
1114
+ */
1115
+ map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];
1116
+
1117
+ /**
1118
+ * Returns the elements of an array that meet the condition specified in a callback function.
1119
+ * @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.
1120
+ * @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.
1121
+ */
1122
+ filter(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): T[];
1123
+
1124
+ /**
1125
+ * 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.
1126
+ * @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.
1127
+ * @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.
1128
+ */
1129
+ reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
1130
+ /**
1131
+ * 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.
1132
+ * @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.
1133
+ * @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.
1134
+ */
1135
+ reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
1136
+
1137
+ /**
1138
+ * 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.
1139
+ * @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.
1140
+ * @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.
1141
+ */
1142
+ reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
1143
+ /**
1144
+ * 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.
1145
+ * @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.
1146
+ * @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.
1147
+ */
1148
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
1149
+
1150
+ [n: number]: T;
1151
+ }
1152
+
1153
+ interface ArrayConstructor {
1154
+ new (arrayLength?: number): any[];
1155
+ new <T>(arrayLength: number): T[];
1156
+ new <T>(...items: T[]): T[];
1157
+ (arrayLength?: number): any[];
1158
+ <T>(arrayLength: number): T[];
1159
+ <T>(...items: T[]): T[];
1160
+ isArray(arg: any): boolean;
1161
+ prototype: Array<any>;
1162
+ }
1163
+
1164
+ declare var Array: ArrayConstructor;
1165
+ declare type PropertyKey = string | number | Symbol;
1166
+
1167
+ interface Symbol {
1168
+ /** Returns a string representation of an object. */
1169
+ toString(): string;
1170
+
1171
+ /** Returns the primitive value of the specified object. */
1172
+ valueOf(): Object;
1173
+
1174
+ // [Symbol.toStringTag]: string;
1175
+ }
1176
+
1177
+ interface SymbolConstructor {
1178
+ /**
1179
+ * A reference to the prototype.
1180
+ */
1181
+ prototype: Symbol;
1182
+
1183
+ /**
1184
+ * Returns a new unique Symbol value.
1185
+ * @param description Description of the new Symbol object.
1186
+ */
1187
+ (description?: string|number): Symbol;
1188
+
1189
+ /**
1190
+ * Returns a Symbol object from the global symbol registry matching the given key if found.
1191
+ * Otherwise, returns a new symbol with this key.
1192
+ * @param key key to search for.
1193
+ */
1194
+ for(key: string): Symbol;
1195
+
1196
+ /**
1197
+ * Returns a key from the global symbol registry matching the given Symbol if found.
1198
+ * Otherwise, returns a undefined.
1199
+ * @param sym Symbol to find the key for.
1200
+ */
1201
+ keyFor(sym: Symbol): string;
1202
+
1203
+ // Well-known Symbols
1204
+
1205
+ /**
1206
+ * A method that determines if a constructor object recognizes an object as one of the
1207
+ * constructor’s instances. Called by the semantics of the instanceof operator.
1208
+ */
1209
+ hasInstance: Symbol;
1210
+
1211
+ /**
1212
+ * A Boolean value that if true indicates that an object should flatten to its array elements
1213
+ * by Array.prototype.concat.
1214
+ */
1215
+ isConcatSpreadable: Symbol;
1216
+
1217
+ /**
1218
+ * A Boolean value that if true indicates that an object may be used as a regular expression.
1219
+ */
1220
+ isRegExp: Symbol;
1221
+
1222
+ /**
1223
+ * A method that returns the default iterator for an object.Called by the semantics of the
1224
+ * for-of statement.
1225
+ */
1226
+ iterator: Symbol;
1227
+
1228
+ /**
1229
+ * A method that converts an object to a corresponding primitive value.Called by the ToPrimitive
1230
+ * abstract operation.
1231
+ */
1232
+ toPrimitive: Symbol;
1233
+
1234
+ /**
1235
+ * A String value that is used in the creation of the default string description of an object.
1236
+ * Called by the built- in method Object.prototype.toString.
1237
+ */
1238
+ toStringTag: Symbol;
1239
+
1240
+ /**
1241
+ * An Object whose own property names are property names that are excluded from the with
1242
+ * environment bindings of the associated objects.
1243
+ */
1244
+ unscopables: Symbol;
1245
+ }
1246
+ declare var Symbol: SymbolConstructor;
1247
+
1248
+ interface Object {
1249
+ /**
1250
+ * Determines whether an object has a property with the specified name.
1251
+ * @param v A property name.
1252
+ */
1253
+ hasOwnProperty(v: PropertyKey): boolean;
1254
+
1255
+ /**
1256
+ * Determines whether a specified property is enumerable.
1257
+ * @param v A property name.
1258
+ */
1259
+ propertyIsEnumerable(v: PropertyKey): boolean;
1260
+ }
1261
+
1262
+ interface ObjectConstructor {
1263
+ /**
1264
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
1265
+ * target object. Returns the target object.
1266
+ * @param target The target object to copy to.
1267
+ * @param sources One or more source objects to copy properties from.
1268
+ */
1269
+ assign(target: any, ...sources: any[]): any;
1270
+
1271
+ /**
1272
+ * Returns an array of all symbol properties found directly on object o.
1273
+ * @param o Object to retrieve the symbols from.
1274
+ */
1275
+ getOwnPropertySymbols(o: any): Symbol[];
1276
+
1277
+ /**
1278
+ * Returns true if the values are the same value, false otherwise.
1279
+ * @param value1 The first value.
1280
+ * @param value2 The second value.
1281
+ */
1282
+ is(value1: any, value2: any): boolean;
1283
+
1284
+ /**
1285
+ * Sets the prototype of a specified object o to object proto or null. Returns the object o.
1286
+ * @param o The object to change its prototype.
1287
+ * @param proto The value of the new prototype or null.
1288
+ */
1289
+ setPrototypeOf(o: any, proto: any): any;
1290
+
1291
+ /**
1292
+ * Gets the own property descriptor of the specified object.
1293
+ * An own property descriptor is one that is defined directly on the object and is not
1294
+ * inherited from the object's prototype.
1295
+ * @param o Object that contains the property.
1296
+ * @param p Name of the property.
1297
+ */
1298
+ getOwnPropertyDescriptor(o: any, propertyKey: PropertyKey): PropertyDescriptor;
1299
+
1300
+ /**
1301
+ * Adds a property to an object, or modifies attributes of an existing property.
1302
+ * @param o Object on which to add or modify the property. This can be a native JavaScript
1303
+ * object (that is, a user-defined object or a built in object) or a DOM object.
1304
+ * @param p The property name.
1305
+ * @param attributes Descriptor for the property. It can be for a data property or an accessor
1306
+ * property.
1307
+ */
1308
+ defineProperty(o: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): any;
1309
+ }
1310
+
1311
+ interface Function {
1312
+ /**
1313
+ * Returns a new function object that is identical to the argument object in all ways except
1314
+ * for its identity and the value of its HomeObject internal slot.
1315
+ */
1316
+ toMethod(newHome: Object): Function;
1317
+
1318
+ /**
1319
+ * Returns the name of the function. Function names are read-only and can not be changed.
1320
+ */
1321
+ name: string;
1322
+ }
1323
+
1324
+ interface NumberConstructor {
1325
+ /**
1326
+ * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1
1327
+ * that is representable as a Number value, which is approximately:
1328
+ * 2.2204460492503130808472633361816 x 10‍−‍16.
1329
+ */
1330
+ EPSILON: number;
1331
+
1332
+ /**
1333
+ * Returns true if passed value is finite.
1334
+ * Unlike the global isFininte, Number.isFinite doesn't forcibly convert the parameter to a
1335
+ * number. Only finite values of the type number, result in true.
1336
+ * @param number A numeric value.
1337
+ */
1338
+ isFinite(number: number): boolean;
1339
+
1340
+ /**
1341
+ * Returns true if the value passed is an integer, false otherwise.
1342
+ * @param number A numeric value.
1343
+ */
1344
+ isInteger(number: number): boolean;
1345
+
1346
+ /**
1347
+ * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
1348
+ * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter
1349
+ * to a number. Only values of the type number, that are also NaN, result in true.
1350
+ * @param number A numeric value.
1351
+ */
1352
+ isNaN(number: number): boolean;
1353
+
1354
+ /**
1355
+ * Returns true if the value passed is a safe integer.
1356
+ * @param number A numeric value.
1357
+ */
1358
+ isSafeInteger(number: number): boolean;
1359
+
1360
+ /**
1361
+ * The value of the largest integer n such that n and n + 1 are both exactly representable as
1362
+ * a Number value.
1363
+ * The value of Number.MIN_SAFE_INTEGER is 9007199254740991 2^53 − 1.
1364
+ */
1365
+ MAX_SAFE_INTEGER: number;
1366
+
1367
+ /**
1368
+ * The value of the smallest integer n such that n and n − 1 are both exactly representable as
1369
+ * a Number value.
1370
+ * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).
1371
+ */
1372
+ MIN_SAFE_INTEGER: number;
1373
+
1374
+ /**
1375
+ * Converts a string to a floating-point number.
1376
+ * @param string A string that contains a floating-point number.
1377
+ */
1378
+ parseFloat(string: string): number;
1379
+
1380
+ /**
1381
+ * Converts A string to an integer.
1382
+ * @param s A string to convert into a number.
1383
+ * @param radix A value between 2 and 36 that specifies the base of the number in numString.
1384
+ * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
1385
+ * All other strings are considered decimal.
1386
+ */
1387
+ parseInt(string: string, radix?: number): number;
1388
+ }
1389
+
1390
+ interface ArrayLike<T> {
1391
+ length: number;
1392
+ [n: number]: T;
1393
+ }
1394
+
1395
+ interface Array<T> {
1396
+ /** Iterator */
1397
+ // [Symbol.iterator] (): Iterator<T>;
1398
+
1399
+ /**
1400
+ * Returns an array of key, value pairs for every entry in the array
1401
+ */
1402
+ entries(): Iterator<[number, T]>;
1403
+
1404
+ /**
1405
+ * Returns an list of keys in the array
1406
+ */
1407
+ keys(): Iterator<number>;
1408
+
1409
+ /**
1410
+ * Returns an list of values in the array
1411
+ */
1412
+ values(): Iterator<T>;
1413
+
1414
+ /**
1415
+ * Returns the value of the first element in the array where predicate is true, and undefined
1416
+ * otherwise.
1417
+ * @param predicate find calls predicate once for each element of the array, in ascending
1418
+ * order, until it finds one where predicate returns true. If such an element is found, find
1419
+ * immediately returns that element value. Otherwise, find returns undefined.
1420
+ * @param thisArg If provided, it will be used as the this value for each invocation of
1421
+ * predicate. If it is not provided, undefined is used instead.
1422
+ */
1423
+ find(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): T;
1424
+
1425
+ /**
1426
+ * Returns the index of the first element in the array where predicate is true, and undefined
1427
+ * otherwise.
1428
+ * @param predicate find calls predicate once for each element of the array, in ascending
1429
+ * order, until it finds one where predicate returns true. If such an element is found, find
1430
+ * immediately returns that element value. Otherwise, find returns undefined.
1431
+ * @param thisArg If provided, it will be used as the this value for each invocation of
1432
+ * predicate. If it is not provided, undefined is used instead.
1433
+ */
1434
+ findIndex(predicate: (value: T) => boolean, thisArg?: any): number;
1435
+
1436
+ /**
1437
+ * Returns the this object after filling the section identified by start and end with value
1438
+ * @param value value to fill array section with
1439
+ * @param start index to start filling the array at. If start is negative, it is treated as
1440
+ * length+start where length is the length of the array.
1441
+ * @param end index to stop filling the array at. If end is negative, it is treated as
1442
+ * length+end.
1443
+ */
1444
+ fill(value: T, start?: number, end?: number): T[];
1445
+
1446
+ /**
1447
+ * Returns the this object after copying a section of the array identified by start and end
1448
+ * to the same array starting at position target
1449
+ * @param target If target is negative, it is treated as length+target where length is the
1450
+ * length of the array.
1451
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
1452
+ * is treated as length+end.
1453
+ * @param end If not specified, length of the this object is used as its default value.
1454
+ */
1455
+ copyWithin(target: number, start: number, end?: number): T[];
1456
+ }
1457
+
1458
+ interface ArrayConstructor {
1459
+ /**
1460
+ * Creates an array from an array-like object.
1461
+ * @param arrayLike An array-like object to convert to an array.
1462
+ * @param mapfn A mapping function to call on every element of the array.
1463
+ * @param thisArg Value of 'this' used to invoke the mapfn.
1464
+ */
1465
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): Array<U>;
1466
+
1467
+ /**
1468
+ * Creates an array from an iterable object.
1469
+ * @param iterable An iterable object to convert to an array.
1470
+ * @param mapfn A mapping function to call on every element of the array.
1471
+ * @param thisArg Value of 'this' used to invoke the mapfn.
1472
+ */
1473
+ from<T, U>(iterable: Iterable<T>, mapfn: (v: T, k: number) => U, thisArg?: any): Array<U>;
1474
+
1475
+ /**
1476
+ * Creates an array from an array-like object.
1477
+ * @param arrayLike An array-like object to convert to an array.
1478
+ */
1479
+ from<T>(arrayLike: ArrayLike<T>): Array<T>;
1480
+
1481
+ /**
1482
+ * Creates an array from an iterable object.
1483
+ * @param iterable An iterable object to convert to an array.
1484
+ */
1485
+ from<T>(iterable: Iterable<T>): Array<T>;
1486
+
1487
+ /**
1488
+ * Returns a new array from a set of elements.
1489
+ * @param items A set of elements to include in the new array object.
1490
+ */
1491
+ of<T>(...items: T[]): Array<T>;
1492
+ }
1493
+
1494
+ interface String {
1495
+ /** Iterator */
1496
+ // [Symbol.iterator] (): Iterator<string>;
1497
+
1498
+ /**
1499
+ * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
1500
+ * value of the UTF-16 encoded code point starting at the string element at position pos in
1501
+ * the String resulting from converting this object to a String.
1502
+ * If there is no element at that position, the result is undefined.
1503
+ * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
1504
+ */
1505
+ codePointAt(pos: number): number;
1506
+
1507
+ /**
1508
+ * Returns true if searchString appears as a substring of the result of converting this
1509
+ * object to a String, at one or more positions that are
1510
+ * greater than or equal to position; otherwise, returns false.
1511
+ * @param searchString search string
1512
+ * @param position If position is undefined, 0 is assumed, so as to search all of the String.
1513
+ */
1514
+ contains(searchString: string, position?: number): boolean;
1515
+
1516
+ /**
1517
+ * Returns true if the sequence of elements of searchString converted to a String is the
1518
+ * same as the corresponding elements of this object (converted to a String) starting at
1519
+ * endPosition – length(this). Otherwise returns false.
1520
+ */
1521
+ endsWith(searchString: string, endPosition?: number): boolean;
1522
+
1523
+ /**
1524
+ * Returns the String value result of normalizing the string into the normalization form
1525
+ * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
1526
+ * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
1527
+ * is "NFC"
1528
+ */
1529
+ normalize(form?: string): string;
1530
+
1531
+ /**
1532
+ * Returns a String value that is made from count copies appended together. If count is 0,
1533
+ * T is the empty String is returned.
1534
+ * @param count number of copies to append
1535
+ */
1536
+ repeat(count: number): string;
1537
+
1538
+ /**
1539
+ * Returns true if the sequence of elements of searchString converted to a String is the
1540
+ * same as the corresponding elements of this object (converted to a String) starting at
1541
+ * position. Otherwise returns false.
1542
+ */
1543
+ startsWith(searchString: string, position?: number): boolean;
1544
+
1545
+ /**
1546
+ * Returns an <a> HTML anchor element and sets the name attribute to the text value
1547
+ * @param name
1548
+ */
1549
+ anchor(name: string): string;
1550
+
1551
+ /** Returns a <big> HTML element */
1552
+ big(): string;
1553
+
1554
+ /** Returns a <blink> HTML element */
1555
+ blink(): string;
1556
+
1557
+ /** Returns a <b> HTML element */
1558
+ bold(): string;
1559
+
1560
+ /** Returns a <tt> HTML element */
1561
+ fixed(): string
1562
+
1563
+ /** Returns a <font> HTML element and sets the color attribute value */
1564
+ fontcolor(color: string): string
1565
+
1566
+ /** Returns a <font> HTML element and sets the size attribute value */
1567
+ fontsize(size: number): string;
1568
+
1569
+ /** Returns a <font> HTML element and sets the size attribute value */
1570
+ fontsize(size: string): string;
1571
+
1572
+ /** Returns an <i> HTML element */
1573
+ italics(): string;
1574
+
1575
+ /** Returns an <a> HTML element and sets the href attribute value */
1576
+ link(url: string): string;
1577
+
1578
+ /** Returns a <small> HTML element */
1579
+ small(): string;
1580
+
1581
+ /** Returns a <strike> HTML element */
1582
+ strike(): string;
1583
+
1584
+ /** Returns a <sub> HTML element */
1585
+ sub(): string;
1586
+
1587
+ /** Returns a <sup> HTML element */
1588
+ sup(): string;
1589
+ }
1590
+
1591
+ interface StringConstructor {
1592
+ /**
1593
+ * Return the String value whose elements are, in order, the elements in the List elements.
1594
+ * If length is 0, the empty string is returned.
1595
+ */
1596
+ fromCodePoint(...codePoints: number[]): string;
1597
+
1598
+ /**
1599
+ * String.raw is intended for use as a tag function of a Tagged Template String. When called
1600
+ * as such the first argument will be a well formed template call site object and the rest
1601
+ * parameter will contain the substitution values.
1602
+ * @param template A well-formed template string call site representation.
1603
+ * @param substitutions A set of substitution values.
1604
+ */
1605
+ raw(template: TemplateStringsArray, ...substitutions: any[]): string;
1606
+ }
1607
+
1608
+ interface IteratorResult<T> {
1609
+ done: boolean;
1610
+ value?: T;
1611
+ }
1612
+
1613
+ interface Iterator<T> {
1614
+ //[Symbol.iterator](): Iterator<T>;
1615
+ next(): IteratorResult<T>;
1616
+ }
1617
+
1618
+ interface Iterable<T> {
1619
+ //[Symbol.iterator](): Iterator<T>;
1620
+ }
1621
+
1622
+ interface GeneratorFunction extends Function {
1623
+
1624
+ }
1625
+
1626
+ interface GeneratorFunctionConstructor {
1627
+ /**
1628
+ * Creates a new Generator function.
1629
+ * @param args A list of arguments the function accepts.
1630
+ */
1631
+ new (...args: string[]): GeneratorFunction;
1632
+ (...args: string[]): GeneratorFunction;
1633
+ prototype: GeneratorFunction;
1634
+ }
1635
+ declare var GeneratorFunction: GeneratorFunctionConstructor;
1636
+
1637
+ interface Generator<T> extends Iterator<T> {
1638
+ next(value?: any): IteratorResult<T>;
1639
+ throw (exception: any): IteratorResult<T>;
1640
+ return (value: T): IteratorResult<T>;
1641
+ // [Symbol.toStringTag]: string;
1642
+ }
1643
+
1644
+ interface Math {
1645
+ /**
1646
+ * Returns the number of leading zero bits in the 32-bit binary representation of a number.
1647
+ * @param x A numeric expression.
1648
+ */
1649
+ clz32(x: number): number;
1650
+
1651
+ /**
1652
+ * Returns the result of 32-bit multiplication of two numbers.
1653
+ * @param x First number
1654
+ * @param y Second number
1655
+ */
1656
+ imul(x: number, y: number): number;
1657
+
1658
+ /**
1659
+ * Returns the sign of the x, indicating whether x is positive, negative or zero.
1660
+ * @param x The numeric expression to test
1661
+ */
1662
+ sign(x: number): number;
1663
+
1664
+ /**
1665
+ * Returns the base 10 logarithm of a number.
1666
+ * @param x A numeric expression.
1667
+ */
1668
+ log10(x: number): number;
1669
+
1670
+ /**
1671
+ * Returns the base 2 logarithm of a number.
1672
+ * @param x A numeric expression.
1673
+ */
1674
+ log2(x: number): number;
1675
+
1676
+ /**
1677
+ * Returns the natural logarithm of 1 + x.
1678
+ * @param x A numeric expression.
1679
+ */
1680
+ log1p(x: number): number;
1681
+
1682
+ /**
1683
+ * Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of
1684
+ * the natural logarithms).
1685
+ * @param x A numeric expression.
1686
+ */
1687
+ expm1(x: number): number;
1688
+
1689
+ /**
1690
+ * Returns the hyperbolic cosine of a number.
1691
+ * @param x A numeric expression that contains an angle measured in radians.
1692
+ */
1693
+ cosh(x: number): number;
1694
+
1695
+ /**
1696
+ * Returns the hyperbolic sine of a number.
1697
+ * @param x A numeric expression that contains an angle measured in radians.
1698
+ */
1699
+ sinh(x: number): number;
1700
+
1701
+ /**
1702
+ * Returns the hyperbolic tangent of a number.
1703
+ * @param x A numeric expression that contains an angle measured in radians.
1704
+ */
1705
+ tanh(x: number): number;
1706
+
1707
+ /**
1708
+ * Returns the inverse hyperbolic cosine of a number.
1709
+ * @param x A numeric expression that contains an angle measured in radians.
1710
+ */
1711
+ acosh(x: number): number;
1712
+
1713
+ /**
1714
+ * Returns the inverse hyperbolic sine of a number.
1715
+ * @param x A numeric expression that contains an angle measured in radians.
1716
+ */
1717
+ asinh(x: number): number;
1718
+
1719
+ /**
1720
+ * Returns the inverse hyperbolic tangent of a number.
1721
+ * @param x A numeric expression that contains an angle measured in radians.
1722
+ */
1723
+ atanh(x: number): number;
1724
+
1725
+ /**
1726
+ * Returns the square root of the sum of squares of its arguments.
1727
+ * @param values Values to compute the square root for.
1728
+ * If no arguments are passed, the result is +0.
1729
+ * If there is only one argument, the result is the absolute value.
1730
+ * If any argument is +Infinity or -Infinity, the result is +Infinity.
1731
+ * If any argument is NaN, the result is NaN.
1732
+ * If all arguments are either +0 or −0, the result is +0.
1733
+ */
1734
+ hypot(...values: number[] ): number;
1735
+
1736
+ /**
1737
+ * Returns the integral part of the a numeric expression, x, removing any fractional digits.
1738
+ * If x is already an integer, the result is x.
1739
+ * @param x A numeric expression.
1740
+ */
1741
+ trunc(x: number): number;
1742
+
1743
+ /**
1744
+ * Returns the nearest single precision float representation of a number.
1745
+ * @param x A numeric expression.
1746
+ */
1747
+ fround(x: number): number;
1748
+
1749
+ /**
1750
+ * Returns an implementation-dependent approximation to the cube root of number.
1751
+ * @param x A numeric expression.
1752
+ */
1753
+ cbrt(x: number): number;
1754
+
1755
+ // [Symbol.toStringTag]: string;
1756
+ }
1757
+
1758
+ interface RegExp {
1759
+ // [Symbol.isRegExp]: boolean;
1760
+
1761
+ /**
1762
+ * Matches a string with a regular expression, and returns an array containing the results of
1763
+ * that search.
1764
+ * @param string A string to search within.
1765
+ */
1766
+ match(string: string): string[];
1767
+
1768
+ /**
1769
+ * Replaces text in a string, using a regular expression.
1770
+ * @param searchValue A String object or string literal that represents the regular expression
1771
+ * @param replaceValue A String object or string literal containing the text to replace for every
1772
+ * successful match of rgExp in stringObj.
1773
+ */
1774
+ replace(string: string, replaceValue: string): string;
1775
+
1776
+ search(string: string): number;
1777
+
1778
+ /**
1779
+ * Returns an Array object into which substrings of the result of converting string to a String
1780
+ * have been stored. The substrings are determined by searching from left to right for matches
1781
+ * of the this value regular expression; these occurrences are not part of any substring in the
1782
+ * returned array, but serve to divide up the String value.
1783
+ *
1784
+ * If the regular expression that contains capturing parentheses, then each time separator is
1785
+ * matched the results (including any undefined results) of the capturing parentheses are spliced.
1786
+ * @param string string value to split
1787
+ * @param limit if not undefined, the output array is truncated so that it contains no more
1788
+ * than limit elements.
1789
+ */
1790
+ split(string: string, limit?: number): string[];
1791
+
1792
+ /**
1793
+ * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular
1794
+ * expression. Default is false. Read-only.
1795
+ */
1796
+ sticky: boolean;
1797
+
1798
+ /**
1799
+ * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular
1800
+ * expression. Default is false. Read-only.
1801
+ */
1802
+ unicode: boolean;
1803
+ }
1804
+
1805
+ interface Map<K, V> {
1806
+ clear(): void;
1807
+ delete(key: K): boolean;
1808
+ entries(): Iterator<[K, V]>;
1809
+ forEach(callbackfn: (value: V, index: K, map: Map<K, V>) => void, thisArg?: any): void;
1810
+ get(key: K): V;
1811
+ has(key: K): boolean;
1812
+ keys(): Iterator<K>;
1813
+ set(key: K, value?: V): Map<K, V>;
1814
+ size: number;
1815
+ values(): Iterator<V>;
1816
+ // [Symbol.iterator]():Iterator<[K,V]>;
1817
+ // [Symbol.toStringTag]: string;
1818
+ }
1819
+
1820
+ interface MapConstructor {
1821
+ new <K, V>(): Map<K, V>;
1822
+ new <K, V>(iterable: Iterable<[K, V]>): Map<K, V>;
1823
+ prototype: Map<any, any>;
1824
+ }
1825
+ declare var Map: MapConstructor;
1826
+
1827
+ interface WeakMap<K, V> {
1828
+ clear(): void;
1829
+ delete(key: K): boolean;
1830
+ get(key: K): V;
1831
+ has(key: K): boolean;
1832
+ set(key: K, value?: V): WeakMap<K, V>;
1833
+ // [Symbol.toStringTag]: string;
1834
+ }
1835
+
1836
+ interface WeakMapConstructor {
1837
+ new <K, V>(): WeakMap<K, V>;
1838
+ new <K, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
1839
+ prototype: WeakMap<any, any>;
1840
+ }
1841
+ declare var WeakMap: WeakMapConstructor;
1842
+
1843
+ interface Set<T> {
1844
+ add(value: T): Set<T>;
1845
+ clear(): void;
1846
+ delete(value: T): boolean;
1847
+ entries(): Iterator<[T, T]>;
1848
+ forEach(callbackfn: (value: T, index: T, set: Set<T>) => void, thisArg?: any): void;
1849
+ has(value: T): boolean;
1850
+ keys(): Iterator<T>;
1851
+ size: number;
1852
+ values(): Iterator<T>;
1853
+ // [Symbol.iterator]():Iterator<T>;
1854
+ // [Symbol.toStringTag]: string;
1855
+ }
1856
+
1857
+ interface SetConstructor {
1858
+ new <T>(): Set<T>;
1859
+ new <T>(iterable: Iterable<T>): Set<T>;
1860
+ prototype: Set<any>;
1861
+ }
1862
+ declare var Set: SetConstructor;
1863
+
1864
+ interface WeakSet<T> {
1865
+ add(value: T): WeakSet<T>;
1866
+ clear(): void;
1867
+ delete(value: T): boolean;
1868
+ has(value: T): boolean;
1869
+ // [Symbol.toStringTag]: string;
1870
+ }
1871
+
1872
+ interface WeakSetConstructor {
1873
+ new <T>(): WeakSet<T>;
1874
+ new <T>(iterable: Iterable<T>): WeakSet<T>;
1875
+ prototype: WeakSet<any>;
1876
+ }
1877
+ declare var WeakSet: WeakSetConstructor;
1878
+
1879
+ interface JSON {
1880
+ // [Symbol.toStringTag]: string;
1881
+ }
1882
+
1883
+ /**
1884
+ * Represents a raw buffer of binary data, which is used to store data for the
1885
+ * different typed arrays. ArrayBuffers cannot be read from or written to directly,
1886
+ * but can be passed to a typed array or DataView Object to interpret the raw
1887
+ * buffer as needed.
1888
+ */
1889
+ interface ArrayBuffer {
1890
+ /**
1891
+ * Read-only. The length of the ArrayBuffer (in bytes).
1892
+ */
1893
+ byteLength: number;
1894
+
1895
+ /**
1896
+ * Returns a section of an ArrayBuffer.
1897
+ */
1898
+ slice(begin: number, end?: number): ArrayBuffer;
1899
+
1900
+ // [Symbol.toStringTag]: string;
1901
+ }
1902
+
1903
+ interface ArrayBufferConstructor {
1904
+ prototype: ArrayBuffer;
1905
+ new (byteLength: number): ArrayBuffer;
1906
+ isView(arg: any): boolean;
1907
+ }
1908
+ declare var ArrayBuffer: ArrayBufferConstructor;
1909
+
1910
+ interface DataView {
1911
+ buffer: ArrayBuffer;
1912
+ byteLength: number;
1913
+ byteOffset: number;
1914
+ /**
1915
+ * Gets the Float32 value at the specified byte offset from the start of the view. There is
1916
+ * no alignment constraint; multi-byte values may be fetched from any offset.
1917
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
1918
+ */
1919
+ getFloat32(byteOffset: number, littleEndian: boolean): number;
1920
+
1921
+ /**
1922
+ * Gets the Float64 value at the specified byte offset from the start of the view. There is
1923
+ * no alignment constraint; multi-byte values may be fetched from any offset.
1924
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
1925
+ */
1926
+ getFloat64(byteOffset: number, littleEndian: boolean): number;
1927
+
1928
+ /**
1929
+ * Gets the Int8 value at the specified byte offset from the start of the view. There is
1930
+ * no alignment constraint; multi-byte values may be fetched from any offset.
1931
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
1932
+ */
1933
+ getInt8(byteOffset: number): number;
1934
+
1935
+ /**
1936
+ * Gets the Int16 value at the specified byte offset from the start of the view. There is
1937
+ * no alignment constraint; multi-byte values may be fetched from any offset.
1938
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
1939
+ */
1940
+ getInt16(byteOffset: number, littleEndian: boolean): number;
1941
+ /**
1942
+ * Gets the Int32 value at the specified byte offset from the start of the view. There is
1943
+ * no alignment constraint; multi-byte values may be fetched from any offset.
1944
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
1945
+ */
1946
+ getInt32(byteOffset: number, littleEndian: boolean): number;
1947
+
1948
+ /**
1949
+ * Gets the Uint8 value at the specified byte offset from the start of the view. There is
1950
+ * no alignment constraint; multi-byte values may be fetched from any offset.
1951
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
1952
+ */
1953
+ getUint8(byteOffset: number): number;
1954
+
1955
+ /**
1956
+ * Gets the Uint16 value at the specified byte offset from the start of the view. There is
1957
+ * no alignment constraint; multi-byte values may be fetched from any offset.
1958
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
1959
+ */
1960
+ getUint16(byteOffset: number, littleEndian: boolean): number;
1961
+
1962
+ /**
1963
+ * Gets the Uint32 value at the specified byte offset from the start of the view. There is
1964
+ * no alignment constraint; multi-byte values may be fetched from any offset.
1965
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
1966
+ */
1967
+ getUint32(byteOffset: number, littleEndian: boolean): number;
1968
+
1969
+ /**
1970
+ * Stores an Float32 value at the specified byte offset from the start of the view.
1971
+ * @param byteOffset The place in the buffer at which the value should be set.
1972
+ * @param value The value to set.
1973
+ * @param littleEndian If false or undefined, a big-endian value should be written,
1974
+ * otherwise a little-endian value should be written.
1975
+ */
1976
+ setFloat32(byteOffset: number, value: number, littleEndian: boolean): void;
1977
+
1978
+ /**
1979
+ * Stores an Float64 value at the specified byte offset from the start of the view.
1980
+ * @param byteOffset The place in the buffer at which the value should be set.
1981
+ * @param value The value to set.
1982
+ * @param littleEndian If false or undefined, a big-endian value should be written,
1983
+ * otherwise a little-endian value should be written.
1984
+ */
1985
+ setFloat64(byteOffset: number, value: number, littleEndian: boolean): void;
1986
+
1987
+ /**
1988
+ * Stores an Int8 value at the specified byte offset from the start of the view.
1989
+ * @param byteOffset The place in the buffer at which the value should be set.
1990
+ * @param value The value to set.
1991
+ */
1992
+ setInt8(byteOffset: number, value: number): void;
1993
+
1994
+ /**
1995
+ * Stores an Int16 value at the specified byte offset from the start of the view.
1996
+ * @param byteOffset The place in the buffer at which the value should be set.
1997
+ * @param value The value to set.
1998
+ * @param littleEndian If false or undefined, a big-endian value should be written,
1999
+ * otherwise a little-endian value should be written.
2000
+ */
2001
+ setInt16(byteOffset: number, value: number, littleEndian: boolean): void;
2002
+
2003
+ /**
2004
+ * Stores an Int32 value at the specified byte offset from the start of the view.
2005
+ * @param byteOffset The place in the buffer at which the value should be set.
2006
+ * @param value The value to set.
2007
+ * @param littleEndian If false or undefined, a big-endian value should be written,
2008
+ * otherwise a little-endian value should be written.
2009
+ */
2010
+ setInt32(byteOffset: number, value: number, littleEndian: boolean): void;
2011
+
2012
+ /**
2013
+ * Stores an Uint8 value at the specified byte offset from the start of the view.
2014
+ * @param byteOffset The place in the buffer at which the value should be set.
2015
+ * @param value The value to set.
2016
+ */
2017
+ setUint8(byteOffset: number, value: number): void;
2018
+
2019
+ /**
2020
+ * Stores an Uint16 value at the specified byte offset from the start of the view.
2021
+ * @param byteOffset The place in the buffer at which the value should be set.
2022
+ * @param value The value to set.
2023
+ * @param littleEndian If false or undefined, a big-endian value should be written,
2024
+ * otherwise a little-endian value should be written.
2025
+ */
2026
+ setUint16(byteOffset: number, value: number, littleEndian: boolean): void;
2027
+
2028
+ /**
2029
+ * Stores an Uint32 value at the specified byte offset from the start of the view.
2030
+ * @param byteOffset The place in the buffer at which the value should be set.
2031
+ * @param value The value to set.
2032
+ * @param littleEndian If false or undefined, a big-endian value should be written,
2033
+ * otherwise a little-endian value should be written.
2034
+ */
2035
+ setUint32(byteOffset: number, value: number, littleEndian: boolean): void;
2036
+
2037
+ // [Symbol.toStringTag]: string;
2038
+ }
2039
+
2040
+ interface DataViewConstructor {
2041
+ new (buffer: ArrayBuffer, byteOffset?: number, byteLength?: number): DataView;
2042
+ }
2043
+ declare var DataView: DataViewConstructor;
2044
+
2045
+ /**
2046
+ * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
2047
+ * number of bytes could not be allocated an exception is raised.
2048
+ */
2049
+ interface Int8Array {
2050
+ /**
2051
+ * The size in bytes of each element in the array.
2052
+ */
2053
+ BYTES_PER_ELEMENT: number;
2054
+
2055
+ /**
2056
+ * The ArrayBuffer instance referenced by the array.
2057
+ */
2058
+ buffer: ArrayBuffer;
2059
+
2060
+ /**
2061
+ * The length in bytes of the array.
2062
+ */
2063
+ byteLength: number;
2064
+
2065
+ /**
2066
+ * The offset in bytes of the array.
2067
+ */
2068
+ byteOffset: number;
2069
+
2070
+ /**
2071
+ * Returns the this object after copying a section of the array identified by start and end
2072
+ * to the same array starting at position target
2073
+ * @param target If target is negative, it is treated as length+target where length is the
2074
+ * length of the array.
2075
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
2076
+ * is treated as length+end.
2077
+ * @param end If not specified, length of the this object is used as its default value.
2078
+ */
2079
+ copyWithin(target: number, start: number, end?: number): Int8Array;
2080
+
2081
+ /**
2082
+ * Returns an array of key, value pairs for every entry in the array
2083
+ */
2084
+ entries(): Iterator<[number, number]>;
2085
+
2086
+ /**
2087
+ * Determines whether all the members of an array satisfy the specified test.
2088
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
2089
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
2090
+ * or until the end of the array.
2091
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2092
+ * If thisArg is omitted, undefined is used as the this value.
2093
+ */
2094
+ every(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean;
2095
+
2096
+ /**
2097
+ * Returns the this object after filling the section identified by start and end with value
2098
+ * @param value value to fill array section with
2099
+ * @param start index to start filling the array at. If start is negative, it is treated as
2100
+ * length+start where length is the length of the array.
2101
+ * @param end index to stop filling the array at. If end is negative, it is treated as
2102
+ * length+end.
2103
+ */
2104
+ fill(value: number, start?: number, end?: number): Int8Array;
2105
+
2106
+ /**
2107
+ * Returns the elements of an array that meet the condition specified in a callback function.
2108
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
2109
+ * the callbackfn function one time for each element in the array.
2110
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2111
+ * If thisArg is omitted, undefined is used as the this value.
2112
+ */
2113
+ filter(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): Int8Array;
2114
+
2115
+ /**
2116
+ * Returns the value of the first element in the array where predicate is true, and undefined
2117
+ * otherwise.
2118
+ * @param predicate find calls predicate once for each element of the array, in ascending
2119
+ * order, until it finds one where predicate returns true. If such an element is found, find
2120
+ * immediately returns that element value. Otherwise, find returns undefined.
2121
+ * @param thisArg If provided, it will be used as the this value for each invocation of
2122
+ * predicate. If it is not provided, undefined is used instead.
2123
+ */
2124
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
2125
+
2126
+ /**
2127
+ * Returns the index of the first element in the array where predicate is true, and undefined
2128
+ * otherwise.
2129
+ * @param predicate find calls predicate once for each element of the array, in ascending
2130
+ * order, until it finds one where predicate returns true. If such an element is found, find
2131
+ * immediately returns that element value. Otherwise, find returns undefined.
2132
+ * @param thisArg If provided, it will be used as the this value for each invocation of
2133
+ * predicate. If it is not provided, undefined is used instead.
2134
+ */
2135
+ findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
2136
+
2137
+ /**
2138
+ * Performs the specified action for each element in an array.
2139
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
2140
+ * callbackfn function one time for each element in the array.
2141
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2142
+ * If thisArg is omitted, undefined is used as the this value.
2143
+ */
2144
+ forEach(callbackfn: (value: number, index: number, array: Int8Array) => void, thisArg?: any): void;
2145
+
2146
+ /**
2147
+ * Returns the index of the first occurrence of a value in an array.
2148
+ * @param searchElement The value to locate in the array.
2149
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
2150
+ * search starts at index 0.
2151
+ */
2152
+ indexOf(searchElement: number, fromIndex?: number): number;
2153
+
2154
+ /**
2155
+ * Adds all the elements of an array separated by the specified separator string.
2156
+ * @param separator A string used to separate one element of an array from the next in the
2157
+ * resulting String. If omitted, the array elements are separated with a comma.
2158
+ */
2159
+ join(separator?: string): string;
2160
+
2161
+ /**
2162
+ * Returns an list of keys in the array
2163
+ */
2164
+ keys(): Iterator<number>;
2165
+
2166
+ /**
2167
+ * Returns the index of the last occurrence of a value in an array.
2168
+ * @param searchElement The value to locate in the array.
2169
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
2170
+ * search starts at index 0.
2171
+ */
2172
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
2173
+
2174
+ /**
2175
+ * The length of the array.
2176
+ */
2177
+ length: number;
2178
+
2179
+ /**
2180
+ * Calls a defined callback function on each element of an array, and returns an array that
2181
+ * contains the results.
2182
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
2183
+ * callbackfn function one time for each element in the array.
2184
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2185
+ * If thisArg is omitted, undefined is used as the this value.
2186
+ */
2187
+ map(callbackfn: (value: number, index: number, array: Int8Array) => number, thisArg?: any): Int8Array;
2188
+
2189
+ /**
2190
+ * Calls the specified callback function for all the elements in an array. The return value of
2191
+ * the callback function is the accumulated result, and is provided as an argument in the next
2192
+ * call to the callback function.
2193
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
2194
+ * callbackfn function one time for each element in the array.
2195
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
2196
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
2197
+ * instead of an array value.
2198
+ */
2199
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;
2200
+
2201
+ /**
2202
+ * Calls the specified callback function for all the elements in an array. The return value of
2203
+ * the callback function is the accumulated result, and is provided as an argument in the next
2204
+ * call to the callback function.
2205
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
2206
+ * callbackfn function one time for each element in the array.
2207
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
2208
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
2209
+ * instead of an array value.
2210
+ */
2211
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
2212
+
2213
+ /**
2214
+ * Calls the specified callback function for all the elements in an array, in descending order.
2215
+ * The return value of the callback function is the accumulated result, and is provided as an
2216
+ * argument in the next call to the callback function.
2217
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
2218
+ * the callbackfn function one time for each element in the array.
2219
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
2220
+ * the accumulation. The first call to the callbackfn function provides this value as an
2221
+ * argument instead of an array value.
2222
+ */
2223
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;
2224
+
2225
+ /**
2226
+ * Calls the specified callback function for all the elements in an array, in descending order.
2227
+ * The return value of the callback function is the accumulated result, and is provided as an
2228
+ * argument in the next call to the callback function.
2229
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
2230
+ * the callbackfn function one time for each element in the array.
2231
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
2232
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
2233
+ * instead of an array value.
2234
+ */
2235
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
2236
+
2237
+ /**
2238
+ * Reverses the elements in an Array.
2239
+ */
2240
+ reverse(): Int8Array;
2241
+
2242
+ /**
2243
+ * Sets a value or an array of values.
2244
+ * @param index The index of the location to set.
2245
+ * @param value The value to set.
2246
+ */
2247
+ set(index: number, value: number): void;
2248
+
2249
+ /**
2250
+ * Sets a value or an array of values.
2251
+ * @param array A typed or untyped array of values to set.
2252
+ * @param offset The index in the current array at which the values are to be written.
2253
+ */
2254
+ set(array: Int8Array, offset?: number): void;
2255
+
2256
+ /**
2257
+ * Returns a section of an array.
2258
+ * @param start The beginning of the specified portion of the array.
2259
+ * @param end The end of the specified portion of the array.
2260
+ */
2261
+ slice(start?: number, end?: number): Int8Array;
2262
+
2263
+ /**
2264
+ * Determines whether the specified callback function returns true for any element of an array.
2265
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
2266
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
2267
+ * the end of the array.
2268
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2269
+ * If thisArg is omitted, undefined is used as the this value.
2270
+ */
2271
+ some(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean;
2272
+
2273
+ /**
2274
+ * Sorts an array.
2275
+ * @param compareFn The name of the function used to determine the order of the elements. If
2276
+ * omitted, the elements are sorted in ascending, ASCII character order.
2277
+ */
2278
+ sort(compareFn?: (a: number, b: number) => number): Int8Array;
2279
+
2280
+ /**
2281
+ * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements
2282
+ * at begin, inclusive, up to end, exclusive.
2283
+ * @param begin The index of the beginning of the array.
2284
+ * @param end The index of the end of the array.
2285
+ */
2286
+ subarray(begin: number, end?: number): Int8Array;
2287
+
2288
+ /**
2289
+ * Converts a number to a string by using the current locale.
2290
+ */
2291
+ toLocaleString(): string;
2292
+
2293
+ /**
2294
+ * Returns a string representation of an array.
2295
+ */
2296
+ toString(): string;
2297
+
2298
+ /**
2299
+ * Returns an list of values in the array
2300
+ */
2301
+ values(): Iterator<number>;
2302
+
2303
+ [index: number]: number;
2304
+ // [Symbol.iterator] (): Iterator<number>;
2305
+ }
2306
+
2307
+ interface Int8ArrayConstructor {
2308
+ prototype: Int8Array;
2309
+ new (length: number): Int8Array;
2310
+ new (array: Int8Array): Int8Array;
2311
+ new (array: number[]): Int8Array;
2312
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array;
2313
+
2314
+ /**
2315
+ * The size in bytes of each element in the array.
2316
+ */
2317
+ BYTES_PER_ELEMENT: number;
2318
+
2319
+ /**
2320
+ * Returns a new array from a set of elements.
2321
+ * @param items A set of elements to include in the new array object.
2322
+ */
2323
+ of(...items: number[]): Int8Array;
2324
+
2325
+ /**
2326
+ * Creates an array from an array-like or iterable object.
2327
+ * @param arrayLike An array-like or iterable object to convert to an array.
2328
+ * @param mapfn A mapping function to call on every element of the array.
2329
+ * @param thisArg Value of 'this' used to invoke the mapfn.
2330
+ */
2331
+ from(arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array;
2332
+ }
2333
+ declare var Int8Array: Int8ArrayConstructor;
2334
+
2335
+ /**
2336
+ * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
2337
+ * requested number of bytes could not be allocated an exception is raised.
2338
+ */
2339
+ interface Uint8Array {
2340
+ /**
2341
+ * The size in bytes of each element in the array.
2342
+ */
2343
+ BYTES_PER_ELEMENT: number;
2344
+
2345
+ /**
2346
+ * The ArrayBuffer instance referenced by the array.
2347
+ */
2348
+ buffer: ArrayBuffer;
2349
+
2350
+ /**
2351
+ * The length in bytes of the array.
2352
+ */
2353
+ byteLength: number;
2354
+
2355
+ /**
2356
+ * The offset in bytes of the array.
2357
+ */
2358
+ byteOffset: number;
2359
+
2360
+ /**
2361
+ * Returns the this object after copying a section of the array identified by start and end
2362
+ * to the same array starting at position target
2363
+ * @param target If target is negative, it is treated as length+target where length is the
2364
+ * length of the array.
2365
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
2366
+ * is treated as length+end.
2367
+ * @param end If not specified, length of the this object is used as its default value.
2368
+ */
2369
+ copyWithin(target: number, start: number, end?: number): Uint8Array;
2370
+
2371
+ /**
2372
+ * Returns an array of key, value pairs for every entry in the array
2373
+ */
2374
+ entries(): Iterator<[number, number]>;
2375
+
2376
+ /**
2377
+ * Determines whether all the members of an array satisfy the specified test.
2378
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
2379
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
2380
+ * or until the end of the array.
2381
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2382
+ * If thisArg is omitted, undefined is used as the this value.
2383
+ */
2384
+ every(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean;
2385
+
2386
+ /**
2387
+ * Returns the this object after filling the section identified by start and end with value
2388
+ * @param value value to fill array section with
2389
+ * @param start index to start filling the array at. If start is negative, it is treated as
2390
+ * length+start where length is the length of the array.
2391
+ * @param end index to stop filling the array at. If end is negative, it is treated as
2392
+ * length+end.
2393
+ */
2394
+ fill(value: number, start?: number, end?: number): Uint8Array;
2395
+
2396
+ /**
2397
+ * Returns the elements of an array that meet the condition specified in a callback function.
2398
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
2399
+ * the callbackfn function one time for each element in the array.
2400
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2401
+ * If thisArg is omitted, undefined is used as the this value.
2402
+ */
2403
+ filter(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): Uint8Array;
2404
+
2405
+ /**
2406
+ * Returns the value of the first element in the array where predicate is true, and undefined
2407
+ * otherwise.
2408
+ * @param predicate find calls predicate once for each element of the array, in ascending
2409
+ * order, until it finds one where predicate returns true. If such an element is found, find
2410
+ * immediately returns that element value. Otherwise, find returns undefined.
2411
+ * @param thisArg If provided, it will be used as the this value for each invocation of
2412
+ * predicate. If it is not provided, undefined is used instead.
2413
+ */
2414
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
2415
+
2416
+ /**
2417
+ * Returns the index of the first element in the array where predicate is true, and undefined
2418
+ * otherwise.
2419
+ * @param predicate find calls predicate once for each element of the array, in ascending
2420
+ * order, until it finds one where predicate returns true. If such an element is found, find
2421
+ * immediately returns that element value. Otherwise, find returns undefined.
2422
+ * @param thisArg If provided, it will be used as the this value for each invocation of
2423
+ * predicate. If it is not provided, undefined is used instead.
2424
+ */
2425
+ findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
2426
+
2427
+ /**
2428
+ * Performs the specified action for each element in an array.
2429
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
2430
+ * callbackfn function one time for each element in the array.
2431
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2432
+ * If thisArg is omitted, undefined is used as the this value.
2433
+ */
2434
+ forEach(callbackfn: (value: number, index: number, array: Uint8Array) => void, thisArg?: any): void;
2435
+
2436
+ /**
2437
+ * Returns the index of the first occurrence of a value in an array.
2438
+ * @param searchElement The value to locate in the array.
2439
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
2440
+ * search starts at index 0.
2441
+ */
2442
+ indexOf(searchElement: number, fromIndex?: number): number;
2443
+
2444
+ /**
2445
+ * Adds all the elements of an array separated by the specified separator string.
2446
+ * @param separator A string used to separate one element of an array from the next in the
2447
+ * resulting String. If omitted, the array elements are separated with a comma.
2448
+ */
2449
+ join(separator?: string): string;
2450
+
2451
+ /**
2452
+ * Returns an list of keys in the array
2453
+ */
2454
+ keys(): Iterator<number>;
2455
+
2456
+ /**
2457
+ * Returns the index of the last occurrence of a value in an array.
2458
+ * @param searchElement The value to locate in the array.
2459
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
2460
+ * search starts at index 0.
2461
+ */
2462
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
2463
+
2464
+ /**
2465
+ * The length of the array.
2466
+ */
2467
+ length: number;
2468
+
2469
+ /**
2470
+ * Calls a defined callback function on each element of an array, and returns an array that
2471
+ * contains the results.
2472
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
2473
+ * callbackfn function one time for each element in the array.
2474
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2475
+ * If thisArg is omitted, undefined is used as the this value.
2476
+ */
2477
+ map(callbackfn: (value: number, index: number, array: Uint8Array) => number, thisArg?: any): Uint8Array;
2478
+
2479
+ /**
2480
+ * Calls the specified callback function for all the elements in an array. The return value of
2481
+ * the callback function is the accumulated result, and is provided as an argument in the next
2482
+ * call to the callback function.
2483
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
2484
+ * callbackfn function one time for each element in the array.
2485
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
2486
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
2487
+ * instead of an array value.
2488
+ */
2489
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;
2490
+
2491
+ /**
2492
+ * Calls the specified callback function for all the elements in an array. The return value of
2493
+ * the callback function is the accumulated result, and is provided as an argument in the next
2494
+ * call to the callback function.
2495
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
2496
+ * callbackfn function one time for each element in the array.
2497
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
2498
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
2499
+ * instead of an array value.
2500
+ */
2501
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
2502
+
2503
+ /**
2504
+ * Calls the specified callback function for all the elements in an array, in descending order.
2505
+ * The return value of the callback function is the accumulated result, and is provided as an
2506
+ * argument in the next call to the callback function.
2507
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
2508
+ * the callbackfn function one time for each element in the array.
2509
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
2510
+ * the accumulation. The first call to the callbackfn function provides this value as an
2511
+ * argument instead of an array value.
2512
+ */
2513
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;
2514
+
2515
+ /**
2516
+ * Calls the specified callback function for all the elements in an array, in descending order.
2517
+ * The return value of the callback function is the accumulated result, and is provided as an
2518
+ * argument in the next call to the callback function.
2519
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
2520
+ * the callbackfn function one time for each element in the array.
2521
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
2522
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
2523
+ * instead of an array value.
2524
+ */
2525
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
2526
+
2527
+ /**
2528
+ * Reverses the elements in an Array.
2529
+ */
2530
+ reverse(): Uint8Array;
2531
+
2532
+ /**
2533
+ * Sets a value or an array of values.
2534
+ * @param index The index of the location to set.
2535
+ * @param value The value to set.
2536
+ */
2537
+ set(index: number, value: number): void;
2538
+
2539
+ /**
2540
+ * Sets a value or an array of values.
2541
+ * @param array A typed or untyped array of values to set.
2542
+ * @param offset The index in the current array at which the values are to be written.
2543
+ */
2544
+ set(array: Uint8Array, offset?: number): void;
2545
+
2546
+ /**
2547
+ * Returns a section of an array.
2548
+ * @param start The beginning of the specified portion of the array.
2549
+ * @param end The end of the specified portion of the array.
2550
+ */
2551
+ slice(start?: number, end?: number): Uint8Array;
2552
+
2553
+ /**
2554
+ * Determines whether the specified callback function returns true for any element of an array.
2555
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
2556
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
2557
+ * the end of the array.
2558
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2559
+ * If thisArg is omitted, undefined is used as the this value.
2560
+ */
2561
+ some(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean;
2562
+
2563
+ /**
2564
+ * Sorts an array.
2565
+ * @param compareFn The name of the function used to determine the order of the elements. If
2566
+ * omitted, the elements are sorted in ascending, ASCII character order.
2567
+ */
2568
+ sort(compareFn?: (a: number, b: number) => number): Uint8Array;
2569
+
2570
+ /**
2571
+ * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements
2572
+ * at begin, inclusive, up to end, exclusive.
2573
+ * @param begin The index of the beginning of the array.
2574
+ * @param end The index of the end of the array.
2575
+ */
2576
+ subarray(begin: number, end?: number): Uint8Array;
2577
+
2578
+ /**
2579
+ * Converts a number to a string by using the current locale.
2580
+ */
2581
+ toLocaleString(): string;
2582
+
2583
+ /**
2584
+ * Returns a string representation of an array.
2585
+ */
2586
+ toString(): string;
2587
+
2588
+ /**
2589
+ * Returns an list of values in the array
2590
+ */
2591
+ values(): Iterator<number>;
2592
+
2593
+ [index: number]: number;
2594
+ // [Symbol.iterator] (): Iterator<number>;
2595
+ }
2596
+
2597
+ interface Uint8ArrayConstructor {
2598
+ prototype: Uint8Array;
2599
+ new (length: number): Uint8Array;
2600
+ new (array: Uint8Array): Uint8Array;
2601
+ new (array: number[]): Uint8Array;
2602
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array;
2603
+
2604
+ /**
2605
+ * The size in bytes of each element in the array.
2606
+ */
2607
+ BYTES_PER_ELEMENT: number;
2608
+
2609
+ /**
2610
+ * Returns a new array from a set of elements.
2611
+ * @param items A set of elements to include in the new array object.
2612
+ */
2613
+ of(...items: number[]): Uint8Array;
2614
+
2615
+ /**
2616
+ * Creates an array from an array-like or iterable object.
2617
+ * @param arrayLike An array-like or iterable object to convert to an array.
2618
+ * @param mapfn A mapping function to call on every element of the array.
2619
+ * @param thisArg Value of 'this' used to invoke the mapfn.
2620
+ */
2621
+ from(arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array;
2622
+ }
2623
+ declare var Uint8Array: Uint8ArrayConstructor;
2624
+
2625
+ /**
2626
+ * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
2627
+ * If the requested number of bytes could not be allocated an exception is raised.
2628
+ */
2629
+ interface Uint8ClampedArray {
2630
+ /**
2631
+ * The size in bytes of each element in the array.
2632
+ */
2633
+ BYTES_PER_ELEMENT: number;
2634
+
2635
+ /**
2636
+ * The ArrayBuffer instance referenced by the array.
2637
+ */
2638
+ buffer: ArrayBuffer;
2639
+
2640
+ /**
2641
+ * The length in bytes of the array.
2642
+ */
2643
+ byteLength: number;
2644
+
2645
+ /**
2646
+ * The offset in bytes of the array.
2647
+ */
2648
+ byteOffset: number;
2649
+
2650
+ /**
2651
+ * Returns the this object after copying a section of the array identified by start and end
2652
+ * to the same array starting at position target
2653
+ * @param target If target is negative, it is treated as length+target where length is the
2654
+ * length of the array.
2655
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
2656
+ * is treated as length+end.
2657
+ * @param end If not specified, length of the this object is used as its default value.
2658
+ */
2659
+ copyWithin(target: number, start: number, end?: number): Uint8ClampedArray;
2660
+
2661
+ /**
2662
+ * Returns an array of key, value pairs for every entry in the array
2663
+ */
2664
+ entries(): Iterator<[number, number]>;
2665
+
2666
+ /**
2667
+ * Determines whether all the members of an array satisfy the specified test.
2668
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
2669
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
2670
+ * or until the end of the array.
2671
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2672
+ * If thisArg is omitted, undefined is used as the this value.
2673
+ */
2674
+ every(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean;
2675
+
2676
+ /**
2677
+ * Returns the this object after filling the section identified by start and end with value
2678
+ * @param value value to fill array section with
2679
+ * @param start index to start filling the array at. If start is negative, it is treated as
2680
+ * length+start where length is the length of the array.
2681
+ * @param end index to stop filling the array at. If end is negative, it is treated as
2682
+ * length+end.
2683
+ */
2684
+ fill(value: number, start?: number, end?: number): Uint8ClampedArray;
2685
+
2686
+ /**
2687
+ * Returns the elements of an array that meet the condition specified in a callback function.
2688
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
2689
+ * the callbackfn function one time for each element in the array.
2690
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2691
+ * If thisArg is omitted, undefined is used as the this value.
2692
+ */
2693
+ filter(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): Uint8ClampedArray;
2694
+
2695
+ /**
2696
+ * Returns the value of the first element in the array where predicate is true, and undefined
2697
+ * otherwise.
2698
+ * @param predicate find calls predicate once for each element of the array, in ascending
2699
+ * order, until it finds one where predicate returns true. If such an element is found, find
2700
+ * immediately returns that element value. Otherwise, find returns undefined.
2701
+ * @param thisArg If provided, it will be used as the this value for each invocation of
2702
+ * predicate. If it is not provided, undefined is used instead.
2703
+ */
2704
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
2705
+
2706
+ /**
2707
+ * Returns the index of the first element in the array where predicate is true, and undefined
2708
+ * otherwise.
2709
+ * @param predicate find calls predicate once for each element of the array, in ascending
2710
+ * order, until it finds one where predicate returns true. If such an element is found, find
2711
+ * immediately returns that element value. Otherwise, find returns undefined.
2712
+ * @param thisArg If provided, it will be used as the this value for each invocation of
2713
+ * predicate. If it is not provided, undefined is used instead.
2714
+ */
2715
+ findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
2716
+
2717
+ /**
2718
+ * Performs the specified action for each element in an array.
2719
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
2720
+ * callbackfn function one time for each element in the array.
2721
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2722
+ * If thisArg is omitted, undefined is used as the this value.
2723
+ */
2724
+ forEach(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => void, thisArg?: any): void;
2725
+
2726
+ /**
2727
+ * Returns the index of the first occurrence of a value in an array.
2728
+ * @param searchElement The value to locate in the array.
2729
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
2730
+ * search starts at index 0.
2731
+ */
2732
+ indexOf(searchElement: number, fromIndex?: number): number;
2733
+
2734
+ /**
2735
+ * Adds all the elements of an array separated by the specified separator string.
2736
+ * @param separator A string used to separate one element of an array from the next in the
2737
+ * resulting String. If omitted, the array elements are separated with a comma.
2738
+ */
2739
+ join(separator?: string): string;
2740
+
2741
+ /**
2742
+ * Returns an list of keys in the array
2743
+ */
2744
+ keys(): Iterator<number>;
2745
+
2746
+ /**
2747
+ * Returns the index of the last occurrence of a value in an array.
2748
+ * @param searchElement The value to locate in the array.
2749
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
2750
+ * search starts at index 0.
2751
+ */
2752
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
2753
+
2754
+ /**
2755
+ * The length of the array.
2756
+ */
2757
+ length: number;
2758
+
2759
+ /**
2760
+ * Calls a defined callback function on each element of an array, and returns an array that
2761
+ * contains the results.
2762
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
2763
+ * callbackfn function one time for each element in the array.
2764
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2765
+ * If thisArg is omitted, undefined is used as the this value.
2766
+ */
2767
+ map(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => number, thisArg?: any): Uint8ClampedArray;
2768
+
2769
+ /**
2770
+ * Calls the specified callback function for all the elements in an array. The return value of
2771
+ * the callback function is the accumulated result, and is provided as an argument in the next
2772
+ * call to the callback function.
2773
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
2774
+ * callbackfn function one time for each element in the array.
2775
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
2776
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
2777
+ * instead of an array value.
2778
+ */
2779
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;
2780
+
2781
+ /**
2782
+ * Calls the specified callback function for all the elements in an array. The return value of
2783
+ * the callback function is the accumulated result, and is provided as an argument in the next
2784
+ * call to the callback function.
2785
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
2786
+ * callbackfn function one time for each element in the array.
2787
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
2788
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
2789
+ * instead of an array value.
2790
+ */
2791
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
2792
+
2793
+ /**
2794
+ * Calls the specified callback function for all the elements in an array, in descending order.
2795
+ * The return value of the callback function is the accumulated result, and is provided as an
2796
+ * argument in the next call to the callback function.
2797
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
2798
+ * the callbackfn function one time for each element in the array.
2799
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
2800
+ * the accumulation. The first call to the callbackfn function provides this value as an
2801
+ * argument instead of an array value.
2802
+ */
2803
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;
2804
+
2805
+ /**
2806
+ * Calls the specified callback function for all the elements in an array, in descending order.
2807
+ * The return value of the callback function is the accumulated result, and is provided as an
2808
+ * argument in the next call to the callback function.
2809
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
2810
+ * the callbackfn function one time for each element in the array.
2811
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
2812
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
2813
+ * instead of an array value.
2814
+ */
2815
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
2816
+
2817
+ /**
2818
+ * Reverses the elements in an Array.
2819
+ */
2820
+ reverse(): Uint8ClampedArray;
2821
+
2822
+ /**
2823
+ * Sets a value or an array of values.
2824
+ * @param index The index of the location to set.
2825
+ * @param value The value to set.
2826
+ */
2827
+ set(index: number, value: number): void;
2828
+
2829
+ /**
2830
+ * Sets a value or an array of values.
2831
+ * @param array A typed or untyped array of values to set.
2832
+ * @param offset The index in the current array at which the values are to be written.
2833
+ */
2834
+ set(array: Uint8ClampedArray, offset?: number): void;
2835
+
2836
+ /**
2837
+ * Returns a section of an array.
2838
+ * @param start The beginning of the specified portion of the array.
2839
+ * @param end The end of the specified portion of the array.
2840
+ */
2841
+ slice(start?: number, end?: number): Uint8ClampedArray;
2842
+
2843
+ /**
2844
+ * Determines whether the specified callback function returns true for any element of an array.
2845
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
2846
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
2847
+ * the end of the array.
2848
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2849
+ * If thisArg is omitted, undefined is used as the this value.
2850
+ */
2851
+ some(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean;
2852
+
2853
+ /**
2854
+ * Sorts an array.
2855
+ * @param compareFn The name of the function used to determine the order of the elements. If
2856
+ * omitted, the elements are sorted in ascending, ASCII character order.
2857
+ */
2858
+ sort(compareFn?: (a: number, b: number) => number): Uint8ClampedArray;
2859
+
2860
+ /**
2861
+ * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements
2862
+ * at begin, inclusive, up to end, exclusive.
2863
+ * @param begin The index of the beginning of the array.
2864
+ * @param end The index of the end of the array.
2865
+ */
2866
+ subarray(begin: number, end?: number): Uint8ClampedArray;
2867
+
2868
+ /**
2869
+ * Converts a number to a string by using the current locale.
2870
+ */
2871
+ toLocaleString(): string;
2872
+
2873
+ /**
2874
+ * Returns a string representation of an array.
2875
+ */
2876
+ toString(): string;
2877
+
2878
+ /**
2879
+ * Returns an list of values in the array
2880
+ */
2881
+ values(): Iterator<number>;
2882
+
2883
+ [index: number]: number;
2884
+ // [Symbol.iterator] (): Iterator<number>;
2885
+ }
2886
+
2887
+ interface Uint8ClampedArrayConstructor {
2888
+ prototype: Uint8ClampedArray;
2889
+ new (length: number): Uint8ClampedArray;
2890
+ new (array: Uint8ClampedArray): Uint8ClampedArray;
2891
+ new (array: number[]): Uint8ClampedArray;
2892
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray;
2893
+
2894
+ /**
2895
+ * The size in bytes of each element in the array.
2896
+ */
2897
+ BYTES_PER_ELEMENT: number;
2898
+
2899
+ /**
2900
+ * Returns a new array from a set of elements.
2901
+ * @param items A set of elements to include in the new array object.
2902
+ */
2903
+ of(...items: number[]): Uint8ClampedArray;
2904
+
2905
+ /**
2906
+ * Creates an array from an array-like or iterable object.
2907
+ * @param arrayLike An array-like or iterable object to convert to an array.
2908
+ * @param mapfn A mapping function to call on every element of the array.
2909
+ * @param thisArg Value of 'this' used to invoke the mapfn.
2910
+ */
2911
+ from(arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray;
2912
+ }
2913
+ declare var Uint8ClampedArray: Uint8ClampedArrayConstructor;
2914
+
2915
+ /**
2916
+ * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
2917
+ * requested number of bytes could not be allocated an exception is raised.
2918
+ */
2919
+ interface Int16Array {
2920
+ /**
2921
+ * The size in bytes of each element in the array.
2922
+ */
2923
+ BYTES_PER_ELEMENT: number;
2924
+
2925
+ /**
2926
+ * The ArrayBuffer instance referenced by the array.
2927
+ */
2928
+ buffer: ArrayBuffer;
2929
+
2930
+ /**
2931
+ * The length in bytes of the array.
2932
+ */
2933
+ byteLength: number;
2934
+
2935
+ /**
2936
+ * The offset in bytes of the array.
2937
+ */
2938
+ byteOffset: number;
2939
+
2940
+ /**
2941
+ * Returns the this object after copying a section of the array identified by start and end
2942
+ * to the same array starting at position target
2943
+ * @param target If target is negative, it is treated as length+target where length is the
2944
+ * length of the array.
2945
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
2946
+ * is treated as length+end.
2947
+ * @param end If not specified, length of the this object is used as its default value.
2948
+ */
2949
+ copyWithin(target: number, start: number, end?: number): Int16Array;
2950
+
2951
+ /**
2952
+ * Returns an array of key, value pairs for every entry in the array
2953
+ */
2954
+ entries(): Iterator<[number, number]>;
2955
+
2956
+ /**
2957
+ * Determines whether all the members of an array satisfy the specified test.
2958
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
2959
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
2960
+ * or until the end of the array.
2961
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2962
+ * If thisArg is omitted, undefined is used as the this value.
2963
+ */
2964
+ every(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean;
2965
+
2966
+ /**
2967
+ * Returns the this object after filling the section identified by start and end with value
2968
+ * @param value value to fill array section with
2969
+ * @param start index to start filling the array at. If start is negative, it is treated as
2970
+ * length+start where length is the length of the array.
2971
+ * @param end index to stop filling the array at. If end is negative, it is treated as
2972
+ * length+end.
2973
+ */
2974
+ fill(value: number, start?: number, end?: number): Int16Array;
2975
+
2976
+ /**
2977
+ * Returns the elements of an array that meet the condition specified in a callback function.
2978
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
2979
+ * the callbackfn function one time for each element in the array.
2980
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
2981
+ * If thisArg is omitted, undefined is used as the this value.
2982
+ */
2983
+ filter(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): Int16Array;
2984
+
2985
+ /**
2986
+ * Returns the value of the first element in the array where predicate is true, and undefined
2987
+ * otherwise.
2988
+ * @param predicate find calls predicate once for each element of the array, in ascending
2989
+ * order, until it finds one where predicate returns true. If such an element is found, find
2990
+ * immediately returns that element value. Otherwise, find returns undefined.
2991
+ * @param thisArg If provided, it will be used as the this value for each invocation of
2992
+ * predicate. If it is not provided, undefined is used instead.
2993
+ */
2994
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
2995
+
2996
+ /**
2997
+ * Returns the index of the first element in the array where predicate is true, and undefined
2998
+ * otherwise.
2999
+ * @param predicate find calls predicate once for each element of the array, in ascending
3000
+ * order, until it finds one where predicate returns true. If such an element is found, find
3001
+ * immediately returns that element value. Otherwise, find returns undefined.
3002
+ * @param thisArg If provided, it will be used as the this value for each invocation of
3003
+ * predicate. If it is not provided, undefined is used instead.
3004
+ */
3005
+ findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
3006
+
3007
+ /**
3008
+ * Performs the specified action for each element in an array.
3009
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
3010
+ * callbackfn function one time for each element in the array.
3011
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3012
+ * If thisArg is omitted, undefined is used as the this value.
3013
+ */
3014
+ forEach(callbackfn: (value: number, index: number, array: Int16Array) => void, thisArg?: any): void;
3015
+
3016
+ /**
3017
+ * Returns the index of the first occurrence of a value in an array.
3018
+ * @param searchElement The value to locate in the array.
3019
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3020
+ * search starts at index 0.
3021
+ */
3022
+ indexOf(searchElement: number, fromIndex?: number): number;
3023
+
3024
+ /**
3025
+ * Adds all the elements of an array separated by the specified separator string.
3026
+ * @param separator A string used to separate one element of an array from the next in the
3027
+ * resulting String. If omitted, the array elements are separated with a comma.
3028
+ */
3029
+ join(separator?: string): string;
3030
+
3031
+ /**
3032
+ * Returns an list of keys in the array
3033
+ */
3034
+ keys(): Iterator<number>;
3035
+
3036
+ /**
3037
+ * Returns the index of the last occurrence of a value in an array.
3038
+ * @param searchElement The value to locate in the array.
3039
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3040
+ * search starts at index 0.
3041
+ */
3042
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
3043
+
3044
+ /**
3045
+ * The length of the array.
3046
+ */
3047
+ length: number;
3048
+
3049
+ /**
3050
+ * Calls a defined callback function on each element of an array, and returns an array that
3051
+ * contains the results.
3052
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
3053
+ * callbackfn function one time for each element in the array.
3054
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3055
+ * If thisArg is omitted, undefined is used as the this value.
3056
+ */
3057
+ map(callbackfn: (value: number, index: number, array: Int16Array) => number, thisArg?: any): Int16Array;
3058
+
3059
+ /**
3060
+ * Calls the specified callback function for all the elements in an array. The return value of
3061
+ * the callback function is the accumulated result, and is provided as an argument in the next
3062
+ * call to the callback function.
3063
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
3064
+ * callbackfn function one time for each element in the array.
3065
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3066
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
3067
+ * instead of an array value.
3068
+ */
3069
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;
3070
+
3071
+ /**
3072
+ * Calls the specified callback function for all the elements in an array. The return value of
3073
+ * the callback function is the accumulated result, and is provided as an argument in the next
3074
+ * call to the callback function.
3075
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
3076
+ * callbackfn function one time for each element in the array.
3077
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3078
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
3079
+ * instead of an array value.
3080
+ */
3081
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
3082
+
3083
+ /**
3084
+ * Calls the specified callback function for all the elements in an array, in descending order.
3085
+ * The return value of the callback function is the accumulated result, and is provided as an
3086
+ * argument in the next call to the callback function.
3087
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
3088
+ * the callbackfn function one time for each element in the array.
3089
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3090
+ * the accumulation. The first call to the callbackfn function provides this value as an
3091
+ * argument instead of an array value.
3092
+ */
3093
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;
3094
+
3095
+ /**
3096
+ * Calls the specified callback function for all the elements in an array, in descending order.
3097
+ * The return value of the callback function is the accumulated result, and is provided as an
3098
+ * argument in the next call to the callback function.
3099
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
3100
+ * the callbackfn function one time for each element in the array.
3101
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3102
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
3103
+ * instead of an array value.
3104
+ */
3105
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
3106
+
3107
+ /**
3108
+ * Reverses the elements in an Array.
3109
+ */
3110
+ reverse(): Int16Array;
3111
+
3112
+ /**
3113
+ * Sets a value or an array of values.
3114
+ * @param index The index of the location to set.
3115
+ * @param value The value to set.
3116
+ */
3117
+ set(index: number, value: number): void;
3118
+
3119
+ /**
3120
+ * Sets a value or an array of values.
3121
+ * @param array A typed or untyped array of values to set.
3122
+ * @param offset The index in the current array at which the values are to be written.
3123
+ */
3124
+ set(array: Int16Array, offset?: number): void;
3125
+
3126
+ /**
3127
+ * Returns a section of an array.
3128
+ * @param start The beginning of the specified portion of the array.
3129
+ * @param end The end of the specified portion of the array.
3130
+ */
3131
+ slice(start?: number, end?: number): Int16Array;
3132
+
3133
+ /**
3134
+ * Determines whether the specified callback function returns true for any element of an array.
3135
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
3136
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
3137
+ * the end of the array.
3138
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3139
+ * If thisArg is omitted, undefined is used as the this value.
3140
+ */
3141
+ some(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean;
3142
+
3143
+ /**
3144
+ * Sorts an array.
3145
+ * @param compareFn The name of the function used to determine the order of the elements. If
3146
+ * omitted, the elements are sorted in ascending, ASCII character order.
3147
+ */
3148
+ sort(compareFn?: (a: number, b: number) => number): Int16Array;
3149
+
3150
+ /**
3151
+ * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements
3152
+ * at begin, inclusive, up to end, exclusive.
3153
+ * @param begin The index of the beginning of the array.
3154
+ * @param end The index of the end of the array.
3155
+ */
3156
+ subarray(begin: number, end?: number): Int16Array;
3157
+
3158
+ /**
3159
+ * Converts a number to a string by using the current locale.
3160
+ */
3161
+ toLocaleString(): string;
3162
+
3163
+ /**
3164
+ * Returns a string representation of an array.
3165
+ */
3166
+ toString(): string;
3167
+
3168
+ /**
3169
+ * Returns an list of values in the array
3170
+ */
3171
+ values(): Iterator<number>;
3172
+
3173
+ [index: number]: number;
3174
+ // [Symbol.iterator] (): Iterator<number>;
3175
+ }
3176
+
3177
+ interface Int16ArrayConstructor {
3178
+ prototype: Int16Array;
3179
+ new (length: number): Int16Array;
3180
+ new (array: Int16Array): Int16Array;
3181
+ new (array: number[]): Int16Array;
3182
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array;
3183
+
3184
+ /**
3185
+ * The size in bytes of each element in the array.
3186
+ */
3187
+ BYTES_PER_ELEMENT: number;
3188
+
3189
+ /**
3190
+ * Returns a new array from a set of elements.
3191
+ * @param items A set of elements to include in the new array object.
3192
+ */
3193
+ of(...items: number[]): Int16Array;
3194
+
3195
+ /**
3196
+ * Creates an array from an array-like or iterable object.
3197
+ * @param arrayLike An array-like or iterable object to convert to an array.
3198
+ * @param mapfn A mapping function to call on every element of the array.
3199
+ * @param thisArg Value of 'this' used to invoke the mapfn.
3200
+ */
3201
+ from(arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array;
3202
+ }
3203
+ declare var Int16Array: Int16ArrayConstructor;
3204
+
3205
+ /**
3206
+ * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
3207
+ * requested number of bytes could not be allocated an exception is raised.
3208
+ */
3209
+ interface Uint16Array {
3210
+ /**
3211
+ * The size in bytes of each element in the array.
3212
+ */
3213
+ BYTES_PER_ELEMENT: number;
3214
+
3215
+ /**
3216
+ * The ArrayBuffer instance referenced by the array.
3217
+ */
3218
+ buffer: ArrayBuffer;
3219
+
3220
+ /**
3221
+ * The length in bytes of the array.
3222
+ */
3223
+ byteLength: number;
3224
+
3225
+ /**
3226
+ * The offset in bytes of the array.
3227
+ */
3228
+ byteOffset: number;
3229
+
3230
+ /**
3231
+ * Returns the this object after copying a section of the array identified by start and end
3232
+ * to the same array starting at position target
3233
+ * @param target If target is negative, it is treated as length+target where length is the
3234
+ * length of the array.
3235
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
3236
+ * is treated as length+end.
3237
+ * @param end If not specified, length of the this object is used as its default value.
3238
+ */
3239
+ copyWithin(target: number, start: number, end?: number): Uint16Array;
3240
+
3241
+ /**
3242
+ * Returns an array of key, value pairs for every entry in the array
3243
+ */
3244
+ entries(): Iterator<[number, number]>;
3245
+
3246
+ /**
3247
+ * Determines whether all the members of an array satisfy the specified test.
3248
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
3249
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
3250
+ * or until the end of the array.
3251
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3252
+ * If thisArg is omitted, undefined is used as the this value.
3253
+ */
3254
+ every(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean;
3255
+
3256
+ /**
3257
+ * Returns the this object after filling the section identified by start and end with value
3258
+ * @param value value to fill array section with
3259
+ * @param start index to start filling the array at. If start is negative, it is treated as
3260
+ * length+start where length is the length of the array.
3261
+ * @param end index to stop filling the array at. If end is negative, it is treated as
3262
+ * length+end.
3263
+ */
3264
+ fill(value: number, start?: number, end?: number): Uint16Array;
3265
+
3266
+ /**
3267
+ * Returns the elements of an array that meet the condition specified in a callback function.
3268
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
3269
+ * the callbackfn function one time for each element in the array.
3270
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3271
+ * If thisArg is omitted, undefined is used as the this value.
3272
+ */
3273
+ filter(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): Uint16Array;
3274
+
3275
+ /**
3276
+ * Returns the value of the first element in the array where predicate is true, and undefined
3277
+ * otherwise.
3278
+ * @param predicate find calls predicate once for each element of the array, in ascending
3279
+ * order, until it finds one where predicate returns true. If such an element is found, find
3280
+ * immediately returns that element value. Otherwise, find returns undefined.
3281
+ * @param thisArg If provided, it will be used as the this value for each invocation of
3282
+ * predicate. If it is not provided, undefined is used instead.
3283
+ */
3284
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
3285
+
3286
+ /**
3287
+ * Returns the index of the first element in the array where predicate is true, and undefined
3288
+ * otherwise.
3289
+ * @param predicate find calls predicate once for each element of the array, in ascending
3290
+ * order, until it finds one where predicate returns true. If such an element is found, find
3291
+ * immediately returns that element value. Otherwise, find returns undefined.
3292
+ * @param thisArg If provided, it will be used as the this value for each invocation of
3293
+ * predicate. If it is not provided, undefined is used instead.
3294
+ */
3295
+ findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
3296
+
3297
+ /**
3298
+ * Performs the specified action for each element in an array.
3299
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
3300
+ * callbackfn function one time for each element in the array.
3301
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3302
+ * If thisArg is omitted, undefined is used as the this value.
3303
+ */
3304
+ forEach(callbackfn: (value: number, index: number, array: Uint16Array) => void, thisArg?: any): void;
3305
+
3306
+ /**
3307
+ * Returns the index of the first occurrence of a value in an array.
3308
+ * @param searchElement The value to locate in the array.
3309
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3310
+ * search starts at index 0.
3311
+ */
3312
+ indexOf(searchElement: number, fromIndex?: number): number;
3313
+
3314
+ /**
3315
+ * Adds all the elements of an array separated by the specified separator string.
3316
+ * @param separator A string used to separate one element of an array from the next in the
3317
+ * resulting String. If omitted, the array elements are separated with a comma.
3318
+ */
3319
+ join(separator?: string): string;
3320
+
3321
+ /**
3322
+ * Returns an list of keys in the array
3323
+ */
3324
+ keys(): Iterator<number>;
3325
+
3326
+ /**
3327
+ * Returns the index of the last occurrence of a value in an array.
3328
+ * @param searchElement The value to locate in the array.
3329
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3330
+ * search starts at index 0.
3331
+ */
3332
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
3333
+
3334
+ /**
3335
+ * The length of the array.
3336
+ */
3337
+ length: number;
3338
+
3339
+ /**
3340
+ * Calls a defined callback function on each element of an array, and returns an array that
3341
+ * contains the results.
3342
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
3343
+ * callbackfn function one time for each element in the array.
3344
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3345
+ * If thisArg is omitted, undefined is used as the this value.
3346
+ */
3347
+ map(callbackfn: (value: number, index: number, array: Uint16Array) => number, thisArg?: any): Uint16Array;
3348
+
3349
+ /**
3350
+ * Calls the specified callback function for all the elements in an array. The return value of
3351
+ * the callback function is the accumulated result, and is provided as an argument in the next
3352
+ * call to the callback function.
3353
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
3354
+ * callbackfn function one time for each element in the array.
3355
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3356
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
3357
+ * instead of an array value.
3358
+ */
3359
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;
3360
+
3361
+ /**
3362
+ * Calls the specified callback function for all the elements in an array. The return value of
3363
+ * the callback function is the accumulated result, and is provided as an argument in the next
3364
+ * call to the callback function.
3365
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
3366
+ * callbackfn function one time for each element in the array.
3367
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3368
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
3369
+ * instead of an array value.
3370
+ */
3371
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
3372
+
3373
+ /**
3374
+ * Calls the specified callback function for all the elements in an array, in descending order.
3375
+ * The return value of the callback function is the accumulated result, and is provided as an
3376
+ * argument in the next call to the callback function.
3377
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
3378
+ * the callbackfn function one time for each element in the array.
3379
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3380
+ * the accumulation. The first call to the callbackfn function provides this value as an
3381
+ * argument instead of an array value.
3382
+ */
3383
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;
3384
+
3385
+ /**
3386
+ * Calls the specified callback function for all the elements in an array, in descending order.
3387
+ * The return value of the callback function is the accumulated result, and is provided as an
3388
+ * argument in the next call to the callback function.
3389
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
3390
+ * the callbackfn function one time for each element in the array.
3391
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3392
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
3393
+ * instead of an array value.
3394
+ */
3395
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
3396
+
3397
+ /**
3398
+ * Reverses the elements in an Array.
3399
+ */
3400
+ reverse(): Uint16Array;
3401
+
3402
+ /**
3403
+ * Sets a value or an array of values.
3404
+ * @param index The index of the location to set.
3405
+ * @param value The value to set.
3406
+ */
3407
+ set(index: number, value: number): void;
3408
+
3409
+ /**
3410
+ * Sets a value or an array of values.
3411
+ * @param array A typed or untyped array of values to set.
3412
+ * @param offset The index in the current array at which the values are to be written.
3413
+ */
3414
+ set(array: Uint16Array, offset?: number): void;
3415
+
3416
+ /**
3417
+ * Returns a section of an array.
3418
+ * @param start The beginning of the specified portion of the array.
3419
+ * @param end The end of the specified portion of the array.
3420
+ */
3421
+ slice(start?: number, end?: number): Uint16Array;
3422
+
3423
+ /**
3424
+ * Determines whether the specified callback function returns true for any element of an array.
3425
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
3426
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
3427
+ * the end of the array.
3428
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3429
+ * If thisArg is omitted, undefined is used as the this value.
3430
+ */
3431
+ some(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean;
3432
+
3433
+ /**
3434
+ * Sorts an array.
3435
+ * @param compareFn The name of the function used to determine the order of the elements. If
3436
+ * omitted, the elements are sorted in ascending, ASCII character order.
3437
+ */
3438
+ sort(compareFn?: (a: number, b: number) => number): Uint16Array;
3439
+
3440
+ /**
3441
+ * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements
3442
+ * at begin, inclusive, up to end, exclusive.
3443
+ * @param begin The index of the beginning of the array.
3444
+ * @param end The index of the end of the array.
3445
+ */
3446
+ subarray(begin: number, end?: number): Uint16Array;
3447
+
3448
+ /**
3449
+ * Converts a number to a string by using the current locale.
3450
+ */
3451
+ toLocaleString(): string;
3452
+
3453
+ /**
3454
+ * Returns a string representation of an array.
3455
+ */
3456
+ toString(): string;
3457
+
3458
+ /**
3459
+ * Returns an list of values in the array
3460
+ */
3461
+ values(): Iterator<number>;
3462
+
3463
+ [index: number]: number;
3464
+ // [Symbol.iterator] (): Iterator<number>;
3465
+ }
3466
+
3467
+ interface Uint16ArrayConstructor {
3468
+ prototype: Uint16Array;
3469
+ new (length: number): Uint16Array;
3470
+ new (array: Uint16Array): Uint16Array;
3471
+ new (array: number[]): Uint16Array;
3472
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array;
3473
+
3474
+ /**
3475
+ * The size in bytes of each element in the array.
3476
+ */
3477
+ BYTES_PER_ELEMENT: number;
3478
+
3479
+ /**
3480
+ * Returns a new array from a set of elements.
3481
+ * @param items A set of elements to include in the new array object.
3482
+ */
3483
+ of(...items: number[]): Uint16Array;
3484
+
3485
+ /**
3486
+ * Creates an array from an array-like or iterable object.
3487
+ * @param arrayLike An array-like or iterable object to convert to an array.
3488
+ * @param mapfn A mapping function to call on every element of the array.
3489
+ * @param thisArg Value of 'this' used to invoke the mapfn.
3490
+ */
3491
+ from(arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array;
3492
+ }
3493
+ declare var Uint16Array: Uint16ArrayConstructor;
3494
+
3495
+ /**
3496
+ * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
3497
+ * requested number of bytes could not be allocated an exception is raised.
3498
+ */
3499
+ interface Int32Array {
3500
+ /**
3501
+ * The size in bytes of each element in the array.
3502
+ */
3503
+ BYTES_PER_ELEMENT: number;
3504
+
3505
+ /**
3506
+ * The ArrayBuffer instance referenced by the array.
3507
+ */
3508
+ buffer: ArrayBuffer;
3509
+
3510
+ /**
3511
+ * The length in bytes of the array.
3512
+ */
3513
+ byteLength: number;
3514
+
3515
+ /**
3516
+ * The offset in bytes of the array.
3517
+ */
3518
+ byteOffset: number;
3519
+
3520
+ /**
3521
+ * Returns the this object after copying a section of the array identified by start and end
3522
+ * to the same array starting at position target
3523
+ * @param target If target is negative, it is treated as length+target where length is the
3524
+ * length of the array.
3525
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
3526
+ * is treated as length+end.
3527
+ * @param end If not specified, length of the this object is used as its default value.
3528
+ */
3529
+ copyWithin(target: number, start: number, end?: number): Int32Array;
3530
+
3531
+ /**
3532
+ * Returns an array of key, value pairs for every entry in the array
3533
+ */
3534
+ entries(): Iterator<[number, number]>;
3535
+
3536
+ /**
3537
+ * Determines whether all the members of an array satisfy the specified test.
3538
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
3539
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
3540
+ * or until the end of the array.
3541
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3542
+ * If thisArg is omitted, undefined is used as the this value.
3543
+ */
3544
+ every(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean;
3545
+
3546
+ /**
3547
+ * Returns the this object after filling the section identified by start and end with value
3548
+ * @param value value to fill array section with
3549
+ * @param start index to start filling the array at. If start is negative, it is treated as
3550
+ * length+start where length is the length of the array.
3551
+ * @param end index to stop filling the array at. If end is negative, it is treated as
3552
+ * length+end.
3553
+ */
3554
+ fill(value: number, start?: number, end?: number): Int32Array;
3555
+
3556
+ /**
3557
+ * Returns the elements of an array that meet the condition specified in a callback function.
3558
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
3559
+ * the callbackfn function one time for each element in the array.
3560
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3561
+ * If thisArg is omitted, undefined is used as the this value.
3562
+ */
3563
+ filter(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): Int32Array;
3564
+
3565
+ /**
3566
+ * Returns the value of the first element in the array where predicate is true, and undefined
3567
+ * otherwise.
3568
+ * @param predicate find calls predicate once for each element of the array, in ascending
3569
+ * order, until it finds one where predicate returns true. If such an element is found, find
3570
+ * immediately returns that element value. Otherwise, find returns undefined.
3571
+ * @param thisArg If provided, it will be used as the this value for each invocation of
3572
+ * predicate. If it is not provided, undefined is used instead.
3573
+ */
3574
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
3575
+
3576
+ /**
3577
+ * Returns the index of the first element in the array where predicate is true, and undefined
3578
+ * otherwise.
3579
+ * @param predicate find calls predicate once for each element of the array, in ascending
3580
+ * order, until it finds one where predicate returns true. If such an element is found, find
3581
+ * immediately returns that element value. Otherwise, find returns undefined.
3582
+ * @param thisArg If provided, it will be used as the this value for each invocation of
3583
+ * predicate. If it is not provided, undefined is used instead.
3584
+ */
3585
+ findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
3586
+
3587
+ /**
3588
+ * Performs the specified action for each element in an array.
3589
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
3590
+ * callbackfn function one time for each element in the array.
3591
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3592
+ * If thisArg is omitted, undefined is used as the this value.
3593
+ */
3594
+ forEach(callbackfn: (value: number, index: number, array: Int32Array) => void, thisArg?: any): void;
3595
+
3596
+ /**
3597
+ * Returns the index of the first occurrence of a value in an array.
3598
+ * @param searchElement The value to locate in the array.
3599
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3600
+ * search starts at index 0.
3601
+ */
3602
+ indexOf(searchElement: number, fromIndex?: number): number;
3603
+
3604
+ /**
3605
+ * Adds all the elements of an array separated by the specified separator string.
3606
+ * @param separator A string used to separate one element of an array from the next in the
3607
+ * resulting String. If omitted, the array elements are separated with a comma.
3608
+ */
3609
+ join(separator?: string): string;
3610
+
3611
+ /**
3612
+ * Returns an list of keys in the array
3613
+ */
3614
+ keys(): Iterator<number>;
3615
+
3616
+ /**
3617
+ * Returns the index of the last occurrence of a value in an array.
3618
+ * @param searchElement The value to locate in the array.
3619
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3620
+ * search starts at index 0.
3621
+ */
3622
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
3623
+
3624
+ /**
3625
+ * The length of the array.
3626
+ */
3627
+ length: number;
3628
+
3629
+ /**
3630
+ * Calls a defined callback function on each element of an array, and returns an array that
3631
+ * contains the results.
3632
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
3633
+ * callbackfn function one time for each element in the array.
3634
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3635
+ * If thisArg is omitted, undefined is used as the this value.
3636
+ */
3637
+ map(callbackfn: (value: number, index: number, array: Int32Array) => number, thisArg?: any): Int32Array;
3638
+
3639
+ /**
3640
+ * Calls the specified callback function for all the elements in an array. The return value of
3641
+ * the callback function is the accumulated result, and is provided as an argument in the next
3642
+ * call to the callback function.
3643
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
3644
+ * callbackfn function one time for each element in the array.
3645
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3646
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
3647
+ * instead of an array value.
3648
+ */
3649
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;
3650
+
3651
+ /**
3652
+ * Calls the specified callback function for all the elements in an array. The return value of
3653
+ * the callback function is the accumulated result, and is provided as an argument in the next
3654
+ * call to the callback function.
3655
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
3656
+ * callbackfn function one time for each element in the array.
3657
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3658
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
3659
+ * instead of an array value.
3660
+ */
3661
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
3662
+
3663
+ /**
3664
+ * Calls the specified callback function for all the elements in an array, in descending order.
3665
+ * The return value of the callback function is the accumulated result, and is provided as an
3666
+ * argument in the next call to the callback function.
3667
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
3668
+ * the callbackfn function one time for each element in the array.
3669
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3670
+ * the accumulation. The first call to the callbackfn function provides this value as an
3671
+ * argument instead of an array value.
3672
+ */
3673
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;
3674
+
3675
+ /**
3676
+ * Calls the specified callback function for all the elements in an array, in descending order.
3677
+ * The return value of the callback function is the accumulated result, and is provided as an
3678
+ * argument in the next call to the callback function.
3679
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
3680
+ * the callbackfn function one time for each element in the array.
3681
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3682
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
3683
+ * instead of an array value.
3684
+ */
3685
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
3686
+
3687
+ /**
3688
+ * Reverses the elements in an Array.
3689
+ */
3690
+ reverse(): Int32Array;
3691
+
3692
+ /**
3693
+ * Sets a value or an array of values.
3694
+ * @param index The index of the location to set.
3695
+ * @param value The value to set.
3696
+ */
3697
+ set(index: number, value: number): void;
3698
+
3699
+ /**
3700
+ * Sets a value or an array of values.
3701
+ * @param array A typed or untyped array of values to set.
3702
+ * @param offset The index in the current array at which the values are to be written.
3703
+ */
3704
+ set(array: Int32Array, offset?: number): void;
3705
+
3706
+ /**
3707
+ * Returns a section of an array.
3708
+ * @param start The beginning of the specified portion of the array.
3709
+ * @param end The end of the specified portion of the array.
3710
+ */
3711
+ slice(start?: number, end?: number): Int32Array;
3712
+
3713
+ /**
3714
+ * Determines whether the specified callback function returns true for any element of an array.
3715
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
3716
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
3717
+ * the end of the array.
3718
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3719
+ * If thisArg is omitted, undefined is used as the this value.
3720
+ */
3721
+ some(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean;
3722
+
3723
+ /**
3724
+ * Sorts an array.
3725
+ * @param compareFn The name of the function used to determine the order of the elements. If
3726
+ * omitted, the elements are sorted in ascending, ASCII character order.
3727
+ */
3728
+ sort(compareFn?: (a: number, b: number) => number): Int32Array;
3729
+
3730
+ /**
3731
+ * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements
3732
+ * at begin, inclusive, up to end, exclusive.
3733
+ * @param begin The index of the beginning of the array.
3734
+ * @param end The index of the end of the array.
3735
+ */
3736
+ subarray(begin: number, end?: number): Int32Array;
3737
+
3738
+ /**
3739
+ * Converts a number to a string by using the current locale.
3740
+ */
3741
+ toLocaleString(): string;
3742
+
3743
+ /**
3744
+ * Returns a string representation of an array.
3745
+ */
3746
+ toString(): string;
3747
+
3748
+ /**
3749
+ * Returns an list of values in the array
3750
+ */
3751
+ values(): Iterator<number>;
3752
+
3753
+ [index: number]: number;
3754
+ // [Symbol.iterator] (): Iterator<number>;
3755
+ }
3756
+
3757
+ interface Int32ArrayConstructor {
3758
+ prototype: Int32Array;
3759
+ new (length: number): Int32Array;
3760
+ new (array: Int32Array): Int32Array;
3761
+ new (array: number[]): Int32Array;
3762
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array;
3763
+
3764
+ /**
3765
+ * The size in bytes of each element in the array.
3766
+ */
3767
+ BYTES_PER_ELEMENT: number;
3768
+
3769
+ /**
3770
+ * Returns a new array from a set of elements.
3771
+ * @param items A set of elements to include in the new array object.
3772
+ */
3773
+ of(...items: number[]): Int32Array;
3774
+
3775
+ /**
3776
+ * Creates an array from an array-like or iterable object.
3777
+ * @param arrayLike An array-like or iterable object to convert to an array.
3778
+ * @param mapfn A mapping function to call on every element of the array.
3779
+ * @param thisArg Value of 'this' used to invoke the mapfn.
3780
+ */
3781
+ from(arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array;
3782
+ }
3783
+ declare var Int32Array: Int32ArrayConstructor;
3784
+
3785
+ /**
3786
+ * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
3787
+ * requested number of bytes could not be allocated an exception is raised.
3788
+ */
3789
+ interface Uint32Array {
3790
+ /**
3791
+ * The size in bytes of each element in the array.
3792
+ */
3793
+ BYTES_PER_ELEMENT: number;
3794
+
3795
+ /**
3796
+ * The ArrayBuffer instance referenced by the array.
3797
+ */
3798
+ buffer: ArrayBuffer;
3799
+
3800
+ /**
3801
+ * The length in bytes of the array.
3802
+ */
3803
+ byteLength: number;
3804
+
3805
+ /**
3806
+ * The offset in bytes of the array.
3807
+ */
3808
+ byteOffset: number;
3809
+
3810
+ /**
3811
+ * Returns the this object after copying a section of the array identified by start and end
3812
+ * to the same array starting at position target
3813
+ * @param target If target is negative, it is treated as length+target where length is the
3814
+ * length of the array.
3815
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
3816
+ * is treated as length+end.
3817
+ * @param end If not specified, length of the this object is used as its default value.
3818
+ */
3819
+ copyWithin(target: number, start: number, end?: number): Uint32Array;
3820
+
3821
+ /**
3822
+ * Returns an array of key, value pairs for every entry in the array
3823
+ */
3824
+ entries(): Iterator<[number, number]>;
3825
+
3826
+ /**
3827
+ * Determines whether all the members of an array satisfy the specified test.
3828
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
3829
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
3830
+ * or until the end of the array.
3831
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3832
+ * If thisArg is omitted, undefined is used as the this value.
3833
+ */
3834
+ every(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean;
3835
+
3836
+ /**
3837
+ * Returns the this object after filling the section identified by start and end with value
3838
+ * @param value value to fill array section with
3839
+ * @param start index to start filling the array at. If start is negative, it is treated as
3840
+ * length+start where length is the length of the array.
3841
+ * @param end index to stop filling the array at. If end is negative, it is treated as
3842
+ * length+end.
3843
+ */
3844
+ fill(value: number, start?: number, end?: number): Uint32Array;
3845
+
3846
+ /**
3847
+ * Returns the elements of an array that meet the condition specified in a callback function.
3848
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
3849
+ * the callbackfn function one time for each element in the array.
3850
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3851
+ * If thisArg is omitted, undefined is used as the this value.
3852
+ */
3853
+ filter(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): Uint32Array;
3854
+
3855
+ /**
3856
+ * Returns the value of the first element in the array where predicate is true, and undefined
3857
+ * otherwise.
3858
+ * @param predicate find calls predicate once for each element of the array, in ascending
3859
+ * order, until it finds one where predicate returns true. If such an element is found, find
3860
+ * immediately returns that element value. Otherwise, find returns undefined.
3861
+ * @param thisArg If provided, it will be used as the this value for each invocation of
3862
+ * predicate. If it is not provided, undefined is used instead.
3863
+ */
3864
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
3865
+
3866
+ /**
3867
+ * Returns the index of the first element in the array where predicate is true, and undefined
3868
+ * otherwise.
3869
+ * @param predicate find calls predicate once for each element of the array, in ascending
3870
+ * order, until it finds one where predicate returns true. If such an element is found, find
3871
+ * immediately returns that element value. Otherwise, find returns undefined.
3872
+ * @param thisArg If provided, it will be used as the this value for each invocation of
3873
+ * predicate. If it is not provided, undefined is used instead.
3874
+ */
3875
+ findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
3876
+
3877
+ /**
3878
+ * Performs the specified action for each element in an array.
3879
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
3880
+ * callbackfn function one time for each element in the array.
3881
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3882
+ * If thisArg is omitted, undefined is used as the this value.
3883
+ */
3884
+ forEach(callbackfn: (value: number, index: number, array: Uint32Array) => void, thisArg?: any): void;
3885
+
3886
+ /**
3887
+ * Returns the index of the first occurrence of a value in an array.
3888
+ * @param searchElement The value to locate in the array.
3889
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3890
+ * search starts at index 0.
3891
+ */
3892
+ indexOf(searchElement: number, fromIndex?: number): number;
3893
+
3894
+ /**
3895
+ * Adds all the elements of an array separated by the specified separator string.
3896
+ * @param separator A string used to separate one element of an array from the next in the
3897
+ * resulting String. If omitted, the array elements are separated with a comma.
3898
+ */
3899
+ join(separator?: string): string;
3900
+
3901
+ /**
3902
+ * Returns an list of keys in the array
3903
+ */
3904
+ keys(): Iterator<number>;
3905
+
3906
+ /**
3907
+ * Returns the index of the last occurrence of a value in an array.
3908
+ * @param searchElement The value to locate in the array.
3909
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
3910
+ * search starts at index 0.
3911
+ */
3912
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
3913
+
3914
+ /**
3915
+ * The length of the array.
3916
+ */
3917
+ length: number;
3918
+
3919
+ /**
3920
+ * Calls a defined callback function on each element of an array, and returns an array that
3921
+ * contains the results.
3922
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
3923
+ * callbackfn function one time for each element in the array.
3924
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
3925
+ * If thisArg is omitted, undefined is used as the this value.
3926
+ */
3927
+ map(callbackfn: (value: number, index: number, array: Uint32Array) => number, thisArg?: any): Uint32Array;
3928
+
3929
+ /**
3930
+ * Calls the specified callback function for all the elements in an array. The return value of
3931
+ * the callback function is the accumulated result, and is provided as an argument in the next
3932
+ * call to the callback function.
3933
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
3934
+ * callbackfn function one time for each element in the array.
3935
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3936
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
3937
+ * instead of an array value.
3938
+ */
3939
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;
3940
+
3941
+ /**
3942
+ * Calls the specified callback function for all the elements in an array. The return value of
3943
+ * the callback function is the accumulated result, and is provided as an argument in the next
3944
+ * call to the callback function.
3945
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
3946
+ * callbackfn function one time for each element in the array.
3947
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3948
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
3949
+ * instead of an array value.
3950
+ */
3951
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
3952
+
3953
+ /**
3954
+ * Calls the specified callback function for all the elements in an array, in descending order.
3955
+ * The return value of the callback function is the accumulated result, and is provided as an
3956
+ * argument in the next call to the callback function.
3957
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
3958
+ * the callbackfn function one time for each element in the array.
3959
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3960
+ * the accumulation. The first call to the callbackfn function provides this value as an
3961
+ * argument instead of an array value.
3962
+ */
3963
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;
3964
+
3965
+ /**
3966
+ * Calls the specified callback function for all the elements in an array, in descending order.
3967
+ * The return value of the callback function is the accumulated result, and is provided as an
3968
+ * argument in the next call to the callback function.
3969
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
3970
+ * the callbackfn function one time for each element in the array.
3971
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
3972
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
3973
+ * instead of an array value.
3974
+ */
3975
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
3976
+
3977
+ /**
3978
+ * Reverses the elements in an Array.
3979
+ */
3980
+ reverse(): Uint32Array;
3981
+
3982
+ /**
3983
+ * Sets a value or an array of values.
3984
+ * @param index The index of the location to set.
3985
+ * @param value The value to set.
3986
+ */
3987
+ set(index: number, value: number): void;
3988
+
3989
+ /**
3990
+ * Sets a value or an array of values.
3991
+ * @param array A typed or untyped array of values to set.
3992
+ * @param offset The index in the current array at which the values are to be written.
3993
+ */
3994
+ set(array: Uint32Array, offset?: number): void;
3995
+
3996
+ /**
3997
+ * Returns a section of an array.
3998
+ * @param start The beginning of the specified portion of the array.
3999
+ * @param end The end of the specified portion of the array.
4000
+ */
4001
+ slice(start?: number, end?: number): Uint32Array;
4002
+
4003
+ /**
4004
+ * Determines whether the specified callback function returns true for any element of an array.
4005
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
4006
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
4007
+ * the end of the array.
4008
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
4009
+ * If thisArg is omitted, undefined is used as the this value.
4010
+ */
4011
+ some(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean;
4012
+
4013
+ /**
4014
+ * Sorts an array.
4015
+ * @param compareFn The name of the function used to determine the order of the elements. If
4016
+ * omitted, the elements are sorted in ascending, ASCII character order.
4017
+ */
4018
+ sort(compareFn?: (a: number, b: number) => number): Uint32Array;
4019
+
4020
+ /**
4021
+ * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements
4022
+ * at begin, inclusive, up to end, exclusive.
4023
+ * @param begin The index of the beginning of the array.
4024
+ * @param end The index of the end of the array.
4025
+ */
4026
+ subarray(begin: number, end?: number): Uint32Array;
4027
+
4028
+ /**
4029
+ * Converts a number to a string by using the current locale.
4030
+ */
4031
+ toLocaleString(): string;
4032
+
4033
+ /**
4034
+ * Returns a string representation of an array.
4035
+ */
4036
+ toString(): string;
4037
+
4038
+ /**
4039
+ * Returns an list of values in the array
4040
+ */
4041
+ values(): Iterator<number>;
4042
+
4043
+ [index: number]: number;
4044
+ // [Symbol.iterator] (): Iterator<number>;
4045
+ }
4046
+
4047
+ interface Uint32ArrayConstructor {
4048
+ prototype: Uint32Array;
4049
+ new (length: number): Uint32Array;
4050
+ new (array: Uint32Array): Uint32Array;
4051
+ new (array: number[]): Uint32Array;
4052
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array;
4053
+
4054
+ /**
4055
+ * The size in bytes of each element in the array.
4056
+ */
4057
+ BYTES_PER_ELEMENT: number;
4058
+
4059
+ /**
4060
+ * Returns a new array from a set of elements.
4061
+ * @param items A set of elements to include in the new array object.
4062
+ */
4063
+ of(...items: number[]): Uint32Array;
4064
+
4065
+ /**
4066
+ * Creates an array from an array-like or iterable object.
4067
+ * @param arrayLike An array-like or iterable object to convert to an array.
4068
+ * @param mapfn A mapping function to call on every element of the array.
4069
+ * @param thisArg Value of 'this' used to invoke the mapfn.
4070
+ */
4071
+ from(arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array;
4072
+ }
4073
+ declare var Uint32Array: Uint32ArrayConstructor;
4074
+
4075
+ /**
4076
+ * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
4077
+ * of bytes could not be allocated an exception is raised.
4078
+ */
4079
+ interface Float32Array {
4080
+ /**
4081
+ * The size in bytes of each element in the array.
4082
+ */
4083
+ BYTES_PER_ELEMENT: number;
4084
+
4085
+ /**
4086
+ * The ArrayBuffer instance referenced by the array.
4087
+ */
4088
+ buffer: ArrayBuffer;
4089
+
4090
+ /**
4091
+ * The length in bytes of the array.
4092
+ */
4093
+ byteLength: number;
4094
+
4095
+ /**
4096
+ * The offset in bytes of the array.
4097
+ */
4098
+ byteOffset: number;
4099
+
4100
+ /**
4101
+ * Returns the this object after copying a section of the array identified by start and end
4102
+ * to the same array starting at position target
4103
+ * @param target If target is negative, it is treated as length+target where length is the
4104
+ * length of the array.
4105
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
4106
+ * is treated as length+end.
4107
+ * @param end If not specified, length of the this object is used as its default value.
4108
+ */
4109
+ copyWithin(target: number, start: number, end?: number): Float32Array;
4110
+
4111
+ /**
4112
+ * Returns an array of key, value pairs for every entry in the array
4113
+ */
4114
+ entries(): Iterator<[number, number]>;
4115
+
4116
+ /**
4117
+ * Determines whether all the members of an array satisfy the specified test.
4118
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
4119
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
4120
+ * or until the end of the array.
4121
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
4122
+ * If thisArg is omitted, undefined is used as the this value.
4123
+ */
4124
+ every(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean;
4125
+
4126
+ /**
4127
+ * Returns the this object after filling the section identified by start and end with value
4128
+ * @param value value to fill array section with
4129
+ * @param start index to start filling the array at. If start is negative, it is treated as
4130
+ * length+start where length is the length of the array.
4131
+ * @param end index to stop filling the array at. If end is negative, it is treated as
4132
+ * length+end.
4133
+ */
4134
+ fill(value: number, start?: number, end?: number): Float32Array;
4135
+
4136
+ /**
4137
+ * Returns the elements of an array that meet the condition specified in a callback function.
4138
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
4139
+ * the callbackfn function one time for each element in the array.
4140
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
4141
+ * If thisArg is omitted, undefined is used as the this value.
4142
+ */
4143
+ filter(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): Float32Array;
4144
+
4145
+ /**
4146
+ * Returns the value of the first element in the array where predicate is true, and undefined
4147
+ * otherwise.
4148
+ * @param predicate find calls predicate once for each element of the array, in ascending
4149
+ * order, until it finds one where predicate returns true. If such an element is found, find
4150
+ * immediately returns that element value. Otherwise, find returns undefined.
4151
+ * @param thisArg If provided, it will be used as the this value for each invocation of
4152
+ * predicate. If it is not provided, undefined is used instead.
4153
+ */
4154
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
4155
+
4156
+ /**
4157
+ * Returns the index of the first element in the array where predicate is true, and undefined
4158
+ * otherwise.
4159
+ * @param predicate find calls predicate once for each element of the array, in ascending
4160
+ * order, until it finds one where predicate returns true. If such an element is found, find
4161
+ * immediately returns that element value. Otherwise, find returns undefined.
4162
+ * @param thisArg If provided, it will be used as the this value for each invocation of
4163
+ * predicate. If it is not provided, undefined is used instead.
4164
+ */
4165
+ findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
4166
+
4167
+ /**
4168
+ * Performs the specified action for each element in an array.
4169
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
4170
+ * callbackfn function one time for each element in the array.
4171
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
4172
+ * If thisArg is omitted, undefined is used as the this value.
4173
+ */
4174
+ forEach(callbackfn: (value: number, index: number, array: Float32Array) => void, thisArg?: any): void;
4175
+
4176
+ /**
4177
+ * Returns the index of the first occurrence of a value in an array.
4178
+ * @param searchElement The value to locate in the array.
4179
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
4180
+ * search starts at index 0.
4181
+ */
4182
+ indexOf(searchElement: number, fromIndex?: number): number;
4183
+
4184
+ /**
4185
+ * Adds all the elements of an array separated by the specified separator string.
4186
+ * @param separator A string used to separate one element of an array from the next in the
4187
+ * resulting String. If omitted, the array elements are separated with a comma.
4188
+ */
4189
+ join(separator?: string): string;
4190
+
4191
+ /**
4192
+ * Returns an list of keys in the array
4193
+ */
4194
+ keys(): Iterator<number>;
4195
+
4196
+ /**
4197
+ * Returns the index of the last occurrence of a value in an array.
4198
+ * @param searchElement The value to locate in the array.
4199
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
4200
+ * search starts at index 0.
4201
+ */
4202
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
4203
+
4204
+ /**
4205
+ * The length of the array.
4206
+ */
4207
+ length: number;
4208
+
4209
+ /**
4210
+ * Calls a defined callback function on each element of an array, and returns an array that
4211
+ * contains the results.
4212
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
4213
+ * callbackfn function one time for each element in the array.
4214
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
4215
+ * If thisArg is omitted, undefined is used as the this value.
4216
+ */
4217
+ map(callbackfn: (value: number, index: number, array: Float32Array) => number, thisArg?: any): Float32Array;
4218
+
4219
+ /**
4220
+ * Calls the specified callback function for all the elements in an array. The return value of
4221
+ * the callback function is the accumulated result, and is provided as an argument in the next
4222
+ * call to the callback function.
4223
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
4224
+ * callbackfn function one time for each element in the array.
4225
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
4226
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
4227
+ * instead of an array value.
4228
+ */
4229
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;
4230
+
4231
+ /**
4232
+ * Calls the specified callback function for all the elements in an array. The return value of
4233
+ * the callback function is the accumulated result, and is provided as an argument in the next
4234
+ * call to the callback function.
4235
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
4236
+ * callbackfn function one time for each element in the array.
4237
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
4238
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
4239
+ * instead of an array value.
4240
+ */
4241
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
4242
+
4243
+ /**
4244
+ * Calls the specified callback function for all the elements in an array, in descending order.
4245
+ * The return value of the callback function is the accumulated result, and is provided as an
4246
+ * argument in the next call to the callback function.
4247
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
4248
+ * the callbackfn function one time for each element in the array.
4249
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
4250
+ * the accumulation. The first call to the callbackfn function provides this value as an
4251
+ * argument instead of an array value.
4252
+ */
4253
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;
4254
+
4255
+ /**
4256
+ * Calls the specified callback function for all the elements in an array, in descending order.
4257
+ * The return value of the callback function is the accumulated result, and is provided as an
4258
+ * argument in the next call to the callback function.
4259
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
4260
+ * the callbackfn function one time for each element in the array.
4261
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
4262
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
4263
+ * instead of an array value.
4264
+ */
4265
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
4266
+
4267
+ /**
4268
+ * Reverses the elements in an Array.
4269
+ */
4270
+ reverse(): Float32Array;
4271
+
4272
+ /**
4273
+ * Sets a value or an array of values.
4274
+ * @param index The index of the location to set.
4275
+ * @param value The value to set.
4276
+ */
4277
+ set(index: number, value: number): void;
4278
+
4279
+ /**
4280
+ * Sets a value or an array of values.
4281
+ * @param array A typed or untyped array of values to set.
4282
+ * @param offset The index in the current array at which the values are to be written.
4283
+ */
4284
+ set(array: Float32Array, offset?: number): void;
4285
+
4286
+ /**
4287
+ * Returns a section of an array.
4288
+ * @param start The beginning of the specified portion of the array.
4289
+ * @param end The end of the specified portion of the array.
4290
+ */
4291
+ slice(start?: number, end?: number): Float32Array;
4292
+
4293
+ /**
4294
+ * Determines whether the specified callback function returns true for any element of an array.
4295
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
4296
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
4297
+ * the end of the array.
4298
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
4299
+ * If thisArg is omitted, undefined is used as the this value.
4300
+ */
4301
+ some(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean;
4302
+
4303
+ /**
4304
+ * Sorts an array.
4305
+ * @param compareFn The name of the function used to determine the order of the elements. If
4306
+ * omitted, the elements are sorted in ascending, ASCII character order.
4307
+ */
4308
+ sort(compareFn?: (a: number, b: number) => number): Float32Array;
4309
+
4310
+ /**
4311
+ * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements
4312
+ * at begin, inclusive, up to end, exclusive.
4313
+ * @param begin The index of the beginning of the array.
4314
+ * @param end The index of the end of the array.
4315
+ */
4316
+ subarray(begin: number, end?: number): Float32Array;
4317
+
4318
+ /**
4319
+ * Converts a number to a string by using the current locale.
4320
+ */
4321
+ toLocaleString(): string;
4322
+
4323
+ /**
4324
+ * Returns a string representation of an array.
4325
+ */
4326
+ toString(): string;
4327
+
4328
+ /**
4329
+ * Returns an list of values in the array
4330
+ */
4331
+ values(): Iterator<number>;
4332
+
4333
+ [index: number]: number;
4334
+ // [Symbol.iterator] (): Iterator<number>;
4335
+ }
4336
+
4337
+ interface Float32ArrayConstructor {
4338
+ prototype: Float32Array;
4339
+ new (length: number): Float32Array;
4340
+ new (array: Float32Array): Float32Array;
4341
+ new (array: number[]): Float32Array;
4342
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array;
4343
+
4344
+ /**
4345
+ * The size in bytes of each element in the array.
4346
+ */
4347
+ BYTES_PER_ELEMENT: number;
4348
+
4349
+ /**
4350
+ * Returns a new array from a set of elements.
4351
+ * @param items A set of elements to include in the new array object.
4352
+ */
4353
+ of(...items: number[]): Float32Array;
4354
+
4355
+ /**
4356
+ * Creates an array from an array-like or iterable object.
4357
+ * @param arrayLike An array-like or iterable object to convert to an array.
4358
+ * @param mapfn A mapping function to call on every element of the array.
4359
+ * @param thisArg Value of 'this' used to invoke the mapfn.
4360
+ */
4361
+ from(arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array;
4362
+ }
4363
+ declare var Float32Array: Float32ArrayConstructor;
4364
+
4365
+ /**
4366
+ * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
4367
+ * number of bytes could not be allocated an exception is raised.
4368
+ */
4369
+ interface Float64Array {
4370
+ /**
4371
+ * The size in bytes of each element in the array.
4372
+ */
4373
+ BYTES_PER_ELEMENT: number;
4374
+
4375
+ /**
4376
+ * The ArrayBuffer instance referenced by the array.
4377
+ */
4378
+ buffer: ArrayBuffer;
4379
+
4380
+ /**
4381
+ * The length in bytes of the array.
4382
+ */
4383
+ byteLength: number;
4384
+
4385
+ /**
4386
+ * The offset in bytes of the array.
4387
+ */
4388
+ byteOffset: number;
4389
+
4390
+ /**
4391
+ * Returns the this object after copying a section of the array identified by start and end
4392
+ * to the same array starting at position target
4393
+ * @param target If target is negative, it is treated as length+target where length is the
4394
+ * length of the array.
4395
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
4396
+ * is treated as length+end.
4397
+ * @param end If not specified, length of the this object is used as its default value.
4398
+ */
4399
+ copyWithin(target: number, start: number, end?: number): Float64Array;
4400
+
4401
+ /**
4402
+ * Returns an array of key, value pairs for every entry in the array
4403
+ */
4404
+ entries(): Iterator<[number, number]>;
4405
+
4406
+ /**
4407
+ * Determines whether all the members of an array satisfy the specified test.
4408
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
4409
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
4410
+ * or until the end of the array.
4411
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
4412
+ * If thisArg is omitted, undefined is used as the this value.
4413
+ */
4414
+ every(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean;
4415
+
4416
+ /**
4417
+ * Returns the this object after filling the section identified by start and end with value
4418
+ * @param value value to fill array section with
4419
+ * @param start index to start filling the array at. If start is negative, it is treated as
4420
+ * length+start where length is the length of the array.
4421
+ * @param end index to stop filling the array at. If end is negative, it is treated as
4422
+ * length+end.
4423
+ */
4424
+ fill(value: number, start?: number, end?: number): Float64Array;
4425
+
4426
+ /**
4427
+ * Returns the elements of an array that meet the condition specified in a callback function.
4428
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
4429
+ * the callbackfn function one time for each element in the array.
4430
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
4431
+ * If thisArg is omitted, undefined is used as the this value.
4432
+ */
4433
+ filter(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): Float64Array;
4434
+
4435
+ /**
4436
+ * Returns the value of the first element in the array where predicate is true, and undefined
4437
+ * otherwise.
4438
+ * @param predicate find calls predicate once for each element of the array, in ascending
4439
+ * order, until it finds one where predicate returns true. If such an element is found, find
4440
+ * immediately returns that element value. Otherwise, find returns undefined.
4441
+ * @param thisArg If provided, it will be used as the this value for each invocation of
4442
+ * predicate. If it is not provided, undefined is used instead.
4443
+ */
4444
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
4445
+
4446
+ /**
4447
+ * Returns the index of the first element in the array where predicate is true, and undefined
4448
+ * otherwise.
4449
+ * @param predicate find calls predicate once for each element of the array, in ascending
4450
+ * order, until it finds one where predicate returns true. If such an element is found, find
4451
+ * immediately returns that element value. Otherwise, find returns undefined.
4452
+ * @param thisArg If provided, it will be used as the this value for each invocation of
4453
+ * predicate. If it is not provided, undefined is used instead.
4454
+ */
4455
+ findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
4456
+
4457
+ /**
4458
+ * Performs the specified action for each element in an array.
4459
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
4460
+ * callbackfn function one time for each element in the array.
4461
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
4462
+ * If thisArg is omitted, undefined is used as the this value.
4463
+ */
4464
+ forEach(callbackfn: (value: number, index: number, array: Float64Array) => void, thisArg?: any): void;
4465
+
4466
+ /**
4467
+ * Returns the index of the first occurrence of a value in an array.
4468
+ * @param searchElement The value to locate in the array.
4469
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
4470
+ * search starts at index 0.
4471
+ */
4472
+ indexOf(searchElement: number, fromIndex?: number): number;
4473
+
4474
+ /**
4475
+ * Adds all the elements of an array separated by the specified separator string.
4476
+ * @param separator A string used to separate one element of an array from the next in the
4477
+ * resulting String. If omitted, the array elements are separated with a comma.
4478
+ */
4479
+ join(separator?: string): string;
4480
+
4481
+ /**
4482
+ * Returns an list of keys in the array
4483
+ */
4484
+ keys(): Iterator<number>;
4485
+
4486
+ /**
4487
+ * Returns the index of the last occurrence of a value in an array.
4488
+ * @param searchElement The value to locate in the array.
4489
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
4490
+ * search starts at index 0.
4491
+ */
4492
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
4493
+
4494
+ /**
4495
+ * The length of the array.
4496
+ */
4497
+ length: number;
4498
+
4499
+ /**
4500
+ * Calls a defined callback function on each element of an array, and returns an array that
4501
+ * contains the results.
4502
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
4503
+ * callbackfn function one time for each element in the array.
4504
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
4505
+ * If thisArg is omitted, undefined is used as the this value.
4506
+ */
4507
+ map(callbackfn: (value: number, index: number, array: Float64Array) => number, thisArg?: any): Float64Array;
4508
+
4509
+ /**
4510
+ * Calls the specified callback function for all the elements in an array. The return value of
4511
+ * the callback function is the accumulated result, and is provided as an argument in the next
4512
+ * call to the callback function.
4513
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
4514
+ * callbackfn function one time for each element in the array.
4515
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
4516
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
4517
+ * instead of an array value.
4518
+ */
4519
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;
4520
+
4521
+ /**
4522
+ * Calls the specified callback function for all the elements in an array. The return value of
4523
+ * the callback function is the accumulated result, and is provided as an argument in the next
4524
+ * call to the callback function.
4525
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
4526
+ * callbackfn function one time for each element in the array.
4527
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
4528
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
4529
+ * instead of an array value.
4530
+ */
4531
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
4532
+
4533
+ /**
4534
+ * Calls the specified callback function for all the elements in an array, in descending order.
4535
+ * The return value of the callback function is the accumulated result, and is provided as an
4536
+ * argument in the next call to the callback function.
4537
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
4538
+ * the callbackfn function one time for each element in the array.
4539
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
4540
+ * the accumulation. The first call to the callbackfn function provides this value as an
4541
+ * argument instead of an array value.
4542
+ */
4543
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;
4544
+
4545
+ /**
4546
+ * Calls the specified callback function for all the elements in an array, in descending order.
4547
+ * The return value of the callback function is the accumulated result, and is provided as an
4548
+ * argument in the next call to the callback function.
4549
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
4550
+ * the callbackfn function one time for each element in the array.
4551
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
4552
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
4553
+ * instead of an array value.
4554
+ */
4555
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
4556
+
4557
+ /**
4558
+ * Reverses the elements in an Array.
4559
+ */
4560
+ reverse(): Float64Array;
4561
+
4562
+ /**
4563
+ * Sets a value or an array of values.
4564
+ * @param index The index of the location to set.
4565
+ * @param value The value to set.
4566
+ */
4567
+ set(index: number, value: number): void;
4568
+
4569
+ /**
4570
+ * Sets a value or an array of values.
4571
+ * @param array A typed or untyped array of values to set.
4572
+ * @param offset The index in the current array at which the values are to be written.
4573
+ */
4574
+ set(array: Float64Array, offset?: number): void;
4575
+
4576
+ /**
4577
+ * Returns a section of an array.
4578
+ * @param start The beginning of the specified portion of the array.
4579
+ * @param end The end of the specified portion of the array.
4580
+ */
4581
+ slice(start?: number, end?: number): Float64Array;
4582
+
4583
+ /**
4584
+ * Determines whether the specified callback function returns true for any element of an array.
4585
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
4586
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
4587
+ * the end of the array.
4588
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
4589
+ * If thisArg is omitted, undefined is used as the this value.
4590
+ */
4591
+ some(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean;
4592
+
4593
+ /**
4594
+ * Sorts an array.
4595
+ * @param compareFn The name of the function used to determine the order of the elements. If
4596
+ * omitted, the elements are sorted in ascending, ASCII character order.
4597
+ */
4598
+ sort(compareFn?: (a: number, b: number) => number): Float64Array;
4599
+
4600
+ /**
4601
+ * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements
4602
+ * at begin, inclusive, up to end, exclusive.
4603
+ * @param begin The index of the beginning of the array.
4604
+ * @param end The index of the end of the array.
4605
+ */
4606
+ subarray(begin: number, end?: number): Float64Array;
4607
+
4608
+ /**
4609
+ * Converts a number to a string by using the current locale.
4610
+ */
4611
+ toLocaleString(): string;
4612
+
4613
+ /**
4614
+ * Returns a string representation of an array.
4615
+ */
4616
+ toString(): string;
4617
+
4618
+ /**
4619
+ * Returns an list of values in the array
4620
+ */
4621
+ values(): Iterator<number>;
4622
+
4623
+ [index: number]: number;
4624
+ // [Symbol.iterator] (): Iterator<number>;
4625
+ }
4626
+
4627
+ interface Float64ArrayConstructor {
4628
+ prototype: Float64Array;
4629
+ new (length: number): Float64Array;
4630
+ new (array: Float64Array): Float64Array;
4631
+ new (array: number[]): Float64Array;
4632
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array;
4633
+
4634
+ /**
4635
+ * The size in bytes of each element in the array.
4636
+ */
4637
+ BYTES_PER_ELEMENT: number;
4638
+
4639
+ /**
4640
+ * Returns a new array from a set of elements.
4641
+ * @param items A set of elements to include in the new array object.
4642
+ */
4643
+ of(...items: number[]): Float64Array;
4644
+
4645
+ /**
4646
+ * Creates an array from an array-like or iterable object.
4647
+ * @param arrayLike An array-like or iterable object to convert to an array.
4648
+ * @param mapfn A mapping function to call on every element of the array.
4649
+ * @param thisArg Value of 'this' used to invoke the mapfn.
4650
+ */
4651
+ from(arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;
4652
+ }
4653
+ declare var Float64Array: Float64ArrayConstructor;
4654
+
4655
+ interface ProxyHandler<T> {
4656
+ getPrototypeOf? (target: T): any;
4657
+ setPrototypeOf? (target: T, v: any): boolean;
4658
+ isExtensible? (target: T): boolean;
4659
+ preventExtensions? (target: T): boolean;
4660
+ getOwnPropertyDescriptor? (target: T, p: PropertyKey): PropertyDescriptor;
4661
+ has? (target: T, p: PropertyKey): boolean;
4662
+ get? (target: T, p: PropertyKey, receiver: any): any;
4663
+ set? (target: T, p: PropertyKey, value: any, receiver: any): boolean;
4664
+ deleteProperty? (target: T, p: PropertyKey): boolean;
4665
+ defineProperty? (target: T, p: PropertyKey, attributes: PropertyDescriptor): boolean;
4666
+ enumerate? (target: T): PropertyKey[];
4667
+ ownKeys? (target: T): PropertyKey[];
4668
+ apply? (target: T, thisArg: any, argArray?: any): any;
4669
+ construct? (target: T, thisArg: any, argArray?: any): any;
4670
+ }
4671
+
4672
+ interface ProxyConstructor {
4673
+ revocable<T>(target: T, handler: ProxyHandler<T>): { proxy: T; revoke: () => void; };
4674
+ new <T>(target: T, handeler: ProxyHandler<T>): T
4675
+ }
4676
+ declare var Proxy: ProxyConstructor;
4677
+
4678
+ declare var Reflect: {
4679
+ apply(target: Function, thisArgument: any, argumentsList: ArrayLike<any>): any;
4680
+ construct(target: Function, argumentsList: ArrayLike<any>): any;
4681
+ defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean;
4682
+ deleteProperty(target: any, propertyKey: PropertyKey): boolean;
4683
+ enumerate(target: any): Iterator<any>;
4684
+ get(target: any, propertyKey: PropertyKey, receiver?: any): any;
4685
+ getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor;
4686
+ getPrototypeOf(target: any): any;
4687
+ has(target: any, propertyKey: string): boolean;
4688
+ has(target: any, propertyKey: Symbol): boolean;
4689
+ isExtensible(target: any): boolean;
4690
+ ownKeys(target: any): Array<PropertyKey>;
4691
+ preventExtensions(target: any): boolean;
4692
+ set(target: any, propertyKey: PropertyKey, value: any, receiver? :any): boolean;
4693
+ setPrototypeOf(target: any, proto: any): boolean;
4694
+ };
4695
+
4696
+ /**
4697
+ * Represents the completion of an asynchronous operation
4698
+ */
4699
+ interface Promise<T> {
4700
+ /**
4701
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
4702
+ * @param onfulfilled The callback to execute when the Promise is resolved.
4703
+ * @param onrejected The callback to execute when the Promise is rejected.
4704
+ * @returns A Promise for the completion of which ever callback is executed.
4705
+ */
4706
+ then<TResult>(onfulfilled?: (value: T) => TResult | Promise<TResult>, onrejected?: (reason: any) => TResult | Promise<TResult>): Promise<TResult>;
4707
+
4708
+ /**
4709
+ * Attaches a callback for only the rejection of the Promise.
4710
+ * @param onrejected The callback to execute when the Promise is rejected.
4711
+ * @returns A Promise for the completion of the callback.
4712
+ */
4713
+ catch(onrejected?: (reason: any) => T | Promise<T>): Promise<T>;
4714
+ }
4715
+
4716
+ interface PromiseConstructor {
4717
+ /**
4718
+ * A reference to the prototype.
4719
+ */
4720
+ prototype: Promise<any>;
4721
+
4722
+ /**
4723
+ * Creates a new Promise.
4724
+ * @param init A callback used to initialize the promise. This callback is passed two arguments:
4725
+ * a resolve callback used resolve the promise with a value or the result of another promise,
4726
+ * and a reject callback used to reject the promise with a provided reason or error.
4727
+ */
4728
+ new <T>(init: (resolve: (value?: T | Promise<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
4729
+
4730
+ <T>(init: (resolve: (value?: T | Promise<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
4731
+
4732
+ /**
4733
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
4734
+ * resolve, or rejected when any Promise is rejected.
4735
+ * @param values An array of Promises.
4736
+ * @returns A new Promise.
4737
+ */
4738
+ all<T>(values: (T | Promise<T>)[]): Promise<T[]>;
4739
+
4740
+ /**
4741
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
4742
+ * resolve, or rejected when any Promise is rejected.
4743
+ * @param values An array of values.
4744
+ * @returns A new Promise.
4745
+ */
4746
+ all(values: Promise<void>[]): Promise<void>;
4747
+
4748
+ /**
4749
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
4750
+ * or rejected.
4751
+ * @param values An array of Promises.
4752
+ * @returns A new Promise.
4753
+ */
4754
+ race<T>(values: (T | Promise<T>)[]): Promise<T>;
4755
+
4756
+ /**
4757
+ * Creates a new rejected promise for the provided reason.
4758
+ * @param reason The reason the promise was rejected.
4759
+ * @returns A new rejected Promise.
4760
+ */
4761
+ reject(reason: any): Promise<void>;
4762
+
4763
+ /**
4764
+ * Creates a new rejected promise for the provided reason.
4765
+ * @param reason The reason the promise was rejected.
4766
+ * @returns A new rejected Promise.
4767
+ */
4768
+ reject<T>(reason: any): Promise<T>;
4769
+
4770
+ /**
4771
+ * Creates a new resolved promise for the provided value.
4772
+ * @param value A promise.
4773
+ * @returns A promise whose internal state matches the provided promise.
4774
+ */
4775
+ resolve<T>(value: T | Promise<T>): Promise<T>;
4776
+
4777
+ /**
4778
+ * Creates a new resolved promise .
4779
+ * @returns A resolved promise.
4780
+ */
4781
+ resolve(): Promise<void>;
4782
+ }
4783
+
4784
+ declare var Promise: PromiseConstructor;
4785
+
4786
+ interface ArrayBufferView {
4787
+ /**
4788
+ * The ArrayBuffer instance referenced by the array.
4789
+ */
4790
+ buffer: ArrayBuffer;
4791
+
4792
+ /**
4793
+ * The length in bytes of the array.
4794
+ */
4795
+ byteLength: number;
4796
+
4797
+ /**
4798
+ * The offset in bytes of the array.
4799
+ */
4800
+ byteOffset: number;
4801
+ }