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 |
|
18 | /// <reference no-default-lib="true"/>
|
19 |
|
20 |
|
21 | interface 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 |
|
29 | interface 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 |
|
37 | interface 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 |
|
45 | interface 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 |
|
53 | interface 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 |
|
61 | interface 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 |
|
69 | interface 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 |
|
77 | interface 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 |
|
85 | interface 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 |
|
93 | interface 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 |
|
101 | interface 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 |
|
109 | interface 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 |
|
117 | interface 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 | }
|