Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Aug 24, 2023
1 parent 5f508bc commit 8b31a21
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ext/base/gfill-by/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ import { Collection } from '@stdlib/types/array';
*
* @returns fill value
*/
type Nullary<U> = () => U;
type Nullary<U, W> = ( this: W ) => U;

/**
* Returns a fill value.
*
* @param value - array element
* @returns fill value
*/
type Unary<T, U> = ( value: T ) => U;
type Unary<T, U, W> = ( this: W, value: T ) => U;

/**
* Returns a fill value.
Expand All @@ -44,7 +44,7 @@ type Unary<T, U> = ( value: T ) => U;
* @param aidx - array index
* @returns fill value
*/
type Binary<T, U> = ( value: T, aidx: number ) => U;
type Binary<T, U, W> = ( this: W, value: T, aidx: number ) => U;

/**
* Returns a fill value.
Expand All @@ -54,7 +54,7 @@ type Binary<T, U> = ( value: T, aidx: number ) => U;
* @param sidx - strided index (offset + aidx*stride)
* @returns fill value
*/
type Ternary<T, U> = ( value: T, aidx: number, sidx: number ) => U;
type Ternary<T, U, W> = ( this: W, value: T, aidx: number, sidx: number ) => U;

/**
* Returns a fill value.
Expand All @@ -65,7 +65,7 @@ type Ternary<T, U> = ( value: T, aidx: number, sidx: number ) => U;
* @param array - input array
* @returns fill value
*/
type Quaternary<T, U, V> = ( value: T, aidx: number, sidx: number, array: Collection<V> ) => U;
type Quaternary<T, U, V, W> = ( this: W, value: T, aidx: number, sidx: number, array: Collection<V> ) => U;

/**
* Returns a fill value.
Expand All @@ -76,7 +76,7 @@ type Quaternary<T, U, V> = ( value: T, aidx: number, sidx: number, array: Collec
* @param array - input array
* @returns fill value
*/
type Callback<T, U, V> = Nullary<U> | Unary<T, U> | Binary<T, U> | Ternary<T, U> | Quaternary<T, U, V>;
type Callback<T, U, V, W> = Nullary<U, W> | Unary<T, U, W> | Binary<T, U, W> | Ternary<T, U, W> | Quaternary<T, U, V, W>;

/**
* Interface describing `gfillBy`.
Expand Down Expand Up @@ -113,7 +113,7 @@ interface Routine {
* gfillBy( x.length, x, 1, fill );
* // x => [ 5.0, 5.0, 5.0, 0.0, 5.0, 5.0, 5.0, 5.0 ]
*/
<T = unknown, U = unknown, V = unknown>( N: number, x: Collection<V>, stride: number, clbk: Callback<T, U, V>, thisArg?: ThisParameterType<Callback<T, U, V>> ): Collection<U | V>;
<T = unknown, U = unknown, V = unknown, W = unknown>( N: number, x: Collection<V>, stride: number, clbk: Callback<T, U, V, W>, thisArg?: ThisParameterType<Callback<T, U, V, W>> ): Collection<U | V>;

/**
* Fills a strided array according to a provided callback function and using alternative indexing semantics.
Expand Down Expand Up @@ -147,7 +147,7 @@ interface Routine {
* gfillBy.ndarray( x.length, x, 1, 0, fill );
* // x => [ 5.0, 5.0, 5.0, 0.0, 5.0, 5.0, 5.0, 5.0 ]
*/
ndarray<T = unknown, U = unknown, V = unknown>( N: number, x: Collection<V>, stride: number, offset: number, clbk: Callback<T, U, V>, thisArg?: ThisParameterType<Callback<T, U, V>> ): Collection<U | V>;
ndarray<T = unknown, U = unknown, V = unknown, W = unknown>( N: number, x: Collection<V>, stride: number, offset: number, clbk: Callback<T, U, V, W>, thisArg?: ThisParameterType<Callback<T, U, V, W>> ): Collection<U | V>;
}

/**
Expand Down

0 comments on commit 8b31a21

Please sign in to comment.