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