UNPKG

4.36 kBTypeScriptView Raw
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 Array<T> {
22 /**
23 * Returns the item located at the specified index.
24 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
25 */
26 at(index: number): T | undefined;
27}
28
29interface ReadonlyArray<T> {
30 /**
31 * Returns the item located at the specified index.
32 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
33 */
34 at(index: number): T | undefined;
35}
36
37interface Int8Array {
38 /**
39 * Returns the item located at the specified index.
40 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
41 */
42 at(index: number): number | undefined;
43}
44
45interface Uint8Array {
46 /**
47 * Returns the item located at the specified index.
48 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
49 */
50 at(index: number): number | undefined;
51}
52
53interface Uint8ClampedArray {
54 /**
55 * Returns the item located at the specified index.
56 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
57 */
58 at(index: number): number | undefined;
59}
60
61interface Int16Array {
62 /**
63 * Returns the item located at the specified index.
64 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
65 */
66 at(index: number): number | undefined;
67}
68
69interface Uint16Array {
70 /**
71 * Returns the item located at the specified index.
72 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
73 */
74 at(index: number): number | undefined;
75}
76
77interface Int32Array {
78 /**
79 * Returns the item located at the specified index.
80 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
81 */
82 at(index: number): number | undefined;
83}
84
85interface Uint32Array {
86 /**
87 * Returns the item located at the specified index.
88 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
89 */
90 at(index: number): number | undefined;
91}
92
93interface Float32Array {
94 /**
95 * Returns the item located at the specified index.
96 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
97 */
98 at(index: number): number | undefined;
99}
100
101interface Float64Array {
102 /**
103 * Returns the item located at the specified index.
104 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
105 */
106 at(index: number): number | undefined;
107}
108
109interface BigInt64Array {
110 /**
111 * Returns the item located at the specified index.
112 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
113 */
114 at(index: number): bigint | undefined;
115}
116
117interface BigUint64Array {
118 /**
119 * Returns the item located at the specified index.
120 * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
121 */
122 at(index: number): bigint | undefined;
123}