Skip to content

Commit acb12c7

Browse files
committed
refactor: improve type specificity for array provided to callback
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na ---
1 parent a0eb37f commit acb12c7

File tree

1 file changed

+31
-31
lines changed
  • lib/node_modules/@stdlib/ndarray/map/docs/types

1 file changed

+31
-31
lines changed

lib/node_modules/@stdlib/ndarray/map/docs/types/index.d.ts

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ import { Complex64, Complex128, ComplexLike } from '@stdlib/types/complex';
3030
*
3131
* @returns output value
3232
*/
33-
type Nullary<U, V> = ( this: V ) => U;
33+
type Nullary<V, W> = ( this: W ) => V;
3434

3535
/**
3636
* Callback invoked for each ndarray element.
3737
*
3838
* @param value - current array element
3939
* @returns output value
4040
*/
41-
type Unary<T, U, V> = ( this: V, value: T ) => U;
41+
type Unary<T, V, W> = ( this: W, value: T ) => V;
4242

4343
/**
4444
* Callback invoked for each ndarray element.
@@ -47,7 +47,7 @@ type Unary<T, U, V> = ( this: V, value: T ) => U;
4747
* @param indices - current array element indices
4848
* @returns output value
4949
*/
50-
type Binary<T, U, V> = ( this: V, value: T, indices: Array<number> ) => U;
50+
type Binary<T, V, W> = ( this: W, value: T, indices: Array<number> ) => V;
5151

5252
/**
5353
* Callback invoked for each ndarray element.
@@ -57,7 +57,7 @@ type Binary<T, U, V> = ( this: V, value: T, indices: Array<number> ) => U;
5757
* @param arr - input array
5858
* @returns output value
5959
*/
60-
type Ternary<T, U, V> = ( this: V, value: T, indices: Array<number>, arr: typedndarray<T> ) => U;
60+
type Ternary<T, U, V, W> = ( this: W, value: T, indices: Array<number>, arr: U ) => V;
6161

6262
/**
6363
* Callback invoked for each ndarray element.
@@ -67,7 +67,7 @@ type Ternary<T, U, V> = ( this: V, value: T, indices: Array<number>, arr: typedn
6767
* @param arr - input array
6868
* @returns output value
6969
*/
70-
type Callback<T, U, V> = Nullary<U, V> | Unary<T, U, V> | Binary<T, U, V> | Ternary<T, U, V>;
70+
type Callback<T, U, V, W> = Nullary<V, W> | Unary<T, V, W> | Binary<T,V, W> | Ternary<T, U, V, W>;
7171

7272
/**
7373
* Interface describing function options.
@@ -296,7 +296,7 @@ interface GenericOptions extends Options {
296296
* var arr = ndarray2array( y );
297297
* // returns [ [ 20.0, 30.0, 40.0 ], [ 80.0, 90.0, 100.0 ] ]
298298
*/
299-
declare function map<V = unknown>( x: float64ndarray, fcn: Callback<number, number, V>, thisArg?: ThisParameterType<Callback<number, number, V>> ): float64ndarray;
299+
declare function map<W = unknown>( x: float64ndarray, fcn: Callback<number, float64ndarray, number, W>, thisArg?: ThisParameterType<Callback<number, float64ndarray, number, W>> ): float64ndarray;
300300

301301
/**
302302
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -329,7 +329,7 @@ declare function map<V = unknown>( x: float64ndarray, fcn: Callback<number, numb
329329
* var arr = ndarray2array( y );
330330
* // returns [ [ 20.0, 30.0, 40.0 ], [ 80.0, 90.0, 100.0 ] ]
331331
*/
332-
declare function map<V = unknown>( x: float32ndarray, fcn: Callback<number, number, V>, thisArg?: ThisParameterType<Callback<number, number, V>> ): float32ndarray;
332+
declare function map<W = unknown>( x: float32ndarray, fcn: Callback<number, float32ndarray, number, W>, thisArg?: ThisParameterType<Callback<number, float32ndarray, number, W>> ): float32ndarray;
333333

334334
/**
335335
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -358,7 +358,7 @@ declare function map<V = unknown>( x: float32ndarray, fcn: Callback<number, numb
358358
* var y = map( x, identity );
359359
* // returns <ndarray>
360360
*/
361-
declare function map<V = unknown>( x: complex64ndarray, fcn: Callback<Complex64, ComplexLike, V>, thisArg?: ThisParameterType<Callback<Complex64, ComplexLike, V>> ): complex64ndarray;
361+
declare function map<W = unknown>( x: complex64ndarray, fcn: Callback<Complex64, complex64ndarray, ComplexLike, W>, thisArg?: ThisParameterType<Callback<Complex64, complex64ndarray, ComplexLike, W>> ): complex64ndarray;
362362

