Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-html / node_modules / typescript / lib / lib.es2020.bigint.d.ts
1 /*! *****************************************************************************
2 Copyright (c) Microsoft Corporation. All rights reserved.
3 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4 this file except in compliance with the License. You may obtain a copy of the
5 License at http://www.apache.org/licenses/LICENSE-2.0
6
7 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10 MERCHANTABLITY OR NON-INFRINGEMENT.
11
12 See the Apache Version 2.0 License for specific language governing permissions
13 and limitations under the License.
14 ***************************************************************************** */
15
16
17
18 /// <reference no-default-lib="true"/>\r
19
20
21 interface BigIntToLocaleStringOptions {\r
22     /**\r
23      * The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation Intl page}.\r
24      */\r
25     localeMatcher?: string;\r
26     /**\r
27      * The formatting style to use , the default is "decimal".\r
28      */\r
29     style?: string;\r
30 \r
31     numberingSystem?: string;\r
32     /**\r
33      * The unit to use in unit formatting, Possible values are core unit identifiers, defined in UTS #35, Part 2, Section 6. A subset of units from the full list was selected for use in ECMAScript. Pairs of simple units can be concatenated with "-per-" to make a compound unit. There is no default value; if the style is "unit", the unit property must be provided.\r
34      */\r
35     unit?: string;\r
36 \r
37     /**\r
38      * The unit formatting style to use in unit formatting, the defaults is "short".\r
39      */\r
40     unitDisplay?: string;\r
41 \r
42     /**\r
43      * The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB — see the Current currency & funds code list. There is no default value; if the style is "currency", the currency property must be provided. It is only used when [[Style]] has the value "currency".\r
44      */\r
45     currency?: string;\r
46 \r
47     /**\r
48      * How to display the currency in currency formatting. It is only used when [[Style]] has the value "currency". The default is "symbol".\r
49      *\r
50      * "symbol" to use a localized currency symbol such as €,\r
51      *\r
52      * "code" to use the ISO currency code,\r
53      *\r
54      * "name" to use a localized currency name such as "dollar"\r
55      */\r
56     currencyDisplay?: string;\r
57 \r
58     /**\r
59      * Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. The default is true.\r
60      */\r
61     useGrouping?: boolean;\r
62 \r
63     /**\r
64      * The minimum number of integer digits to use. Possible values are from 1 to 21; the default is 1.\r
65      */\r
66     minimumIntegerDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21;\r
67 \r
68     /**\r
69      * The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information).\r
70      */\r
71     minimumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20;\r
72 \r
73     /**\r
74      * The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information); the default for percent formatting is the larger of minimumFractionDigits and 0.\r
75      */\r
76     maximumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20;\r
77 \r
78     /**\r
79      * The minimum number of significant digits to use. Possible values are from 1 to 21; the default is 1.\r
80      */\r
81     minimumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21;\r
82 \r
83     /**\r
84      * The maximum number of significant digits to use. Possible values are from 1 to 21; the default is 21.\r
85      */\r
86     maximumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21;\r
87 \r
88     /**\r
89      * The formatting that should be displayed for the number, the defaults is "standard"\r
90      *\r
91      *     "standard" plain number formatting\r
92      *\r
93      *     "scientific" return the order-of-magnitude for formatted number.\r
94      *\r
95      *     "engineering" return the exponent of ten when divisible by three\r
96      *\r
97      *     "compact" string representing exponent, defaults is using the "short" form\r
98      */\r
99     notation?: string;\r
100 \r
101     /**\r
102      * used only when notation is "compact"\r
103      */\r
104     compactDisplay?: string;\r
105 }\r
106 \r
107 interface BigInt {\r
108     /**\r
109      * Returns a string representation of an object.\r
110      * @param radix Specifies a radix for converting numeric values to strings.\r
111      */\r
112     toString(radix?: number): string;\r
113 \r
114     /** Returns a string representation appropriate to the host environment's current locale. */\r
115     toLocaleString(locales?: string, options?: BigIntToLocaleStringOptions): string;\r
116 \r
117     /** Returns the primitive value of the specified object. */\r
118     valueOf(): bigint;\r
119 \r
120     readonly [Symbol.toStringTag]: "BigInt";\r
121 }\r
122 \r
123 interface BigIntConstructor {\r
124     (value?: any): bigint;\r
125     readonly prototype: BigInt;\r
126 \r
127     /**\r
128      * Interprets the low bits of a BigInt as a 2's-complement signed integer.\r
129      * All higher bits are discarded.\r
130      * @param bits The number of low bits to use\r
131      * @param int The BigInt whose bits to extract\r
132      */\r
133     asIntN(bits: number, int: bigint): bigint;\r
134     /**\r
135      * Interprets the low bits of a BigInt as an unsigned integer.\r
136      * All higher bits are discarded.\r
137      * @param bits The number of low bits to use\r
138      * @param int The BigInt whose bits to extract\r
139      */\r
140     asUintN(bits: number, int: bigint): bigint;\r
141 }\r
142 \r
143 declare var BigInt: BigIntConstructor;\r
144 \r
145 /**\r
146  * A typed array of 64-bit signed integer values. The contents are initialized to 0. If the\r
147  * requested number of bytes could not be allocated, an exception is raised.\r
148  */\r
149 interface BigInt64Array {\r
150     /** The size in bytes of each element in the array. */\r
151     readonly BYTES_PER_ELEMENT: number;\r
152 \r
153     /** The ArrayBuffer instance referenced by the array. */\r
154     readonly buffer: ArrayBufferLike;\r
155 \r
156     /** The length in bytes of the array. */\r
157     readonly byteLength: number;\r
158 \r
159     /** The offset in bytes of the array. */\r
160     readonly byteOffset: number;\r
161 \r
162     /**\r
163      * Returns the this object after copying a section of the array identified by start and end\r
164      * to the same array starting at position target\r
165      * @param target If target is negative, it is treated as length+target where length is the\r
166      * length of the array.\r
167      * @param start If start is negative, it is treated as length+start. If end is negative, it\r
168      * is treated as length+end.\r
169      * @param end If not specified, length of the this object is used as its default value.\r
170      */\r
171     copyWithin(target: number, start: number, end?: number): this;\r
172 \r
173     /** Yields index, value pairs for every entry in the array. */\r
174     entries(): IterableIterator<[number, bigint]>;\r
175 \r
176     /**\r
177      * Determines whether all the members of an array satisfy the specified test.\r
178      * @param predicate A function that accepts up to three arguments. The every method calls\r
179      * the predicate function for each element in the array until the predicate returns false,\r
180      * or until the end of the array.\r
181      * @param thisArg An object to which the this keyword can refer in the predicate function.\r
182      * If thisArg is omitted, undefined is used as the this value.\r
183      */\r
184     every(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean;\r
185 \r
186     /**\r
187      * Returns the this object after filling the section identified by start and end with value\r
188      * @param value value to fill array section with\r
189      * @param start index to start filling the array at. If start is negative, it is treated as\r
190      * length+start where length is the length of the array.\r
191      * @param end index to stop filling the array at. If end is negative, it is treated as\r
192      * length+end.\r
193      */\r
194     fill(value: bigint, start?: number, end?: number): this;\r
195 \r
196     /**\r
197      * Returns the elements of an array that meet the condition specified in a callback function.\r
198      * @param predicate A function that accepts up to three arguments. The filter method calls\r
199      * the predicate function one time for each element in the array.\r
200      * @param thisArg An object to which the this keyword can refer in the predicate function.\r
201      * If thisArg is omitted, undefined is used as the this value.\r
202      */\r
203     filter(predicate: (value: bigint, index: number, array: BigInt64Array) => any, thisArg?: any): BigInt64Array;\r
204 \r
205     /**\r
206      * Returns the value of the first element in the array where predicate is true, and undefined\r
207      * otherwise.\r
208      * @param predicate find calls predicate once for each element of the array, in ascending\r
209      * order, until it finds one where predicate returns true. If such an element is found, find\r
210      * immediately returns that element value. Otherwise, find returns undefined.\r
211      * @param thisArg If provided, it will be used as the this value for each invocation of\r
212      * predicate. If it is not provided, undefined is used instead.\r
213      */\r
214     find(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): bigint | undefined;\r
215 \r
216     /**\r
217      * Returns the index of the first element in the array where predicate is true, and -1\r
218      * otherwise.\r
219      * @param predicate find calls predicate once for each element of the array, in ascending\r
220      * order, until it finds one where predicate returns true. If such an element is found,\r
221      * findIndex immediately returns that element index. Otherwise, findIndex returns -1.\r
222      * @param thisArg If provided, it will be used as the this value for each invocation of\r
223      * predicate. If it is not provided, undefined is used instead.\r
224      */\r
225     findIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): number;\r
226 \r
227     /**\r
228      * Performs the specified action for each element in an array.\r
229      * @param callbackfn A function that accepts up to three arguments. forEach calls the\r
230      * callbackfn function one time for each element in the array.\r
231      * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r
232      * If thisArg is omitted, undefined is used as the this value.\r
233      */\r
234     forEach(callbackfn: (value: bigint, index: number, array: BigInt64Array) => void, thisArg?: any): void;\r
235 \r
236     /**\r
237      * Determines whether an array includes a certain element, returning true or false as appropriate.\r
238      * @param searchElement The element to search for.\r
239      * @param fromIndex The position in this array at which to begin searching for searchElement.\r
240      */\r
241     includes(searchElement: bigint, fromIndex?: number): boolean;\r
242 \r
243     /**\r
244      * Returns the index of the first occurrence of a value in an array.\r
245      * @param searchElement The value to locate in the array.\r
246      * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r
247      * search starts at index 0.\r
248      */\r
249     indexOf(searchElement: bigint, fromIndex?: number): number;\r
250 \r
251     /**\r
252      * Adds all the elements of an array separated by the specified separator string.\r
253      * @param separator A string used to separate one element of an array from the next in the\r
254      * resulting String. If omitted, the array elements are separated with a comma.\r
255      */\r
256     join(separator?: string): string;\r
257 \r
258     /** Yields each index in the array. */\r
259     keys(): IterableIterator<number>;\r
260 \r
261     /**\r
262      * Returns the index of the last occurrence of a value in an array.\r
263      * @param searchElement The value to locate in the array.\r
264      * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r
265      * search starts at index 0.\r
266      */\r
267     lastIndexOf(searchElement: bigint, fromIndex?: number): number;\r
268 \r
269     /** The length of the array. */\r
270     readonly length: number;\r
271 \r
272     /**\r
273      * Calls a defined callback function on each element of an array, and returns an array that\r
274      * contains the results.\r
275      * @param callbackfn A function that accepts up to three arguments. The map method calls the\r
276      * callbackfn function one time for each element in the array.\r
277      * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r
278      * If thisArg is omitted, undefined is used as the this value.\r
279      */\r
280     map(callbackfn: (value: bigint, index: number, array: BigInt64Array) => bigint, thisArg?: any): BigInt64Array;\r
281 \r
282     /**\r
283      * Calls the specified callback function for all the elements in an array. The return value of\r
284      * the callback function is the accumulated result, and is provided as an argument in the next\r
285      * call to the callback function.\r
286      * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r
287      * callbackfn function one time for each element in the array.\r
288      * @param initialValue If initialValue is specified, it is used as the initial value to start\r
289      * the accumulation. The first call to the callbackfn function provides this value as an argument\r
290      * instead of an array value.\r
291      */\r
292     reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint;\r
293 \r
294     /**\r
295      * Calls the specified callback function for all the elements in an array. The return value of\r
296      * the callback function is the accumulated result, and is provided as an argument in the next\r
297      * call to the callback function.\r
298      * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r
299      * callbackfn function one time for each element in the array.\r
300      * @param initialValue If initialValue is specified, it is used as the initial value to start\r
301      * the accumulation. The first call to the callbackfn function provides this value as an argument\r
302      * instead of an array value.\r
303      */\r
304     reduce<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U;\r
305 \r
306     /**\r
307      * Calls the specified callback function for all the elements in an array, in descending order.\r
308      * The return value of the callback function is the accumulated result, and is provided as an\r
309      * argument in the next call to the callback function.\r
310      * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r
311      * the callbackfn function one time for each element in the array.\r
312      * @param initialValue If initialValue is specified, it is used as the initial value to start\r
313      * the accumulation. The first call to the callbackfn function provides this value as an\r
314      * argument instead of an array value.\r
315      */\r
316     reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint;\r
317 \r
318     /**\r
319      * Calls the specified callback function for all the elements in an array, in descending order.\r
320      * The return value of the callback function is the accumulated result, and is provided as an\r
321      * argument in the next call to the callback function.\r
322      * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r
323      * the callbackfn function one time for each element in the array.\r
324      * @param initialValue If initialValue is specified, it is used as the initial value to start\r
325      * the accumulation. The first call to the callbackfn function provides this value as an argument\r
326      * instead of an array value.\r
327      */\r
328     reduceRight<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U;\r
329 \r
330     /** Reverses the elements in the array. */\r
331     reverse(): this;\r
332 \r
333     /**\r
334      * Sets a value or an array of values.\r
335      * @param array A typed or untyped array of values to set.\r
336      * @param offset The index in the current array at which the values are to be written.\r
337      */\r
338     set(array: ArrayLike<bigint>, offset?: number): void;\r
339 \r
340     /**\r
341      * Returns a section of an array.\r
342      * @param start The beginning of the specified portion of the array.\r
343      * @param end The end of the specified portion of the array.\r
344      */\r
345     slice(start?: number, end?: number): BigInt64Array;\r
346 \r
347     /**\r
348      * Determines whether the specified callback function returns true for any element of an array.\r
349      * @param predicate A function that accepts up to three arguments. The some method calls the\r
350      * predicate function for each element in the array until the predicate returns true, or until\r
351      * the end of the array.\r
352      * @param thisArg An object to which the this keyword can refer in the predicate function.\r
353      * If thisArg is omitted, undefined is used as the this value.\r
354      */\r
355     some(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean;\r
356 \r
357     /**\r
358      * Sorts the array.\r
359      * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order.\r
360      */\r
361     sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this;\r
362 \r
363     /**\r
364      * Gets a new BigInt64Array view of the ArrayBuffer store for this array, referencing the elements\r
365      * at begin, inclusive, up to end, exclusive.\r
366      * @param begin The index of the beginning of the array.\r
367      * @param end The index of the end of the array.\r
368      */\r
369     subarray(begin?: number, end?: number): BigInt64Array;\r
370 \r
371     /** Converts the array to a string by using the current locale. */\r
372     toLocaleString(): string;\r
373 \r
374     /** Returns a string representation of the array. */\r
375     toString(): string;\r
376 \r
377     /** Returns the primitive value of the specified object. */\r
378     valueOf(): BigInt64Array;\r
379 \r
380     /** Yields each value in the array. */\r
381     values(): IterableIterator<bigint>;\r
382 \r
383     [Symbol.iterator](): IterableIterator<bigint>;\r
384 \r
385     readonly [Symbol.toStringTag]: "BigInt64Array";\r
386 \r
387     [index: number]: bigint;\r
388 }\r
389 \r
390 interface BigInt64ArrayConstructor {\r
391     readonly prototype: BigInt64Array;\r
392     new(length?: number): BigInt64Array;\r
393     new(array: Iterable<bigint>): BigInt64Array;\r
394     new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigInt64Array;\r
395 \r
396     /** The size in bytes of each element in the array. */\r
397     readonly BYTES_PER_ELEMENT: number;\r
398 \r
399     /**\r
400      * Returns a new array from a set of elements.\r
401      * @param items A set of elements to include in the new array object.\r
402      */\r
403     of(...items: bigint[]): BigInt64Array;\r
404 \r
405     /**\r
406      * Creates an array from an array-like or iterable object.\r
407      * @param arrayLike An array-like or iterable object to convert to an array.\r
408      * @param mapfn A mapping function to call on every element of the array.\r
409      * @param thisArg Value of 'this' used to invoke the mapfn.\r
410      */\r
411     from(arrayLike: ArrayLike<bigint>): BigInt64Array;\r
412     from<U>(arrayLike: ArrayLike<U>, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array;\r
413 }\r
414 \r
415 declare var BigInt64Array: BigInt64ArrayConstructor;\r
416 \r
417 /**\r
418  * A typed array of 64-bit unsigned integer values. The contents are initialized to 0. If the\r
419  * requested number of bytes could not be allocated, an exception is raised.\r
420  */\r
421 interface BigUint64Array {\r
422     /** The size in bytes of each element in the array. */\r
423     readonly BYTES_PER_ELEMENT: number;\r
424 \r
425     /** The ArrayBuffer instance referenced by the array. */\r
426     readonly buffer: ArrayBufferLike;\r
427 \r
428     /** The length in bytes of the array. */\r
429     readonly byteLength: number;\r
430 \r
431     /** The offset in bytes of the array. */\r
432     readonly byteOffset: number;\r
433 \r
434     /**\r
435      * Returns the this object after copying a section of the array identified by start and end\r
436      * to the same array starting at position target\r
437      * @param target If target is negative, it is treated as length+target where length is the\r
438      * length of the array.\r
439      * @param start If start is negative, it is treated as length+start. If end is negative, it\r
440      * is treated as length+end.\r
441      * @param end If not specified, length of the this object is used as its default value.\r
442      */\r
443     copyWithin(target: number, start: number, end?: number): this;\r
444 \r
445     /** Yields index, value pairs for every entry in the array. */\r
446     entries(): IterableIterator<[number, bigint]>;\r
447 \r
448     /**\r
449      * Determines whether all the members of an array satisfy the specified test.\r
450      * @param predicate A function that accepts up to three arguments. The every method calls\r
451      * the predicate function for each element in the array until the predicate returns false,\r
452      * or until the end of the array.\r
453      * @param thisArg An object to which the this keyword can refer in the predicate function.\r
454      * If thisArg is omitted, undefined is used as the this value.\r
455      */\r
456     every(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean;\r
457 \r
458     /**\r
459      * Returns the this object after filling the section identified by start and end with value\r
460      * @param value value to fill array section with\r
461      * @param start index to start filling the array at. If start is negative, it is treated as\r
462      * length+start where length is the length of the array.\r
463      * @param end index to stop filling the array at. If end is negative, it is treated as\r
464      * length+end.\r
465      */\r
466     fill(value: bigint, start?: number, end?: number): this;\r
467 \r
468     /**\r
469      * Returns the elements of an array that meet the condition specified in a callback function.\r
470      * @param predicate A function that accepts up to three arguments. The filter method calls\r
471      * the predicate function one time for each element in the array.\r
472      * @param thisArg An object to which the this keyword can refer in the predicate function.\r
473      * If thisArg is omitted, undefined is used as the this value.\r
474      */\r
475     filter(predicate: (value: bigint, index: number, array: BigUint64Array) => any, thisArg?: any): BigUint64Array;\r
476 \r
477     /**\r
478      * Returns the value of the first element in the array where predicate is true, and undefined\r
479      * otherwise.\r
480      * @param predicate find calls predicate once for each element of the array, in ascending\r
481      * order, until it finds one where predicate returns true. If such an element is found, find\r
482      * immediately returns that element value. Otherwise, find returns undefined.\r
483      * @param thisArg If provided, it will be used as the this value for each invocation of\r
484      * predicate. If it is not provided, undefined is used instead.\r
485      */\r
486     find(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): bigint | undefined;\r
487 \r
488     /**\r
489      * Returns the index of the first element in the array where predicate is true, and -1\r
490      * otherwise.\r
491      * @param predicate find calls predicate once for each element of the array, in ascending\r
492      * order, until it finds one where predicate returns true. If such an element is found,\r
493      * findIndex immediately returns that element index. Otherwise, findIndex returns -1.\r
494      * @param thisArg If provided, it will be used as the this value for each invocation of\r
495      * predicate. If it is not provided, undefined is used instead.\r
496      */\r
497     findIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): number;\r
498 \r
499     /**\r
500      * Performs the specified action for each element in an array.\r
501      * @param callbackfn A function that accepts up to three arguments. forEach calls the\r
502      * callbackfn function one time for each element in the array.\r
503      * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r
504      * If thisArg is omitted, undefined is used as the this value.\r
505      */\r
506     forEach(callbackfn: (value: bigint, index: number, array: BigUint64Array) => void, thisArg?: any): void;\r
507 \r
508     /**\r
509      * Determines whether an array includes a certain element, returning true or false as appropriate.\r
510      * @param searchElement The element to search for.\r
511      * @param fromIndex The position in this array at which to begin searching for searchElement.\r
512      */\r
513     includes(searchElement: bigint, fromIndex?: number): boolean;\r
514 \r
515     /**\r
516      * Returns the index of the first occurrence of a value in an array.\r
517      * @param searchElement The value to locate in the array.\r
518      * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r
519      * search starts at index 0.\r
520      */\r
521     indexOf(searchElement: bigint, fromIndex?: number): number;\r
522 \r
523     /**\r
524      * Adds all the elements of an array separated by the specified separator string.\r
525      * @param separator A string used to separate one element of an array from the next in the\r
526      * resulting String. If omitted, the array elements are separated with a comma.\r
527      */\r
528     join(separator?: string): string;\r
529 \r
530     /** Yields each index in the array. */\r
531     keys(): IterableIterator<number>;\r
532 \r
533     /**\r
534      * Returns the index of the last occurrence of a value in an array.\r
535      * @param searchElement The value to locate in the array.\r
536      * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the\r
537      * search starts at index 0.\r
538      */\r
539     lastIndexOf(searchElement: bigint, fromIndex?: number): number;\r
540 \r
541     /** The length of the array. */\r
542     readonly length: number;\r
543 \r
544     /**\r
545      * Calls a defined callback function on each element of an array, and returns an array that\r
546      * contains the results.\r
547      * @param callbackfn A function that accepts up to three arguments. The map method calls the\r
548      * callbackfn function one time for each element in the array.\r
549      * @param thisArg An object to which the this keyword can refer in the callbackfn function.\r
550      * If thisArg is omitted, undefined is used as the this value.\r
551      */\r
552     map(callbackfn: (value: bigint, index: number, array: BigUint64Array) => bigint, thisArg?: any): BigUint64Array;\r
553 \r
554     /**\r
555      * Calls the specified callback function for all the elements in an array. The return value of\r
556      * the callback function is the accumulated result, and is provided as an argument in the next\r
557      * call to the callback function.\r
558      * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r
559      * callbackfn function one time for each element in the array.\r
560      * @param initialValue If initialValue is specified, it is used as the initial value to start\r
561      * the accumulation. The first call to the callbackfn function provides this value as an argument\r
562      * instead of an array value.\r
563      */\r
564     reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint;\r
565 \r
566     /**\r
567      * Calls the specified callback function for all the elements in an array. The return value of\r
568      * the callback function is the accumulated result, and is provided as an argument in the next\r
569      * call to the callback function.\r
570      * @param callbackfn A function that accepts up to four arguments. The reduce method calls the\r
571      * callbackfn function one time for each element in the array.\r
572      * @param initialValue If initialValue is specified, it is used as the initial value to start\r
573      * the accumulation. The first call to the callbackfn function provides this value as an argument\r
574      * instead of an array value.\r
575      */\r
576     reduce<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U;\r
577 \r
578     /**\r
579      * Calls the specified callback function for all the elements in an array, in descending order.\r
580      * The return value of the callback function is the accumulated result, and is provided as an\r
581      * argument in the next call to the callback function.\r
582      * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r
583      * the callbackfn function one time for each element in the array.\r
584      * @param initialValue If initialValue is specified, it is used as the initial value to start\r
585      * the accumulation. The first call to the callbackfn function provides this value as an\r
586      * argument instead of an array value.\r
587      */\r
588     reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint;\r
589 \r
590     /**\r
591      * Calls the specified callback function for all the elements in an array, in descending order.\r
592      * The return value of the callback function is the accumulated result, and is provided as an\r
593      * argument in the next call to the callback function.\r
594      * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls\r
595      * the callbackfn function one time for each element in the array.\r
596      * @param initialValue If initialValue is specified, it is used as the initial value to start\r
597      * the accumulation. The first call to the callbackfn function provides this value as an argument\r
598      * instead of an array value.\r
599      */\r
600     reduceRight<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U;\r
601 \r
602     /** Reverses the elements in the array. */\r
603     reverse(): this;\r
604 \r
605     /**\r
606      * Sets a value or an array of values.\r
607      * @param array A typed or untyped array of values to set.\r
608      * @param offset The index in the current array at which the values are to be written.\r
609      */\r
610     set(array: ArrayLike<bigint>, offset?: number): void;\r
611 \r
612     /**\r
613      * Returns a section of an array.\r
614      * @param start The beginning of the specified portion of the array.\r
615      * @param end The end of the specified portion of the array.\r
616      */\r
617     slice(start?: number, end?: number): BigUint64Array;\r
618 \r
619     /**\r
620      * Determines whether the specified callback function returns true for any element of an array.\r
621      * @param predicate A function that accepts up to three arguments. The some method calls the\r
622      * predicate function for each element in the array until the predicate returns true, or until\r
623      * the end of the array.\r
624      * @param thisArg An object to which the this keyword can refer in the predicate function.\r
625      * If thisArg is omitted, undefined is used as the this value.\r
626      */\r
627     some(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean;\r
628 \r
629     /**\r
630      * Sorts the array.\r
631      * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order.\r
632      */\r
633     sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this;\r
634 \r
635     /**\r
636      * Gets a new BigUint64Array view of the ArrayBuffer store for this array, referencing the elements\r
637      * at begin, inclusive, up to end, exclusive.\r
638      * @param begin The index of the beginning of the array.\r
639      * @param end The index of the end of the array.\r
640      */\r
641     subarray(begin?: number, end?: number): BigUint64Array;\r
642 \r
643     /** Converts the array to a string by using the current locale. */\r
644     toLocaleString(): string;\r
645 \r
646     /** Returns a string representation of the array. */\r
647     toString(): string;\r
648 \r
649     /** Returns the primitive value of the specified object. */\r
650     valueOf(): BigUint64Array;\r
651 \r
652     /** Yields each value in the array. */\r
653     values(): IterableIterator<bigint>;\r
654 \r
655     [Symbol.iterator](): IterableIterator<bigint>;\r
656 \r
657     readonly [Symbol.toStringTag]: "BigUint64Array";\r
658 \r
659     [index: number]: bigint;\r
660 }\r
661 \r
662 interface BigUint64ArrayConstructor {\r
663     readonly prototype: BigUint64Array;\r
664     new(length?: number): BigUint64Array;\r
665     new(array: Iterable<bigint>): BigUint64Array;\r
666     new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigUint64Array;\r
667 \r
668     /** The size in bytes of each element in the array. */\r
669     readonly BYTES_PER_ELEMENT: number;\r
670 \r
671     /**\r
672      * Returns a new array from a set of elements.\r
673      * @param items A set of elements to include in the new array object.\r
674      */\r
675     of(...items: bigint[]): BigUint64Array;\r
676 \r
677     /**\r
678      * Creates an array from an array-like or iterable object.\r
679      * @param arrayLike An array-like or iterable object to convert to an array.\r
680      * @param mapfn A mapping function to call on every element of the array.\r
681      * @param thisArg Value of 'this' used to invoke the mapfn.\r
682      */\r
683     from(arrayLike: ArrayLike<bigint>): BigUint64Array;\r
684     from<U>(arrayLike: ArrayLike<U>, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigUint64Array;\r
685 }\r
686 \r
687 declare var BigUint64Array: BigUint64ArrayConstructor;\r
688 \r
689 interface DataView {\r
690     /**\r
691      * Gets the BigInt64 value at the specified byte offset from the start of the view. There is\r
692      * no alignment constraint; multi-byte values may be fetched from any offset.\r
693      * @param byteOffset The place in the buffer at which the value should be retrieved.\r
694      */\r
695     getBigInt64(byteOffset: number, littleEndian?: boolean): bigint;\r
696 \r
697     /**\r
698      * Gets the BigUint64 value at the specified byte offset from the start of the view. There is\r
699      * no alignment constraint; multi-byte values may be fetched from any offset.\r
700      * @param byteOffset The place in the buffer at which the value should be retrieved.\r
701      */\r
702     getBigUint64(byteOffset: number, littleEndian?: boolean): bigint;\r
703 \r
704     /**\r
705      * Stores a BigInt64 value at the specified byte offset from the start of the view.\r
706      * @param byteOffset The place in the buffer at which the value should be set.\r
707      * @param value The value to set.\r
708      * @param littleEndian If false or undefined, a big-endian value should be written,\r
709      * otherwise a little-endian value should be written.\r
710      */\r
711     setBigInt64(byteOffset: number, value: bigint, littleEndian?: boolean): void;\r
712 \r
713     /**\r
714      * Stores a BigUint64 value at the specified byte offset from the start of the view.\r
715      * @param byteOffset The place in the buffer at which the value should be set.\r
716      * @param value The value to set.\r
717      * @param littleEndian If false or undefined, a big-endian value should be written,\r
718      * otherwise a little-endian value should be written.\r
719      */\r
720     setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void;\r
721 }\r
722 \r
723 declare namespace Intl{\r
724     interface NumberFormat {\r
725         format(value: number | bigint): string;\r
726         resolvedOptions(): ResolvedNumberFormatOptions;\r
727     }\r
728 }\r