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