363363
/**
364364
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -387,7 +387,7 @@ declare function map<V = unknown>( x: complex64ndarray, fcn: Callback<Complex64,
387387
* var y = map( x, identity );
388388
* // returns <ndarray>
389389
*/
390-
declare function map<V = unknown>( x: complex128ndarray, fcn: Callback<Complex128, ComplexLike, V>, thisArg?: ThisParameterType<Callback<Complex128, ComplexLike, V>> ): complex128ndarray;
390+
declare function map<W = unknown>( x: complex128ndarray, fcn: Callback<Complex128, complex128ndarray, ComplexLike, W>, thisArg?: ThisParameterType<Callback<Complex128, complex128ndarray, ComplexLike, W>> ): complex128ndarray;
391391

392392
/**
393393
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -420,7 +420,7 @@ declare function map<V = unknown>( x: complex128ndarray, fcn: Callback<Complex12
420420
* var arr = ndarray2array( y );
421421
* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ]
422422
*/
423-
declare function map<V = unknown>( x: int32ndarray, fcn: Callback<number, number, V>, thisArg?: ThisParameterType<Callback<number, number, V>> ): int32ndarray;
423+
declare function map<W = unknown>( x: int32ndarray, fcn: Callback<number, int32ndarray, number, W>, thisArg?: ThisParameterType<Callback<number, int32ndarray, number, W>> ): int32ndarray;
424424

425425
/**
426426
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -453,7 +453,7 @@ declare function map<V = unknown>( x: int32ndarray, fcn: Callback<number, number
453453
* var arr = ndarray2array( y );
454454
* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ]
455455
*/
456-
declare function map<V = unknown>( x: int16ndarray, fcn: Callback<number, number, V>, thisArg?: ThisParameterType<Callback<number, number, V>> ): int16ndarray;
456+
declare function map<W = unknown>( x: int16ndarray, fcn: Callback<number, int16ndarray, number, W>, thisArg?: ThisParameterType<Callback<number, int16ndarray, number, W>> ): int16ndarray;
457457

458458
/**
459459
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -486,7 +486,7 @@ declare function map<V = unknown>( x: int16ndarray, fcn: Callback<number, number
486486
* var arr = ndarray2array( y );
487487
* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ]
488488
*/
489-
declare function map<V = unknown>( x: int8ndarray, fcn: Callback<number, number, V>, thisArg?: ThisParameterType<Callback<number, number, V>> ): int8ndarray;
489+
declare function map<W = unknown>( x: int8ndarray, fcn: Callback<number, int8ndarray, number, W>, thisArg?: ThisParameterType<Callback<number, int8ndarray, number, W>> ): int8ndarray;
490490

491491
/**
492492
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -519,7 +519,7 @@ declare function map<V = unknown>( x: int8ndarray, fcn: Callback<number, number,
519519
* var arr = ndarray2array( y );
520520
* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ]
521521
*/
522-
declare function map<V = unknown>( x: uint32ndarray, fcn: Callback<number, number, V>, thisArg?: ThisParameterType<Callback<number, number, V>> ): uint32ndarray;
522+
declare function map<W = unknown>( x: uint32ndarray, fcn: Callback<number, uint32ndarray, number, W>, thisArg?: ThisParameterType<Callback<number, uint32ndarray, number, W>> ): uint32ndarray;
523523

524524
/**
525525
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -552,7 +552,7 @@ declare function map<V = unknown>( x: uint32ndarray, fcn: Callback<number, numbe
552552
* var arr = ndarray2array( y );
553553
* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ]
554554
*/
555-
declare function map<V = unknown>( x: uint16ndarray, fcn: Callback<number, number, V>, thisArg?: ThisParameterType<Callback<number, number, V>> ): uint16ndarray;
555+
declare function map<W = unknown>( x: uint16ndarray, fcn: Callback<number, uint16ndarray, number, W>, thisArg?: ThisParameterType<Callback<number, uint16ndarray, number, W>> ): uint16ndarray;
556556

