@@ -50,6 +50,20 @@ import fullBy = require( './index' );
5050 fullBy ( 'uint8c' , [ 2 , 2 ] , 'column-major' , ( ) => 10 ) ; // $ExpectType uint8cndarray
5151 fullBy ( 'bool' , [ 2 , 2 ] , 'column-major' , ( ) => true ) ; // $ExpectType boolndarray
5252 fullBy ( 'generic' , [ 2 , 2 ] , 'column-major' , ( ) => 10.0 ) ; // $ExpectType genericndarray<number>
53+
54+ fullBy ( 'float64' , [ 2 , 2 ] , 'row-major' , ( ) => 10.0 , { } ) ; // $ExpectType float64ndarray
55+ fullBy ( 'float32' , [ 2 , 2 ] , 'row-major' , ( ) => 10.0 , { } ) ; // $ExpectType float32ndarray
56+ fullBy ( 'complex128' , [ 2 , 2 ] , 'row-major' , ( ) => 10.0 , { } ) ; // $ExpectType complex128ndarray
57+ fullBy ( 'complex64' , [ 2 , 2 ] , 'row-major' , ( ) => 10.0 , { } ) ; // $ExpectType complex64ndarray
58+ fullBy ( 'int32' , [ 2 , 2 ] , 'row-major' , ( ) => 10 , { } ) ; // $ExpectType int32ndarray
59+ fullBy ( 'int16' , [ 2 , 2 ] , 'row-major' , ( ) => 10 , { } ) ; // $ExpectType int16ndarray
60+ fullBy ( 'int8' , [ 2 , 2 ] , 'row-major' , ( ) => 10 , { } ) ; // $ExpectType int8ndarray
61+ fullBy ( 'uint32' , [ 2 , 2 ] , 'row-major' , ( ) => 10 , { } ) ; // $ExpectType uint32ndarray
62+ fullBy ( 'uint16' , [ 2 , 2 ] , 'row-major' , ( ) => 10 , { } ) ; // $ExpectType uint16ndarray
63+ fullBy ( 'uint8' , [ 2 , 2 ] , 'row-major' , ( ) => 10 , { } ) ; // $ExpectType uint8ndarray
64+ fullBy ( 'uint8c' , [ 2 , 2 ] , 'row-major' , ( ) => 10 , { } ) ; // $ExpectType uint8cndarray
65+ fullBy ( 'bool' , [ 2 , 2 ] , 'row-major' , ( ) => true , { } ) ; // $ExpectType boolndarray
66+ fullBy ( 'generic' , [ 2 , 2 ] , 'row-major' , ( ) => 10.0 , { } ) ; // $ExpectType genericndarray<number>
5367}
5468
5569// The compiler throws an error if the function is provided a first argument which is an unrecognized/unsupported data type...
@@ -62,6 +76,15 @@ import fullBy = require( './index' );
6276 fullBy ( [ ] , [ 2 , 2 ] , 'row-major' , ( ) => 10.0 ) ; // $ExpectError
6377 fullBy ( { } , [ 2 , 2 ] , 'row-major' , ( ) => 10.0 ) ; // $ExpectError
6478 fullBy ( ( x : number ) : number => x , [ 2 , 2 ] , 'row-major' , ( ) => 10.0 ) ; // $ExpectError
79+
80+ fullBy ( '10' , [ 2 , 2 ] , 'row-major' , ( ) => 10.0 , { } ) ; // $ExpectError
81+ fullBy ( 10 , [ 2 , 2 ] , 'row-major' , ( ) => 10.0 , { } ) ; // $ExpectError
82+ fullBy ( false , [ 2 , 2 ] , 'row-major' , ( ) => 10.0 , { } ) ; // $ExpectError
83+ fullBy ( true , [ 2 , 2 ] , 'row-major' , ( ) => 10.0 , { } ) ; // $ExpectError
84+ fullBy ( null , [ 2 , 2 ] , 'row-major' , ( ) => 10.0 , { } ) ; // $ExpectError
85+ fullBy ( [ ] , [ 2 , 2 ] , 'row-major' , ( ) => 10.0 , { } ) ; // $ExpectError
86+ fullBy ( { } , [ 2 , 2 ] , 'row-major' , ( ) => 10.0 , { } ) ; // $ExpectError
87+ fullBy ( ( x : number ) : number => x , [ 2 , 2 ] , 'row-major' , ( ) => 10.0 , { } ) ; // $ExpectError
6588}
6689
6790// The compiler throws an error if the function is not provided a valid shape for the second argument...
@@ -74,6 +97,15 @@ import fullBy = require( './index' );
7497 fullBy ( 'float32' , [ '5' ] , 'row-major' , ( ) => 10.0 ) ; // $ExpectError
7598 fullBy ( 'float32' , { } , 'row-major' , ( ) => 10.0 ) ; // $ExpectError
7699 fullBy ( 'float32' , ( x : number ) : number => x , 'row-major' , ( ) => 10.0 ) ; // $ExpectError
100+
101+ fullBy ( 'float32' , '5' , 'row-major' , ( ) => 10.0 , { } ) ; // $ExpectError
102+ fullBy ( 'float32' , false , 'row-major' , ( ) => 10.0 , { } ) ; // $ExpectError
103+ fullBy ( 'float32' , true , 'row-major' , ( ) => 10.0 , { } ) ; // $ExpectError
104+ fullBy ( 'float32' , null , 'row-major' , ( ) => 10.0 , { } ) ; // $ExpectError
105+ fullBy ( 'float32' , undefined , 'row-major' , ( ) => 10.0 , { } ) ; // $ExpectError
106+ fullBy ( 'float32' , [ '5' ] , 'row-major' , ( ) => 10.0 , { } ) ; // $ExpectError
107+ fullBy ( 'float32' , { } , 'row-major' , ( ) => 10.0 , { } ) ; // $ExpectError
108+ fullBy ( 'float32' , ( x : number ) : number => x , 'row-major' , ( ) => 10.0 , { } ) ; // $ExpectError
77109}
78110
79111// The compiler throws an error if the function is not provided a valid order for the third argument...
@@ -86,6 +118,15 @@ import fullBy = require( './index' );
86118 fullBy ( 'float32' , [ 2 , 2 ] , [ '5' ] , ( ) => 10.0 ) ; // $ExpectError
87119 fullBy ( 'float32' , [ 2 , 2 ] , { } , ( ) => 10.0 ) ; // $ExpectError
88120 fullBy ( 'float32' , [ 2 , 2 ] , ( x : number ) : number => x , ( ) => 10.0 ) ; // $ExpectError
121+
122+ fullBy ( 'float32' , [ 2 , 2 ] , '5' , ( ) => 10.0 , { } ) ; // $ExpectError
123+ fullBy ( 'float32' , [ 2 , 2 ] , false , ( ) => 10.0 , { } ) ; // $ExpectError
124+ fullBy ( 'float32' , [ 2 , 2 ] , true , ( ) => 10.0 , { } ) ; // $ExpectError
125+ fullBy ( 'float32' , [ 2 , 2 ] , null , ( ) => 10.0 , { } ) ; // $ExpectError
126+ fullBy ( 'float32' , [ 2 , 2 ] , undefined , ( ) => 10.0 , { } ) ; // $ExpectError
127+ fullBy ( 'float32' , [ 2 , 2 ] , [ '5' ] , ( ) => 10.0 , { } ) ; // $ExpectError
128+ fullBy ( 'float32' , [ 2 , 2 ] , { } , ( ) => 10.0 , { } ) ; // $ExpectError
129+ fullBy ( 'float32' , [ 2 , 2 ] , ( x : number ) : number => x , ( ) => 10.0 , { } ) ; // $ExpectError
89130}
90131
91132// The compiler throws an error if the function is not provided a callback function for the fourth argument...
@@ -97,6 +138,14 @@ import fullBy = require( './index' );
97138 fullBy ( 'float32' , [ 2 , 2 ] , 'row-major' , null ) ; // $ExpectError
98139 fullBy ( 'float32' , [ 2 , 2 ] , 'row-major' , [ ] ) ; // $ExpectError
99140 fullBy ( 'float32' , [ 2 , 2 ] , 'row-major' , { } ) ; // $ExpectError
141+
142+ fullBy ( 'float32' , [ 2 , 2 ] , 'row-major' , '10' , { } ) ; // $ExpectError
143+ fullBy ( 'float32' , [ 2 , 2 ] , 'row-major' , 10 , { } ) ; // $ExpectError
144+ fullBy ( 'float32' , [ 2 , 2 ] , 'row-major' , false , { } ) ; // $ExpectError
145+ fullBy ( 'float32' , [ 2 , 2 ] , 'row-major' , true , { } ) ; // $ExpectError
146+ fullBy ( 'float32' , [ 2 , 2 ] , 'row-major' , null , { } ) ; // $ExpectError
147+ fullBy ( 'float32' , [ 2 , 2 ] , 'row-major' , [ ] , { } ) ; // $ExpectError
148+ fullBy ( 'float32' , [ 2 , 2 ] , 'row-major' , { } , { } ) ; // $ExpectError
100149}
101150
102151// The compiler throws an error if the function is provided an unsupported number of arguments...
0 commit comments