20
20
21
21
/// <reference types="@stdlib/types"/>
22
22
23
- import { Collection , ArrayLike , AccessorArrayLike , Complex128Array , Complex64Array , ArrayIndexObject } from '@stdlib/types/array' ;
23
+ import { Collection , ArrayLike , AccessorArrayLike , ComplexTypedArray , TypedArray , BooleanTypedArray , ArrayIndexObject } from '@stdlib/types/array' ;
24
24
import ArrayIndex = require( '@stdlib/array/index' ) ;
25
25
26
26
/**
@@ -74,17 +74,6 @@ interface Array2Fancy {
74
74
*
75
75
* var v = y[ ':' ];
76
76
* // returns <Float64Array>[ 1.0, 2.0, 3.0, 4.0 ]
77
- */
78
- ( x : Float64Array , options ?: Options ) : Float64Array ;
79
-
80
- /**
81
- * Converts an array to an object supporting fancy indexing.
82
- *
83
- * @param x - input array
84
- * @param options - function options
85
- * @param options.strict - boolean indicating whether to enforce strict bounds checking
86
- * @param options.cache - cache for resolving array index objects
87
- * @returns fancy array
88
77
*
89
78
* @example
90
79
* var Float32Array = require( '@stdlib/array/float32' );
@@ -96,17 +85,6 @@ interface Array2Fancy {
96
85
*
97
86
* var v = y[ ':' ];
98
87
* // returns <Float32Array>[ 1.0, 2.0, 3.0, 4.0 ]
99
- */
100
- ( x : Float32Array , options ?: Options ) : Float32Array ;
101
-
102
- /**
103
- * Converts an array to an object supporting fancy indexing.
104
- *
105
- * @param x - input array
106
- * @param options - function options
107
- * @param options.strict - boolean indicating whether to enforce strict bounds checking
108
- * @param options.cache - cache for resolving array index objects
109
- * @returns fancy array
110
88
*
111
89
* @example
112
90
* var Complex128Array = require( '@stdlib/array/complex128' );
@@ -118,17 +96,6 @@ interface Array2Fancy {
118
96
*
119
97
* var v = y[ ':' ];
120
98
* // returns <Complex128Array>[ 1.0, 2.0, 3.0, 4.0 ]
121
- */
122
- ( x : Complex128Array , options ?: Options ) : Complex128Array ;
123
-
124
- /**
125
- * Converts an array to an object supporting fancy indexing.
126
- *
127
- * @param x - input array
128
- * @param options - function options
129
- * @param options.strict - boolean indicating whether to enforce strict bounds checking
130
- * @param options.cache - cache for resolving array index objects
131
- * @returns fancy array
132
99
*
133
100
* @example
134
101
* var Complex64Array = require( '@stdlib/array/complex64' );
@@ -140,17 +107,6 @@ interface Array2Fancy {
140
107
*
141
108
* var v = y[ ':' ];
142
109
* // returns <Complex64Array>[ 1.0, 2.0, 3.0, 4.0 ]
143
- */
144
- ( x : Complex64Array , options ?: Options ) : Complex64Array ;
145
-
146
- /**
147
- * Converts an array to an object supporting fancy indexing.
148
- *
149
- * @param x - input array
150
- * @param options - function options
151
- * @param options.strict - boolean indicating whether to enforce strict bounds checking
152
- * @param options.cache - cache for resolving array index objects
153
- * @returns fancy array
154
110
*
155
111
* @example
156
112
* var Int32Array = require( '@stdlib/array/int32' );
@@ -162,17 +118,6 @@ interface Array2Fancy {
162
118
*
163
119
* var v = y[ ':' ];
164
120
* // returns <Int32Array>[ 1, 2, 3, 4 ]
165
- */
166
- ( x : Int32Array , options ?: Options ) : Int32Array ;
167
-
168
- /**
169
- * Converts an array to an object supporting fancy indexing.
170
- *
171
- * @param x - input array
172
- * @param options - function options
173
- * @param options.strict - boolean indicating whether to enforce strict bounds checking
174
- * @param options.cache - cache for resolving array index objects
175
- * @returns fancy array
176
121
*
177
122
* @example
178
123
* var Int16Array = require( '@stdlib/array/int16' );
@@ -184,17 +129,6 @@ interface Array2Fancy {
184
129
*
185
130
* var v = y[ ':' ];
186
131
* // returns <Int16Array>[ 1, 2, 3, 4 ]
187
- */
188
- ( x : Int16Array , options ?: Options ) : Int16Array ;
189
-
190
- /**
191
- * Converts an array to an object supporting fancy indexing.
192
- *
193
- * @param x - input array
194
- * @param options - function options
195
- * @param options.strict - boolean indicating whether to enforce strict bounds checking
196
- * @param options.cache - cache for resolving array index objects
197
- * @returns fancy array
198
132
*
199
133
* @example
200
134
* var Int8Array = require( '@stdlib/array/int8' );
@@ -206,17 +140,6 @@ interface Array2Fancy {
206
140
*
207
141
* var v = y[ ':' ];
208
142
* // returns <Int8Array>[ 1, 2, 3, 4 ]
209
- */
210
- ( x : Int8Array , options ?: Options ) : Int8Array ;
211
-
212
- /**
213
- * Converts an array to an object supporting fancy indexing.
214
- *
215
- * @param x - input array
216
- * @param options - function options
217
- * @param options.strict - boolean indicating whether to enforce strict bounds checking
218
- * @param options.cache - cache for resolving array index objects
219
- * @returns fancy array
220
143
*
221
144
* @example
222
145
* var Uint32Array = require( '@stdlib/array/uint32' );
@@ -228,17 +151,6 @@ interface Array2Fancy {
228
151
*
229
152
* var v = y[ ':' ];
230
153
* // returns <Uint32Array>[ 1, 2, 3, 4 ]
231
- */
232
- ( x : Uint32Array , options ?: Options ) : Uint32Array ;
233
-
234
- /**
235
- * Converts an array to an object supporting fancy indexing.
236
- *
237
- * @param x - input array
238
- * @param options - function options
239
- * @param options.strict - boolean indicating whether to enforce strict bounds checking
240
- * @param options.cache - cache for resolving array index objects
241
- * @returns fancy array
242
154
*
243
155
* @example
244
156
* var Uint16Array = require( '@stdlib/array/uint16' );
@@ -250,17 +162,6 @@ interface Array2Fancy {
250
162
*
251
163
* var v = y[ ':' ];
252
164
* // returns <Uint16Array>[ 1, 2, 3, 4 ]
253
- */
254
- ( x : Uint16Array , options ?: Options ) : Uint16Array ;
255
-
256
- /**
257
- * Converts an array to an object supporting fancy indexing.
258
- *
259
- * @param x - input array
260
- * @param options - function options
261
- * @param options.strict - boolean indicating whether to enforce strict bounds checking
262
- * @param options.cache - cache for resolving array index objects
263
- * @returns fancy array
264
165
*
265
166
* @example
266
167
* var Uint8Array = require( '@stdlib/array/uint8' );
@@ -272,17 +173,6 @@ interface Array2Fancy {
272
173
*
273
174
* var v = y[ ':' ];
274
175
* // returns <Uint8Array>[ 1, 2, 3, 4 ]
275
- */
276
- ( x : Uint8Array , options ?: Options ) : Uint8Array ;
277
-
278
- /**
279
- * Converts an array to an object supporting fancy indexing.
280
- *
281
- * @param x - input array
282
- * @param options - function options
283
- * @param options.strict - boolean indicating whether to enforce strict bounds checking
284
- * @param options.cache - cache for resolving array index objects
285
- * @returns fancy array
286
176
*
287
177
* @example
288
178
* var Uint8ClampedArray = require( '@stdlib/array/uint8c' );
@@ -295,7 +185,7 @@ interface Array2Fancy {
295
185
* var v = y[ ':' ];
296
186
* // returns <Uint8ClampedArray>[ 1, 2, 3, 4 ]
297
187
*/
298
- ( x : Uint8ClampedArray , options ?: Options ) : Uint8ClampedArray ;
188
+ < T extends TypedArray | ComplexTypedArray | BooleanTypedArray > ( x : T , options ?: Options ) : T ;
299
189
300
190
/**
301
191
* Converts an array to an object supporting fancy indexing.
0 commit comments