557557
/**
558558
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -585,7 +585,7 @@ declare function map<V = unknown>( x: uint16ndarray, fcn: Callback<number, numbe
585585
* var arr = ndarray2array( y );
586586
* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ]
587587
*/
588-
declare function map<V = unknown>( x: uint8ndarray, fcn: Callback<number, number, V>, thisArg?: ThisParameterType<Callback<number, number, V>> ): uint8ndarray;
588+
declare function map<W = unknown>( x: uint8ndarray, fcn: Callback<number, uint8ndarray, number, W>, thisArg?: ThisParameterType<Callback<number, uint8ndarray, number, W>> ): uint8ndarray;
589589

590590
/**
591591
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -618,7 +618,7 @@ declare function map<V = unknown>( x: uint8ndarray, fcn: Callback<number, number
618618
* var arr = ndarray2array( y );
619619
* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ]
620620
*/
621-
declare function map<V = unknown>( x: uint8cndarray, fcn: Callback<number, number, V>, thisArg?: ThisParameterType<Callback<number, number, V>> ): uint8cndarray;
621+
declare function map<W = unknown>( x: uint8cndarray, fcn: Callback<number, uint8cndarray, number, W>, thisArg?: ThisParameterType<Callback<number, uint8cndarray, number, W>> ): uint8cndarray;
622622

623623
/**
624624
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -651,7 +651,7 @@ declare function map<V = unknown>( x: uint8cndarray, fcn: Callback<number, numbe
651651
* var arr = ndarray2array( y );
652652
* // returns [ [ true, true, true ], [ true, true, true ] ]
653653
*/
654-
declare function map<V = unknown>( x: boolndarray, fcn: Callback<boolean, boolean, V>, thisArg?: ThisParameterType<Callback<boolean, boolean, V>> ): boolndarray;
654+
declare function map<W = unknown>( x: boolndarray, fcn: Callback<boolean, boolndarray, boolean, W>, thisArg?: ThisParameterType<Callback<boolean, boolndarray, boolean, W>> ): boolndarray;
655655

656656
/**
657657
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -683,7 +683,7 @@ declare function map<V = unknown>( x: boolndarray, fcn: Callback<boolean, boolea
683683
* var arr = ndarray2array( y );
684684
* // returns [ [ 20.0, 30.0, 40.0 ], [ 80.0, 90.0, 100.0 ] ]
685685
*/
686-
declare function map<T = unknown, U = unknown, V = unknown>( x: genericndarray<T>, fcn: Callback<T, U, V>, thisArg?: ThisParameterType<Callback<T, U, V>> ): genericndarray<U>;
686+
declare function map<T = unknown, V = unknown, W = unknown>( x: genericndarray<T>, fcn: Callback<T, genericndarray<T>, V, W>, thisArg?: ThisParameterType<Callback<T, genericndarray<T>, V, W>> ): genericndarray<V>;
687687

688688
/**
689689
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -721,7 +721,7 @@ declare function map<T = unknown, U = unknown, V = unknown>( x: genericndarray<T
721721
* var arr = ndarray2array( y );
722722
* // returns [ [ 20.0, 30.0, 40.0 ], [ 80.0, 90.0, 100.0 ] ]
723723
*/
724-
declare function map<T = unknown, V = unknown>( x: typedndarray<T>, options: Float64Options, fcn: Callback<T, number, V>, thisArg?: ThisParameterType<Callback<T, number, V>> ): float64ndarray;
724+
declare function map<T = unknown, W = unknown>( x: typedndarray<T>, options: Float64Options, fcn: Callback<T, typedndarray<T>, number, W>, thisArg?: ThisParameterType<Callback<T, typedndarray<T>, number, W>> ): float64ndarray;
725725

726726
/**
727727
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -759,7 +759,7 @@ declare function map<T = unknown, V = unknown>( x: typedndarray<T>, options: Flo
759759
* var arr = ndarray2array( y );
760760
* // returns [ [ 20.0, 30.0, 40.0 ], [ 80.0, 90.0, 100.0 ] ]
761761
*/
762-
declare function map<T = unknown, V = unknown>( x: typedndarray<T>, options: Float32Options, fcn: Callback<T, number, V>, thisArg?: ThisParameterType<Callback<T, number, V>> ): float32ndarray;
762+
declare function map<T = unknown, W = unknown>( x: typedndarray<T>, options: Float32Options, fcn: Callback<T, typedndarray<T>, number, W>, thisArg?: ThisParameterType<Callback<T, typedndarray<T>, number, W>> ): float32ndarray;
763763

