Big[U]Int64Array.at returns bigint, not number (#46733)

bigint is needed to represent all 64-bit ints that these arrays could
contain.
This commit is contained in:
Nathan Shively-Sanders
2021-11-08 09:50:02 -08:00
committed by GitHub
parent 3ef3cdddb3
commit 9713cc1a75
3 changed files with 14 additions and 14 deletions

View File

@@ -91,7 +91,7 @@ interface BigInt64Array {
* Returns the item located at the specified index.
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
*/
at(index: number): number | undefined;
at(index: number): bigint | undefined;
}
interface BigUint64Array {
@@ -99,5 +99,5 @@ interface BigUint64Array {
* Returns the item located at the specified index.
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
*/
at(index: number): number | undefined;
at(index: number): bigint | undefined;
}