2020
2121/// <reference types="@stdlib/types"/>
2222
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' ;
2424import ArrayIndex = require( '@stdlib/array-index' ) ;
2525
2626/**
@@ -74,17 +74,6 @@ interface Array2Fancy {
7474*
7575* var v = y[ ':' ];
7676* // 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
8877*
8978*@example
9079* var Float32Array = require( '@stdlib/array-float32' );
@@ -96,17 +85,6 @@ interface Array2Fancy {
9685*
9786* var v = y[ ':' ];
9887* // 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
11088*
11189*@example
11290* var Complex128Array = require( '@stdlib/array-complex128' );
@@ -118,17 +96,6 @@ interface Array2Fancy {
11896*
11997* var v = y[ ':' ];
12098* // 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
13299*
133100*@example
134101* var Complex64Array = require( '@stdlib/array-complex64' );
@@ -140,17 +107,6 @@ interface Array2Fancy {
140107*
141108* var v = y[ ':' ];
142109* // 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
154110*
155111*@example
156112* var Int32Array = require( '@stdlib/array-int32' );
@@ -162,17 +118,6 @@ interface Array2Fancy {
162118*
163119* var v = y[ ':' ];
164120* // 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
176121*
177122*@example
178123* var Int16Array = require( '@stdlib/array-int16' );
@@ -184,17 +129,6 @@ interface Array2Fancy {
184129*
185130* var v = y[ ':' ];
186131* // 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
198132*
199133*@example
200134* var Int8Array = require( '@stdlib/array-int8' );
@@ -206,17 +140,6 @@ interface Array2Fancy {
206140*
207141* var v = y[ ':' ];
208142* // 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
220143*
221144*@example
222145* var Uint32Array = require( '@stdlib/array-uint32' );
@@ -228,17 +151,6 @@ interface Array2Fancy {
228151*
229152* var v = y[ ':' ];
230153* // 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
242154*
243155*@example
244156* var Uint16Array = require( '@stdlib/array-uint16' );
@@ -250,17 +162,6 @@ interface Array2Fancy {
250162*
251163* var v = y[ ':' ];
252164* // 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
264165*
265166*@example
266167* var Uint8Array = require( '@stdlib/array-uint8' );
@@ -272,17 +173,6 @@ interface Array2Fancy {
272173*
273174* var v = y[ ':' ];
274175* // 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
286176*
287177*@example
288178* var Uint8ClampedArray = require( '@stdlib/array-uint8c' );
@@ -295,7 +185,7 @@ interface Array2Fancy {
295185* var v = y[ ':' ];
296186* // returns <Uint8ClampedArray>[ 1, 2, 3, 4 ]
297187*/
298- ( x :Uint8ClampedArray , options ?:Options ) :Uint8ClampedArray ;
188+ < T extends TypedArray | ComplexTypedArray | BooleanTypedArray > ( x :T , options ?:Options ) :T ;
299189
300190/**
301191* Converts an array to an object supporting fancy indexing.