File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 20
20
21
21
/// <reference types="@stdlib/types"/>
22
22
23
- import { Collection } from '@stdlib/types/array' ;
23
+ import { Collection , Array3D } from '@stdlib/types/array' ;
24
24
25
25
/**
26
26
* Returns a three-dimensional nested array filled with ones.
@@ -32,7 +32,7 @@ import { Collection } from '@stdlib/types/array';
32
32
* var out = ones3d( [ 1, 1, 3 ] );
33
33
* // returns [ [ [ 1.0, 1.0, 1.0 ] ] ]
34
34
*/
35
- declare function ones3d ( shape : Collection < number > ) : Array < Array < Array < number > > > ;
35
+ declare function ones3d ( shape : Collection < number > ) : Array3D < number > ;
36
36
37
37
38
38
// EXPORTS //
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import ones3d = require( './index' );
23
23
24
24
// The function returns a nested array...
25
25
{
26
- ones3d ( [ 1 , 1 , 3 ] ) ; // $ExpectType number[][][]
26
+ ones3d ( [ 1 , 1 , 3 ] ) ; // $ExpectType Array3D< number>
27
27
}
28
28
29
29
// The compiler throws an error if the function is provided a first argument which is not an array of numbers...
You can’t perform that action at this time.
0 commit comments