Skip to content

Commit 935d50a

Browse files
authored
fix: ensure support for non-numeric input arrays
Signed-off-by: Athan <[email protected]>
1 parent 7b13902 commit 935d50a

File tree

1 file changed

+4
-4
lines changed
  • lib/node_modules/@stdlib/stats/base/range-by/docs/types

1 file changed

+4
-4
lines changed

lib/node_modules/@stdlib/stats/base/range-by/docs/types/index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { NumericArray, Collection, AccessorArrayLike } from '@stdlib/types/array';
23+
import { Collection, AccessorArrayLike } from '@stdlib/types/array';
2424

2525
/**
2626
* Input array.
2727
*/
28-
type InputArray = NumericArray | Collection | AccessorArrayLike<number>;
28+
type InputArray<T> = Collection<T> | AccessorArrayLike<T>;
2929

3030
/**
3131
* Returns an accessed value.
@@ -118,7 +118,7 @@ interface Routine {
118118
* var v = rangeBy( x.length, x, 1, accessor );
119119
* // returns 18.0
120120
*/
121-
<T = unknown, U = unknown>( N: number, x: InputArray, strideX: number, clbk: Callback<T, U>, thisArg?: ThisParameterType<Callback<T, U>> ): number;
121+
<T = unknown, U = unknown>( N: number, x: InputArray<T>, strideX: number, clbk: Callback<T, U>, thisArg?: ThisParameterType<Callback<T, U>> ): number;
122122

123123
/**
124124
* Computes the range of a strided array via a callback function and using alternative indexing semantics.
@@ -152,7 +152,7 @@ interface Routine {
152152
* var v = rangeBy.ndarray( x.length, x, 1, 0, accessor );
153153
* // returns 18.0
154154
*/
155-
ndarray<T = unknown, U = unknown>( N: number, x: InputArray, strideX: number, offsetX: number, clbk: Callback<T, U>, thisArg?: ThisParameterType<Callback<T, U>> ): number;
155+
ndarray<T = unknown, U = unknown>( N: number, x: InputArray<T>, strideX: number, offsetX: number, clbk: Callback<T, U>, thisArg?: ThisParameterType<Callback<T, U>> ): number;
156156
}
157157

158158
/**

0 commit comments

Comments
 (0)