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
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.
12 See the Apache Version 2.0 License for specific language governing permissions
13 and limitations under the License.
14 ***************************************************************************** */
18 /// <reference no-default-lib="true"/>
\r
21 interface BigIntToLocaleStringOptions {
\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
25 localeMatcher?: string;
\r
27 * The formatting style to use , the default is "decimal".
\r
31 numberingSystem?: string;
\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
38 * The unit formatting style to use in unit formatting, the defaults is "short".
\r
40 unitDisplay?: string;
\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
48 * How to display the currency in currency formatting. It is only used when [[Style]] has the value "currency". The default is "symbol".
\r
50 * "symbol" to use a localized currency symbol such as €,
\r
52 * "code" to use the ISO currency code,
\r
54 * "name" to use a localized currency name such as "dollar"
\r
56 currencyDisplay?: string;
\r
59 * Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. The default is true.
\r
61 useGrouping?: boolean;
\r
64 * The minimum number of integer digits to use. Possible values are from 1 to 21; the default is 1.
\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
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
71 minimumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20;
\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
76 maximumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20;
\r
79 * The minimum number of significant digits to use. Possible values are from 1 to 21; the default is 1.
\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
84 * The maximum number of significant digits to use. Possible values are from 1 to 21; the default is 21.
\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
89 * The formatting that should be displayed for the number, the defaults is "standard"
\r
91 * "standard" plain number formatting
\r
93 * "scientific" return the order-of-magnitude for formatted number.
\r
95 * "engineering" return the exponent of ten when divisible by three
\r
97 * "compact" string representing exponent, defaults is using the "short" form
\r
102 * used only when notation is "compact"
\r
104 compactDisplay?: string;
\r
109 * Returns a string representation of an object.
\r
110 * @param radix Specifies a radix for converting numeric values to strings.
\r
112 toString(radix?: number): string;
\r
114 /** Returns a string representation appropriate to the host environment's current locale. */
\r
115 toLocaleString(locales?: string, options?: BigIntToLocaleStringOptions): string;
\r
117 /** Returns the primitive value of the specified object. */
\r
120 readonly [Symbol.toStringTag]: "BigInt";
\r
123 interface BigIntConstructor {
\r
124 (value?: any): bigint;
\r
125 readonly prototype: BigInt;
\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
133 asIntN(bits: number, int: bigint): bigint;
\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
140 asUintN(bits: number, int: bigint): bigint;
\r
143 declare var BigInt: BigIntConstructor;
\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
149 interface BigInt64Array {
\r
150 /** The size in bytes of each element in the array. */
\r
151 readonly BYTES_PER_ELEMENT: number;
\r
153 /** The ArrayBuffer instance referenced by the array. */
\r
154 readonly buffer: ArrayBufferLike;
\r
156 /** The length in bytes of the array. */
\r
157 readonly byteLength: number;
\r
159 /** The offset in bytes of the array. */
\r
160 readonly byteOffset: number;
\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
171 copyWithin(target: number, start: number, end?: number): this;
\r
173 /** Yields index, value pairs for every entry in the array. */
\r
174 entries(): IterableIterator<[number, bigint]>;
\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
184 every(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean;
\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
194 fill(value: bigint, start?: number, end?: number): this;
\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
203 filter(predicate: (value: bigint, index: number, array: BigInt64Array) => any, thisArg?: any): BigInt64Array;
\r
206 * Returns the value of the first element in the array where predicate is true, and undefined
\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
214 find(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): bigint | undefined;
\r
217 * Returns the index of the first element in the array where predicate is true, and -1
\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
225 findIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): number;
\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
234 forEach(callbackfn: (value: bigint, index: number, array: BigInt64Array) => void, thisArg?: any): void;
\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
241 includes(searchElement: bigint, fromIndex?: number): boolean;
\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
249 indexOf(searchElement: bigint, fromIndex?: number): number;
\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
256 join(separator?: string): string;
\r
258 /** Yields each index in the array. */
\r
259 keys(): IterableIterator<number>;
\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
267 lastIndexOf(searchElement: bigint, fromIndex?: number): number;
\r
269 /** The length of the array. */
\r
270 readonly length: number;
\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
280 map(callbackfn: (value: bigint, index: number, array: BigInt64Array) => bigint, thisArg?: any): BigInt64Array;
\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
292 reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint;
\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
304 reduce<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U;
\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
316 reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint;
\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
328 reduceRight<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U;
\r
330 /** Reverses the elements in the array. */
\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
338 set(array: ArrayLike<bigint>, offset?: number): void;
\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
345 slice(start?: number, end?: number): BigInt64Array;
\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
355 some(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean;
\r
359 * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order.
\r
361 sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this;
\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
369 subarray(begin?: number, end?: number): BigInt64Array;
\r
371 /** Converts the array to a string by using the current locale. */
\r
372 toLocaleString(): string;
\r
374 /** Returns a string representation of the array. */
\r
375 toString(): string;
\r
377 /** Returns the primitive value of the specified object. */
\r
378 valueOf(): BigInt64Array;
\r
380 /** Yields each value in the array. */
\r
381 values(): IterableIterator<bigint>;
\r
383 [Symbol.iterator](): IterableIterator<bigint>;
\r
385 readonly [Symbol.toStringTag]: "BigInt64Array";
\r
387 [index: number]: bigint;
\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
396 /** The size in bytes of each element in the array. */
\r
397 readonly BYTES_PER_ELEMENT: number;
\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
403 of(...items: bigint[]): BigInt64Array;
\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
411 from(arrayLike: ArrayLike<bigint>): BigInt64Array;
\r
412 from<U>(arrayLike: ArrayLike<U>, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array;
\r
415 declare var BigInt64Array: BigInt64ArrayConstructor;
\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
421 interface BigUint64Array {
\r
422 /** The size in bytes of each element in the array. */
\r
423 readonly BYTES_PER_ELEMENT: number;
\r
425 /** The ArrayBuffer instance referenced by the array. */
\r
426 readonly buffer: ArrayBufferLike;
\r
428 /** The length in bytes of the array. */
\r
429 readonly byteLength: number;
\r
431 /** The offset in bytes of the array. */
\r
432 readonly byteOffset: number;
\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
443 copyWithin(target: number, start: number, end?: number): this;
\r
445 /** Yields index, value pairs for every entry in the array. */
\r
446 entries(): IterableIterator<[number, bigint]>;
\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
456 every(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean;
\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
466 fill(value: bigint, start?: number, end?: number): this;
\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
475 filter(predicate: (value: bigint, index: number, array: BigUint64Array) => any, thisArg?: any): BigUint64Array;
\r
478 * Returns the value of the first element in the array where predicate is true, and undefined
\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
486 find(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): bigint | undefined;
\r
489 * Returns the index of the first element in the array where predicate is true, and -1
\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
497 findIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): number;
\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
506 forEach(callbackfn: (value: bigint, index: number, array: BigUint64Array) => void, thisArg?: any): void;
\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
513 includes(searchElement: bigint, fromIndex?: number): boolean;
\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
521 indexOf(searchElement: bigint, fromIndex?: number): number;
\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
528 join(separator?: string): string;
\r
530 /** Yields each index in the array. */
\r
531 keys(): IterableIterator<number>;
\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
539 lastIndexOf(searchElement: bigint, fromIndex?: number): number;
\r
541 /** The length of the array. */
\r
542 readonly length: number;
\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
552 map(callbackfn: (value: bigint, index: number, array: BigUint64Array) => bigint, thisArg?: any): BigUint64Array;
\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
564 reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint;
\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
576 reduce<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U;
\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
588 reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint;
\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
600 reduceRight<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U;
\r
602 /** Reverses the elements in the array. */
\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
610 set(array: ArrayLike<bigint>, offset?: number): void;
\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
617 slice(start?: number, end?: number): BigUint64Array;
\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
627 some(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean;
\r
631 * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order.
\r
633 sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this;
\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
641 subarray(begin?: number, end?: number): BigUint64Array;
\r
643 /** Converts the array to a string by using the current locale. */
\r
644 toLocaleString(): string;
\r
646 /** Returns a string representation of the array. */
\r
647 toString(): string;
\r
649 /** Returns the primitive value of the specified object. */
\r
650 valueOf(): BigUint64Array;
\r
652 /** Yields each value in the array. */
\r
653 values(): IterableIterator<bigint>;
\r
655 [Symbol.iterator](): IterableIterator<bigint>;
\r
657 readonly [Symbol.toStringTag]: "BigUint64Array";
\r
659 [index: number]: bigint;
\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
668 /** The size in bytes of each element in the array. */
\r
669 readonly BYTES_PER_ELEMENT: number;
\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
675 of(...items: bigint[]): BigUint64Array;
\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
683 from(arrayLike: ArrayLike<bigint>): BigUint64Array;
\r
684 from<U>(arrayLike: ArrayLike<U>, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigUint64Array;
\r
687 declare var BigUint64Array: BigUint64ArrayConstructor;
\r
689 interface DataView {
\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
695 getBigInt64(byteOffset: number, littleEndian?: boolean): bigint;
\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
702 getBigUint64(byteOffset: number, littleEndian?: boolean): bigint;
\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
711 setBigInt64(byteOffset: number, value: bigint, littleEndian?: boolean): void;
\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
720 setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void;
\r
723 declare namespace Intl{
\r
724 interface NumberFormat {
\r
725 format(value: number | bigint): string;
\r
726 resolvedOptions(): ResolvedNumberFormatOptions;
\r