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