@@ -81,7 +81,7 @@ function next(): any {
81
81
filledarray ( 1.0 , buf , 8 , 2 , 'int16' ) ; // $ExpectType TypedArray
82
82
}
83
83
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...
85
85
{
86
86
filledarray ( 1.0 , false ) ; // $ExpectError
87
87
filledarray ( 1.0 , true ) ; // $ExpectError
@@ -146,6 +146,13 @@ function next(): any {
146
146
filledarray ( 1.0 , buf , { } ) ; // $ExpectError
147
147
filledarray ( 1.0 , buf , ( x : number ) : number => x ) ; // $ExpectError
148
148
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
+
149
156
filledarray ( 1.0 , buf , '5' , 'float64' ) ; // $ExpectError
150
157
filledarray ( 1.0 , buf , false , 'float64' ) ; // $ExpectError
151
158
filledarray ( 1.0 , buf , true , 'float64' ) ; // $ExpectError
@@ -154,6 +161,15 @@ function next(): any {
154
161
filledarray ( 1.0 , buf , [ ] , 'float64' ) ; // $ExpectError
155
162
filledarray ( 1.0 , buf , { } , 'float64' ) ; // $ExpectError
156
163
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
157
173
}
158
174
159
175
// 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 {
177
193
filledarray ( 1.0 , buf , 8 , ( x : number ) : number => x , 'float64' ) ; // $ExpectError
178
194
}
179
195
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
-
201
196
// The compiler throws an error if the function is provided too many arguments...
202
197
{
203
198
const buf = new ArrayBuffer ( 32 ) ;
0 commit comments