764764
/**
765765
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -794,7 +794,7 @@ declare function map<T = unknown, V = unknown>( x: typedndarray<T>, options: Flo
794794
* var y = map( x, opts, toComplex );
795795
* // returns <ndarray>
796796
*/
797-
declare function map<T = unknown, V = unknown>( x: typedndarray<T>, options: Complex128Options, fcn: Callback<T, ComplexLike, V>, thisArg?: ThisParameterType<Callback<T, ComplexLike, V>> ): complex128ndarray;
797+
declare function map<T = unknown, W = unknown>( x: typedndarray<T>, options: Complex128Options, fcn: Callback<T, typedndarray<T>, ComplexLike, W>, thisArg?: ThisParameterType<Callback<T, typedndarray<T>, ComplexLike, W>> ): complex128ndarray;
798798

799799
/**
800800
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -829,7 +829,7 @@ declare function map<T = unknown, V = unknown>( x: typedndarray<T>, options: Com
829829
* var y = map( x, opts, toComplex );
830830
* // returns <ndarray>
831831
*/
832-
declare function map<T = unknown, V = unknown>( x: typedndarray<T>, options: Complex64Options, fcn: Callback<T, ComplexLike, V>, thisArg?: ThisParameterType<Callback<T, ComplexLike, V>> ): complex64ndarray;
832+
declare function map<T = unknown, W = unknown>( x: typedndarray<T>, options: Complex64Options, fcn: Callback<T, typedndarray<T>, ComplexLike, W>, thisArg?: ThisParameterType<Callback<T, typedndarray<T>, ComplexLike, W>> ): complex64ndarray;
833833

834834
/**
835835
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -867,7 +867,7 @@ declare function map<T = unknown, V = unknown>( x: typedndarray<T>, options: Com
867867
* var arr = ndarray2array( y );
868868
* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ]
869869
*/
870-
declare function map<T = unknown, V = unknown>( x: typedndarray<T>, options: Int32Options, fcn: Callback<T, number, V>, thisArg?: ThisParameterType<Callback<T, number, V>> ): int32ndarray;
870+
declare function map<T = unknown, W = unknown>( x: typedndarray<T>, options: Int32Options, fcn: Callback<T, typedndarray<T>, number, W>, thisArg?: ThisParameterType<Callback<T, typedndarray<T>, number, W>> ): int32ndarray;
871871

872872
/**
873873
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -905,7 +905,7 @@ declare function map<T = unknown, V = unknown>( x: typedndarray<T>, options: Int
905905
* var arr = ndarray2array( y );
906906
* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ]
907907
*/
908-
declare function map<T = unknown, V = unknown>( x: typedndarray<T>, options: Int16Options, fcn: Callback<T, number, V>, thisArg?: ThisParameterType<Callback<T, number, V>> ): int16ndarray;
908+
declare function map<T = unknown, W = unknown>( x: typedndarray<T>, options: Int16Options, fcn: Callback<T, typedndarray<T>, number, W>, thisArg?: ThisParameterType<Callback<T, typedndarray<T>, number, W>> ): int16ndarray;
909909

910910
/**
911911
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -943,7 +943,7 @@ declare function map<T = unknown, V = unknown>( x: typedndarray<T>, options: Int
943943
* var arr = ndarray2array( y );
944944
* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ]
945945
*/
946-
declare function map<T = unknown, V = unknown>( x: typedndarray<T>, options: Int8Options, fcn: Callback<T, number, V>, thisArg?: ThisParameterType<Callback<T, number, V>> ): int8ndarray;
946+
declare function map<T = unknown, W = unknown>( x: typedndarray<T>, options: Int8Options, fcn: Callback<T, typedndarray<T>, number, W>, thisArg?: ThisParameterType<Callback<T, typedndarray<T>, number, W>> ): int8ndarray;
947947

948948
/**
949949
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -981,7 +981,7 @@ declare function map<T = unknown, V = unknown>( x: typedndarray<T>, options: Int
981981
* var arr = ndarray2array( y );
982982
* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ]
983983
*/
984-
declare function map<T = unknown, V = unknown>( x: typedndarray<T>, options: Uint32Options, fcn: Callback<T, number, V>, thisArg?: ThisParameterType<Callback<T, number, V>> ): uint32ndarray;
984+
declare function map<T = unknown, W = unknown>( x: typedndarray<T>, options: Uint32Options, fcn: Callback<T, typedndarray<T>, number, W>, thisArg?: ThisParameterType<Callback<T, typedndarray<T>, number, W>> ): uint32ndarray;
985985

