@@ -81,7 +81,7 @@ function next(): any {
8181 filledarray ( 1.0 , buf , 8 , 2 , 'int16' ) ; // $ExpectType TypedArray
8282}
8383
84- // The compiler throws an error if the function is not provided a valid length, typed array, array-like object, or `ArrayBuffer` argument...
84+ // The compiler throws an error if the function is not provided a valid length, typed array, array-like object, `ArrayBuffer`, or iterable argument...
8585{
8686 filledarray ( 1.0 , false ) ; // $ExpectError
8787 filledarray ( 1.0 , true ) ; // $ExpectError
@@ -146,6 +146,13 @@ function next(): any {
146146 filledarray ( 1.0 , buf , { } ) ; // $ExpectError
147147 filledarray ( 1.0 , buf , ( x : number ) : number => x ) ; // $ExpectError
148148
149+ filledarray ( 1.0 , buf , false , 2 ) ; // $ExpectError
150+ filledarray ( 1.0 , buf , true , 2 ) ; // $ExpectError
151+ filledarray ( 1.0 , buf , null , 2 ) ; // $ExpectError
152+ filledarray ( 1.0 , buf , [ ] , 2 ) ; // $ExpectError
153+ filledarray ( 1.0 , buf , { } , 2 ) ; // $ExpectError
154+ filledarray ( 1.0 , buf , ( x : number ) : number => x , 2 ) ; // $ExpectError
155+
149156 filledarray ( 1.0 , buf , '5' , 'float64' ) ; // $ExpectError
150157 filledarray ( 1.0 , buf , false , 'float64' ) ; // $ExpectError
151158 filledarray ( 1.0 , buf , true , 'float64' ) ; // $ExpectError
@@ -154,6 +161,15 @@ function next(): any {
154161 filledarray ( 1.0 , buf , [ ] , 'float64' ) ; // $ExpectError
155162 filledarray ( 1.0 , buf , { } , 'float64' ) ; // $ExpectError
156163 filledarray ( 1.0 , buf , ( x : number ) : number => x , 'float64' ) ; // $ExpectError
164+
165+ filledarray ( 1.0 , buf , '5' , 2 , 'float64' ) ; // $ExpectError
166+ filledarray ( 1.0 , buf , false , 2 , 'float64' ) ; // $ExpectError
167+ filledarray ( 1.0 , buf , true , 2 , 'float64' ) ; // $ExpectError
168+ filledarray ( 1.0 , buf , null , 2 , 'float64' ) ; // $ExpectError
169+ filledarray ( 1.0 , buf , undefined , 2 , 'float64' ) ; // $ExpectError
170+ filledarray ( 1.0 , buf , [ ] , 2 , 'float64' ) ; // $ExpectError
171+ filledarray ( 1.0 , buf , { } , 2 , 'float64' ) ; // $ExpectError
172+ filledarray ( 1.0 , buf , ( x : number ) : number => x , 2 , 'float64' ) ; // $ExpectError
157173}
158174
159175// The compiler throws an error if the function is provided a view length argument which is not a number...
@@ -177,27 +193,6 @@ function next(): any {
177193 filledarray ( 1.0 , buf , 8 , ( x : number ) : number => x , 'float64' ) ; // $ExpectError
178194}
179195
180- // The compiler throws an error if the function is not provided a third argument which is a number...
181- {
182- const buf = new ArrayBuffer ( 32 ) ;
183-
184- filledarray ( 1.0 , buf , false ) ; // $ExpectError
185- filledarray ( 1.0 , buf , true ) ; // $ExpectError
186- filledarray ( 1.0 , buf , null ) ; // $ExpectError
187- filledarray ( 1.0 , buf , [ ] ) ; // $ExpectError
188- filledarray ( 1.0 , buf , { } ) ; // $ExpectError
189- filledarray ( 1.0 , buf , ( x : number ) : number => x ) ; // $ExpectError
190-
191- filledarray ( 1.0 , buf , '5' , 'float64' ) ; // $ExpectError
192- filledarray ( 1.0 , buf , false , 'float64' ) ; // $ExpectError
193- filledarray ( 1.0 , buf , true , 'float64' ) ; // $ExpectError
194- filledarray ( 1.0 , buf , null , 'float64' ) ; // $ExpectError
195- filledarray ( 1.0 , buf , undefined , 'float64' ) ; // $ExpectError
196- filledarray ( 1.0 , buf , [ ] , 'float64' ) ; // $ExpectError
197- filledarray ( 1.0 , buf , { } , 'float64' ) ; // $ExpectError
198- filledarray ( 1.0 , buf , ( x : number ) : number => x , 'float64' ) ; // $ExpectError
199- }
200-
201196// The compiler throws an error if the function is provided too many arguments...
202197{
203198 const buf = new ArrayBuffer ( 32 ) ;
0 commit comments