@@ -105,6 +105,21 @@ function CreateTypedArraysOf2() {
105105 return typedArrays ;
106106}
107107
108+ function CreateTypedArraysFromMapFn2 < T > ( obj :ArrayLike < T > , mapFn : ( n :T , v :number ) => number ) {
109+ var typedArrays = [ ] ;
110+ typedArrays [ 0 ] = Int8Array . from ( obj , mapFn ) ;
111+ typedArrays [ 1 ] = Uint8Array . from ( obj , mapFn ) ;
112+ typedArrays [ 2 ] = Int16Array . from ( obj , mapFn ) ;
113+ typedArrays [ 3 ] = Uint16Array . from ( obj , mapFn ) ;
114+ typedArrays [ 4 ] = Int32Array . from ( obj , mapFn ) ;
115+ typedArrays [ 5 ] = Uint32Array . from ( obj , mapFn ) ;
116+ typedArrays [ 6 ] = Float32Array . from ( obj , mapFn ) ;
117+ typedArrays [ 7 ] = Float64Array . from ( obj , mapFn ) ;
118+ typedArrays [ 8 ] = Uint8ClampedArray . from ( obj , mapFn ) ;
119+
120+ return typedArrays ;
121+ }
122+
108123function CreateTypedArraysFromMapFn ( obj :ArrayLike < number > , mapFn : ( n :number , v :number ) => number ) {
109124 var typedArrays = [ ] ;
110125 typedArrays [ 0 ] = Int8Array . from ( obj , mapFn ) ;
@@ -132,5 +147,20 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike<number>, mapFn: (n:number, v
132147 typedArrays [ 7 ] = Float64Array . from ( obj , mapFn , thisArg ) ;
133148 typedArrays [ 8 ] = Uint8ClampedArray . from ( obj , mapFn , thisArg ) ;
134149
150+ return typedArrays ;
151+ }
152+
153+ function CreateTypedArraysFromThisObj2 < T > ( obj :ArrayLike < T > , mapFn : ( n :T , v :number ) => number , thisArg : { } ) {
154+ var typedArrays = [ ] ;
155+ typedArrays [ 0 ] = Int8Array . from ( obj , mapFn , thisArg ) ;
156+ typedArrays [ 1 ] = Uint8Array . from ( obj , mapFn , thisArg ) ;
157+ typedArrays [ 2 ] = Int16Array . from ( obj , mapFn , thisArg ) ;
158+ typedArrays [ 3 ] = Uint16Array . from ( obj , mapFn , thisArg ) ;
159+ typedArrays [ 4 ] = Int32Array . from ( obj , mapFn , thisArg ) ;
160+ typedArrays [ 5 ] = Uint32Array . from ( obj , mapFn , thisArg ) ;
161+ typedArrays [ 6 ] = Float32Array . from ( obj , mapFn , thisArg ) ;
162+ typedArrays [ 7 ] = Float64Array . from ( obj , mapFn , thisArg ) ;
163+ typedArrays [ 8 ] = Uint8ClampedArray . from ( obj , mapFn , thisArg ) ;
164+
135165 return typedArrays ;
136166}
0 commit comments