986986
/**
987987
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -1019,7 +1019,7 @@ declare function map<T = unknown, V = unknown>( x: typedndarray<T>, options: Uin
10191019
* var arr = ndarray2array( y );
10201020
* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ]
10211021
*/
1022-
declare function map<T = unknown, V = unknown>( x: typedndarray<T>, options: Uint16Options, fcn: Callback<T, number, V>, thisArg?: ThisParameterType<Callback<T, number, V>> ): uint16ndarray;
1022+
declare function map<T = unknown, W = unknown>( x: typedndarray<T>, options: Uint16Options, fcn: Callback<T, typedndarray<T>, number, W>, thisArg?: ThisParameterType<Callback<T, typedndarray<T>, number, W>> ): uint16ndarray;
10231023

10241024
/**
10251025
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -1057,7 +1057,7 @@ declare function map<T = unknown, V = unknown>( x: typedndarray<T>, options: Uin
10571057
* var arr = ndarray2array( y );
10581058
* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ]
10591059
*/
1060-
declare function map<T = unknown, V = unknown>( x: typedndarray<T>, options: Uint8Options, fcn: Callback<T, number, V>, thisArg?: ThisParameterType<Callback<T, number, V>> ): uint8ndarray;
1060+
declare function map<T = unknown, W = unknown>( x: typedndarray<T>, options: Uint8Options, fcn: Callback<T, typedndarray<T>, number, W>, thisArg?: ThisParameterType<Callback<T, typedndarray<T>, number, W>> ): uint8ndarray;
10611061

10621062
/**
10631063
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -1095,7 +1095,7 @@ declare function map<T = unknown, V = unknown>( x: typedndarray<T>, options: Uin
10951095
* var arr = ndarray2array( y );
10961096
* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ]
10971097
*/
1098-
declare function map<T = unknown, V = unknown>( x: typedndarray<T>, options: Uint8COptions, fcn: Callback<T, number, V>, thisArg?: ThisParameterType<Callback<T, number, V>> ): uint8cndarray;
1098+
declare function map<T = unknown, W = unknown>( x: typedndarray<T>, options: Uint8COptions, fcn: Callback<T, typedndarray<T>, number, W>, thisArg?: ThisParameterType<Callback<T, typedndarray<T>, number, W>> ): uint8cndarray;
10991099

11001100
/**
11011101
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -1134,7 +1134,7 @@ declare function map<T = unknown, V = unknown>( x: typedndarray<T>, options: Uin
11341134
* var arr = ndarray2array( y );
11351135
* // returns [ [ true, true, true ], [ true, true, true ] ]
11361136
*/
1137-
declare function map<T = unknown, V = unknown>( x: typedndarray<T>, options: BoolOptions, fcn: Callback<T, boolean, V>, thisArg?: ThisParameterType<Callback<T, boolean, V>> ): boolndarray;
1137+
declare function map<T = unknown, W = unknown>( x: typedndarray<T>, options: BoolOptions, fcn: Callback<T, typedndarray<T>, boolean, W>, thisArg?: ThisParameterType<Callback<T, typedndarray<T>, boolean, W>> ): boolndarray;
11381138

11391139
/**
11401140
* Applies a callback function to elements in an input ndarray and assigns results to elements in a new output ndarray.
@@ -1172,7 +1172,7 @@ declare function map<T = unknown, V = unknown>( x: typedndarray<T>, options: Boo
11721172
* var arr = ndarray2array( y );
11731173
* // returns [ [ 20, 30, 40 ], [ 80, 90, 100 ] ]
11741174
*/
1175-
declare function map<T = unknown, U = unknown, V = unknown>( x: typedndarray<T>, options: GenericOptions, fcn: Callback<T, U, V>, thisArg?: ThisParameterType<Callback<T, U, V>> ): genericndarray<U>;
1175+
declare function map<T = unknown, V = unknown, W = unknown>( x: typedndarray<T>, options: GenericOptions, fcn: Callback<T, typedndarray<T>, V, W>, thisArg?: ThisParameterType<Callback<T, typedndarray<T>, V, W>> ): genericndarray<V>;
11761176

11771177

11781178
// EXPORTS //

0 commit comments

Comments
 (0)