/
githubmirror
/
TypeScript
Обзор
Документация
Войти
/
githubmirror
/
TypeScript
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/lib/es2022.array.d.ts
103 строки
4 KB
Ron Buckton
Make typed arrays generic over `ArrayBufferLike` (#59417)
24 сен 2024, 19:17
Не верифицирован
24 сен 2024, 19:17
e5758ab
Код
Авторство
О чём код?
interface Array<T> { /** * 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): T | undefined; } interface ReadonlyArray<T> { /** * 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): T | undefined; } interface Int8Array<TArrayBuffer extends ArrayBufferLike> { /** * 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; } interface Uint8Array<TArrayBuffer extends ArrayBufferLike> { /** * 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; } interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike> { /** * 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; } interface Int16Array<TArrayBuffer extends ArrayBufferLike> { /** * 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; } interface Uint16Array<TArrayBuffer extends ArrayBufferLike> { /** * 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; } interface Int32Array<TArrayBuffer extends ArrayBufferLike> { /** * 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; } interface Uint32Array<TArrayBuffer extends ArrayBufferLike> { /** * 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; } interface Float32Array<TArrayBuffer extends ArrayBufferLike> { /** * 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; } interface Float64Array<TArrayBuffer extends ArrayBufferLike> { /** * 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; } interface BigInt64Array<TArrayBuffer extends ArrayBufferLike> { /** * 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): bigint | undefined; } interface BigUint64Array<TArrayBuffer extends ArrayBufferLike> { /** * 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): bigint | undefined; }