lib.es2022.array.d.ts (4676B)
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 6 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. 11 12 See the Apache Version 2.0 License for specific language governing permissions 13 and limitations under the License. 14 ***************************************************************************** */ 15 16 17 /// <reference no-default-lib="true"/> 18 19 interface Array<T> { 20 /** 21 * Returns the item located at the specified index. 22 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. 23 */ 24 at(index: number): T | undefined; 25 } 26 27 interface ReadonlyArray<T> { 28 /** 29 * Returns the item located at the specified index. 30 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. 31 */ 32 at(index: number): T | undefined; 33 } 34 35 interface Int8Array<TArrayBuffer extends ArrayBufferLike> { 36 /** 37 * Returns the item located at the specified index. 38 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. 39 */ 40 at(index: number): number | undefined; 41 } 42 43 interface Uint8Array<TArrayBuffer extends ArrayBufferLike> { 44 /** 45 * Returns the item located at the specified index. 46 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. 47 */ 48 at(index: number): number | undefined; 49 } 50 51 interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike> { 52 /** 53 * Returns the item located at the specified index. 54 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. 55 */ 56 at(index: number): number | undefined; 57 } 58 59 interface Int16Array<TArrayBuffer extends ArrayBufferLike> { 60 /** 61 * Returns the item located at the specified index. 62 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. 63 */ 64 at(index: number): number | undefined; 65 } 66 67 interface Uint16Array<TArrayBuffer extends ArrayBufferLike> { 68 /** 69 * Returns the item located at the specified index. 70 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. 71 */ 72 at(index: number): number | undefined; 73 } 74 75 interface Int32Array<TArrayBuffer extends ArrayBufferLike> { 76 /** 77 * Returns the item located at the specified index. 78 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. 79 */ 80 at(index: number): number | undefined; 81 } 82 83 interface Uint32Array<TArrayBuffer extends ArrayBufferLike> { 84 /** 85 * Returns the item located at the specified index. 86 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. 87 */ 88 at(index: number): number | undefined; 89 } 90 91 interface Float32Array<TArrayBuffer extends ArrayBufferLike> { 92 /** 93 * Returns the item located at the specified index. 94 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. 95 */ 96 at(index: number): number | undefined; 97 } 98 99 interface Float64Array<TArrayBuffer extends ArrayBufferLike> { 100 /** 101 * Returns the item located at the specified index. 102 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. 103 */ 104 at(index: number): number | undefined; 105 } 106 107 interface BigInt64Array<TArrayBuffer extends ArrayBufferLike> { 108 /** 109 * Returns the item located at the specified index. 110 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. 111 */ 112 at(index: number): bigint | undefined; 113 } 114 115 interface BigUint64Array<TArrayBuffer extends ArrayBufferLike> { 116 /** 117 * Returns the item located at the specified index. 118 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item. 119 */ 120 at(index: number): bigint | undefined; 121 }