@@ -104,6 +104,21 @@ function CreateTypedArraysOf2() {
104
104
return typedArrays ;
105
105
}
106
106
107
+ function CreateTypedArraysFromMapFn2 < T > (obj:ArrayLike< T > , mapFn: (n:T, v:number)=> number ) {
108
+ var typedArrays = [ ] ;
109
+ typedArrays [ 0 ] = Int8Array . from ( obj , mapFn ) ;
110
+ typedArrays [ 1 ] = Uint8Array . from ( obj , mapFn ) ;
111
+ typedArrays [ 2 ] = Int16Array . from ( obj , mapFn ) ;
112
+ typedArrays [ 3 ] = Uint16Array . from ( obj , mapFn ) ;
113
+ typedArrays [ 4 ] = Int32Array . from ( obj , mapFn ) ;
114
+ typedArrays [ 5 ] = Uint32Array . from ( obj , mapFn ) ;
115
+ typedArrays [ 6 ] = Float32Array . from ( obj , mapFn ) ;
116
+ typedArrays [ 7 ] = Float64Array . from ( obj , mapFn ) ;
117
+ typedArrays [ 8 ] = Uint8ClampedArray . from ( obj , mapFn ) ;
118
+
119
+ return typedArrays ;
120
+ }
121
+
107
122
function CreateTypedArraysFromMapFn ( obj :ArrayLike < number > , mapFn : ( n :number , v :number ) = > number ) {
108
123
var typedArrays = [ ] ;
109
124
typedArrays [ 0 ] = Int8Array . from ( obj , mapFn ) ;
@@ -131,6 +146,21 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike<number>, mapFn: (n:number, v
131
146
typedArrays [ 7 ] = Float64Array . from ( obj , mapFn , thisArg ) ;
132
147
typedArrays [ 8 ] = Uint8ClampedArray . from ( obj , mapFn , thisArg ) ;
133
148
149
+ return typedArrays ;
150
+ }
151
+
152
+ function CreateTypedArraysFromThisObj2 < T > (obj:ArrayLike< T > , mapFn: (n:T, v:number)=> number , thisArg : { } ) {
153
+ var typedArrays = [ ] ;
154
+ typedArrays [ 0 ] = Int8Array . from ( obj , mapFn , thisArg ) ;
155
+ typedArrays [ 1 ] = Uint8Array . from ( obj , mapFn , thisArg ) ;
156
+ typedArrays [ 2 ] = Int16Array . from ( obj , mapFn , thisArg ) ;
157
+ typedArrays [ 3 ] = Uint16Array . from ( obj , mapFn , thisArg ) ;
158
+ typedArrays [ 4 ] = Int32Array . from ( obj , mapFn , thisArg ) ;
159
+ typedArrays [ 5 ] = Uint32Array . from ( obj , mapFn , thisArg ) ;
160
+ typedArrays [ 6 ] = Float32Array . from ( obj , mapFn , thisArg ) ;
161
+ typedArrays [ 7 ] = Float64Array . from ( obj , mapFn , thisArg ) ;
162
+ typedArrays [ 8 ] = Uint8ClampedArray . from ( obj , mapFn , thisArg ) ;
163
+
134
164
return typedArrays ;
135
165
}
136
166
@@ -226,6 +256,19 @@ function CreateTypedArraysOf2() {
226
256
typedArrays [ 8 ] = Uint8ClampedArray . of ( 1 , 2 , 3 , 4 ) ;
227
257
return typedArrays ;
228
258
}
259
+ function CreateTypedArraysFromMapFn2 ( obj , mapFn ) {
260
+ var typedArrays = [ ] ;
261
+ typedArrays [ 0 ] = Int8Array . from ( obj , mapFn ) ;
262
+ typedArrays [ 1 ] = Uint8Array . from ( obj , mapFn ) ;
263
+ typedArrays [ 2 ] = Int16Array . from ( obj , mapFn ) ;
264
+ typedArrays [ 3 ] = Uint16Array . from ( obj , mapFn ) ;
265
+ typedArrays [ 4 ] = Int32Array . from ( obj , mapFn ) ;
266
+ typedArrays [ 5 ] = Uint32Array . from ( obj , mapFn ) ;
267
+ typedArrays [ 6 ] = Float32Array . from ( obj , mapFn ) ;
268
+ typedArrays [ 7 ] = Float64Array . from ( obj , mapFn ) ;
269
+ typedArrays [ 8 ] = Uint8ClampedArray . from ( obj , mapFn ) ;
270
+ return typedArrays ;
271
+ }
229
272
function CreateTypedArraysFromMapFn ( obj , mapFn ) {
230
273
var typedArrays = [ ] ;
231
274
typedArrays [ 0 ] = Int8Array . from ( obj , mapFn ) ;
@@ -252,3 +295,16 @@ function CreateTypedArraysFromThisObj(obj, mapFn, thisArg) {
252
295
typedArrays [ 8 ] = Uint8ClampedArray . from ( obj , mapFn , thisArg ) ;
253
296
return typedArrays ;
254
297
}
298
+ function CreateTypedArraysFromThisObj2 ( obj , mapFn , thisArg ) {
299
+ var typedArrays = [ ] ;
300
+ typedArrays [ 0 ] = Int8Array . from ( obj , mapFn , thisArg ) ;
301
+ typedArrays [ 1 ] = Uint8Array . from ( obj , mapFn , thisArg ) ;
302
+ typedArrays [ 2 ] = Int16Array . from ( obj , mapFn , thisArg ) ;
303
+ typedArrays [ 3 ] = Uint16Array . from ( obj , mapFn , thisArg ) ;
304
+ typedArrays [ 4 ] = Int32Array . from ( obj , mapFn , thisArg ) ;
305
+ typedArrays [ 5 ] = Uint32Array . from ( obj , mapFn , thisArg ) ;
306
+ typedArrays [ 6 ] = Float32Array . from ( obj , mapFn , thisArg ) ;
307
+ typedArrays [ 7 ] = Float64Array . from ( obj , mapFn , thisArg ) ;
308
+ typedArrays [ 8 ] = Uint8ClampedArray . from ( obj , mapFn , thisArg ) ;
309
+ return typedArrays ;
310
+ }
0 commit comments