@@ -104,6 +104,21 @@ function CreateTypedArraysOf2() {
104104 return typedArrays ;
105105}
106106
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+
107122function CreateTypedArraysFromMapFn ( obj :ArrayLike < number > , mapFn : ( n :number , v :number ) = > number ) {
108123 var typedArrays = [ ] ;
109124 typedArrays [ 0 ] = Int8Array . from ( obj , mapFn ) ;
@@ -131,6 +146,21 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike<number>, mapFn: (n:number, v
131146 typedArrays [ 7 ] = Float64Array . from ( obj , mapFn , thisArg ) ;
132147 typedArrays [ 8 ] = Uint8ClampedArray . from ( obj , mapFn , thisArg ) ;
133148
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+
134164 return typedArrays ;
135165}
136166
@@ -226,6 +256,19 @@ function CreateTypedArraysOf2() {
226256 typedArrays [ 8 ] = Uint8ClampedArray . of ( 1 , 2 , 3 , 4 ) ;
227257 return typedArrays ;
228258}
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+ }
229272function CreateTypedArraysFromMapFn ( obj , mapFn ) {
230273 var typedArrays = [ ] ;
231274 typedArrays [ 0 ] = Int8Array . from ( obj , mapFn ) ;
@@ -252,3 +295,16 @@ function CreateTypedArraysFromThisObj(obj, mapFn, thisArg) {
252295 typedArrays [ 8 ] = Uint8ClampedArray . from ( obj , mapFn , thisArg ) ;
253296 return typedArrays ;
254297}
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