Skip to content

Commit 97e1505

Browse files
committed
Auto-generated commit
1 parent fe7a8cf commit 97e1505

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/types/index.d.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ type Iterator<T> = TypedIterator<T> | TypedIterableIterator<T>;
3131
*
3232
* @returns iterator value
3333
*/
34-
type Nullary<U> = () => U;
34+
type Nullary<U, V> = ( this: V ) => U;
3535

3636
/**
3737
* Map function invoked for each iterated value.
3838
*
3939
* @param value - iterated value
4040
* @returns iterator value
4141
*/
42-
type Unary<T, U> = ( value: T ) => U;
42+
type Unary<T, U, V> = ( this: V, value: T ) => U;
4343

4444
/**
4545
* Map function invoked for each iterated value.
@@ -48,7 +48,7 @@ type Unary<T, U> = ( value: T ) => U;
4848
* @param index - iterated value index
4949
* @returns iterator value
5050
*/
51-
type Binary<T, U> = ( value: T, index: number ) => U;
51+
type Binary<T, U, V> = ( this: V, value: T, index: number ) => U;
5252

5353
/**
5454
* Map function invoked for each iterated value.
@@ -58,7 +58,7 @@ type Binary<T, U> = ( value: T, index: number ) => U;
5858
* @param src - source array-like object
5959
* @returns iterator value
6060
*/
61-
type Ternary<T, U> = ( value: T, index: number, src: Collection<U> ) => U;
61+
type Ternary<T, U, V> = ( this: V, value: T, index: number, src: Collection<U> ) => U;
6262

6363
/**
6464
* Map function invoked for each iterated value.
@@ -68,7 +68,7 @@ type Ternary<T, U> = ( value: T, index: number, src: Collection<U> ) => U;
6868
* @param src - source array-like object
6969
* @returns iterator value
7070
*/
71-
type MapFunction<T, U> = Nullary<U> | Unary<T, U> | Binary<T, U> | Ternary<T, U>;
71+
type MapFunction<T, U, V> = Nullary<U, V> | Unary<T, U, V> | Binary<T, U, V> | Ternary<T, U, V>;
7272

7373
/**
7474
* Fills an array-like object view from right to left with values returned from an iterator.
@@ -91,7 +91,7 @@ type MapFunction<T, U> = Nullary<U> | Unary<T, U> | Binary<T, U> | Ternary<T, U>
9191
* var arr = iterator2arrayviewRight( iter, new Float64Array( 20 ) );
9292
* // returns <Float64Array>
9393
*/
94-
declare function iterator2arrayviewRight<T = unknown, U = T>( iterator: Iterator<T>, out: Collection<U>, mapFcn?: MapFunction<T, U>, thisArg?: ThisParameterType<MapFunction<T, U>> ): Collection<U>;
94+
declare function iterator2arrayviewRight<T = unknown, U = unknown, V = unknown>( iterator: Iterator<T>, out: Collection<U>, mapFcn?: MapFunction<T, U, V>, thisArg?: ThisParameterType<MapFunction<T, U, V>> ): Collection<U>;
9595

9696
/**
9797
* Fills an array-like object view from right to left with values returned from an iterator.
@@ -115,7 +115,7 @@ declare function iterator2arrayviewRight<T = unknown, U = T>( iterator: Iterator
115115
* var arr = iterator2arrayviewRight( iter, new Float64Array( 20 ), 5 );
116116
* // returns <Float64Array>
117117
*/
118-
declare function iterator2arrayviewRight<T = unknown, U = T>( iterator: Iterator<T>, out: Collection<U>, begin: number, mapFcn?: MapFunction<T, U>, thisArg?: ThisParameterType<MapFunction<T, U>> ): Collection<U>;
118+
declare function iterator2arrayviewRight<T = unknown, U = unknown, V = unknown>( iterator: Iterator<T>, out: Collection<U>, begin: number, mapFcn?: MapFunction<T, U, V>, thisArg?: ThisParameterType<MapFunction<T, U, V>> ): Collection<U>;
119119

120120
/**
121121
* Fills an array-like object view from right to left with values returned from an iterator.
@@ -141,7 +141,7 @@ declare function iterator2arrayviewRight<T = unknown, U = T>( iterator: Iterator
141141
* var arr = iterator2arrayviewRight( iter, new Float64Array( 20 ), 5, 8 );
142142
* // returns <Float64Array>
143143
*/
144-
declare function iterator2arrayviewRight<T = unknown, U = T>( iterator: Iterator<T>, out: Collection<U>, begin: number, end: number, mapFcn?: MapFunction<T, U>, thisArg?: ThisParameterType<MapFunction<T, U>> ): Collection<U>;
144+
declare function iterator2arrayviewRight<T = unknown, U = unknown, V = unknown>( iterator: Iterator<T>, out: Collection<U>, begin: number, end: number, mapFcn?: MapFunction<T, U, V>, thisArg?: ThisParameterType<MapFunction<T, U, V>> ): Collection<U>;
145145

146146

147147
// EXPORTS //

0 commit comments

Comments
 (0)