Skip to content

Commit 24589df

Browse files
committed
refactor: use generics to improve type specificity
1 parent 9315e61 commit 24589df

File tree

1 file changed

+3
-4
lines changed
  • lib/node_modules/@stdlib/array/base/zerosnd/docs/types

1 file changed

+3
-4
lines changed

lib/node_modules/@stdlib/array/base/zerosnd/docs/types/index.d.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@
2121
/// <reference types="@stdlib/types"/>
2222

2323
import { Collection } from '@stdlib/types/array';
24-
25-
// FIXME: shapes should be collections of a defined length
24+
import { Shape } from '@stdlib/types/ndarray';
2625

2726
/**
2827
* One-dimensional array.
2928
*/
30-
type Array1D<T> = Collection<T>;
29+
type Array1D<T> = Array<T>;
3130

3231
/**
3332
* One-dimensional array shape.
@@ -252,7 +251,7 @@ declare function zerosnd( shape: Shape10D ): Array10D<number>;
252251
* var out = zerosnd( [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3 ] );
253252
* // returns [ [ [ [ [ [ [ [ [ [ [ 0.0, 0.0, 0.0 ] ] ] ] ] ] ] ] ] ]
254253
*/
255-
declare function zerosnd( shape: Collection<number> ): Array<any>;
254+
declare function zerosnd<T = unknown>( shape: Shape ): Array<T>; // tslint:disable-line:no-unnecessary-generics
256255

257256

258257
// EXPORTS //

0 commit comments

Comments
 (0)