2323import { typedndarray } from '@stdlib/types/ndarray' ;
2424
2525/**
26- * Returns the result of callback function .
26+ * Returns a boolean indicating whether an element passes a test .
2727*
28- * @returns result
28+ * @returns boolean indicating whether an element passes a test
2929*/
3030type Nullary < ThisArg > = ( this : ThisArg ) => boolean ;
3131
3232/**
33- * Returns the result of callback function .
33+ * Returns a boolean indicating whether an element passes a test .
3434*
3535* @param value - current array element
36- * @returns result
36+ * @returns boolean indicating whether an element passes a test
3737*/
3838type Unary < T , ThisArg > = ( this : ThisArg , value : T ) => boolean ;
3939
4040/**
41- * Returns the result of callback function .
41+ * Returns a boolean indicating whether an element passes a test .
4242*
4343* @param value - current array element
4444* @param index - current array element index
45- * @returns result
45+ * @returns boolean indicating whether an element passes a test
4646*/
4747type Binary < T , ThisArg > = ( this : ThisArg , value : T , index : number ) => boolean ;
4848
4949/**
50- * Returns the result of callback function .
50+ * Returns a boolean indicating whether an element passes a test .
5151*
5252* @param value - current array element
5353* @param index - current array element index
5454* @param array - input ndarray
55- * @returns result
55+ * @returns boolean indicating whether an element passes a test
5656*/
5757type Ternary < T , U , ThisArg > = ( this : ThisArg , value : T , index : number , array : U ) => boolean ;
5858
5959/**
60- * Returns the result of callback function .
60+ * Returns a boolean indicating whether an element passes a test .
6161*
6262* @param value - current array element
6363* @param index - current array element index
6464* @param array - input ndarray
65- * @returns result
65+ * @returns boolean indicating whether an element passes a test
6666*/
67- type Callback < T , U , ThisArg > = Nullary < ThisArg > | Unary < T , ThisArg > | Binary < T , ThisArg > | Ternary < T , U , ThisArg > ;
67+ type Predicate < T , U , ThisArg > = Nullary < ThisArg > | Unary < T , ThisArg > | Binary < T , ThisArg > | Ternary < T , U , ThisArg > ;
6868
6969/**
7070* Returns the index of the first element in a one-dimensional ndarray which passes a test implemented by a predicate function.
7171*
7272* @param arrays - array-like object containing an input ndarray
73- * @param clbk - callback function
74- * @param thisArg - callback execution context
73+ * @param clbk - predicate function
74+ * @param thisArg - predicate execution context
7575* @returns index
7676*
7777* @example
@@ -87,7 +87,7 @@ type Callback<T, U, ThisArg> = Nullary<ThisArg> | Unary<T, ThisArg> | Binary<T,
8787* var v = gfindIndex( [ x ], clbk );
8888* // returns 2
8989*/
90- declare function gfindIndex < T = unknown , U extends typedndarray < T > = typedndarray < T > , ThisArg = unknown > ( arrays : [ U ] , clbk : Callback < T , U , ThisArg > , thisArg ?: ThisParameterType < Callback < T , U , ThisArg > > ) : number ;
90+ declare function gfindIndex < T = unknown , U extends typedndarray < T > = typedndarray < T > , ThisArg = unknown > ( arrays : [ U ] , clbk : Predicate < T , U , ThisArg > , thisArg ?: ThisParameterType < Predicate < T , U , ThisArg > > ) : number ;
9191
9292
9393// EXPORTS //
0 commit comments