Skip to content

Commit e92f470

Browse files
committed
fix: update import path for Collection type definition
Ref: bde4671
1 parent 1fc4de2 commit e92f470

File tree

1 file changed

+5
-6
lines changed
  • lib/node_modules/@stdlib/utils/while-each-right/docs/types

1 file changed

+5
-6
lines changed

lib/node_modules/@stdlib/utils/while-each-right/docs/types/index.d.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

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

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

2525
/**
2626
* Checks whether an element in a collection passes a test.
@@ -54,7 +54,7 @@ type BinaryPredicate<T> = ( value: T, index: number ) => boolean;
5454
* @param collection - input collection
5555
* @returns boolean indicating whether an element in a collection passes a test
5656
*/
57-
type TernaryPredicate<T> = ( value: T, index: number, collection: Collection<T> ) => boolean; // tslint-disable-line max-line-length
57+
type TernaryPredicate<T> = ( value: T, index: number, collection: Collection<T> ) => boolean;
5858

5959
/**
6060
* Checks whether an element in a collection passes a test.
@@ -64,7 +64,7 @@ type TernaryPredicate<T> = ( value: T, index: number, collection: Collection<T>
6464
* @param collection - input collection
6565
* @returns boolean indicating whether an element in a collection passes a test
6666
*/
67-
type Predicate<T> = NullaryPredicate | UnaryPredicate<T> | BinaryPredicate<T> | TernaryPredicate<T>; // tslint-disable-line max-line-length
67+
type Predicate<T> = NullaryPredicate | UnaryPredicate<T> | BinaryPredicate<T> | TernaryPredicate<T>;
6868

6969
/**
7070
* Function invoked for each collection element passing a test.
@@ -93,7 +93,7 @@ type Binary<T> = ( value: T, index: number ) => void;
9393
* @param index - collection index
9494
* @param collection - input collection
9595
*/
96-
type Ternary<T> = ( value: T, index: number, collection: Collection<T> ) => void; // tslint-disable-line max-line-length
96+
type Ternary<T> = ( value: T, index: number, collection: Collection<T> ) => void;
9797

9898
/**
9999
* Function invoked for each collection element passing a test.
@@ -117,7 +117,6 @@ type Callback<T> = Nullary | Unary<T> | Binary<T> | Ternary<T>;
117117
*
118118
* - For dynamic array resizing, the only behavior made intentionally consistent with `whileEach` (iterating from left to right) is when elements are pushed onto the beginning (end) of an array. In other words, for `whileEach()`, `[].push()` behavior is consistent with `whileEachRight()` `[].unshift()` behavior.
119119
*
120-
*
121120
* @param collection - input collection
122121
* @param predicate - function which indicates whether to continue iterating over a collection
123122
* @param fcn - function to invoke
@@ -137,7 +136,7 @@ type Callback<T> = Nullary | Unary<T> | Binary<T> | Ternary<T>;
137136
*
138137
* whileEachRight( arr, predicate, log );
139138
*/
140-
declare function whileEachRight<T = any>( collection: Collection<T>, predicate: Predicate<T>, fcn: Callback<T>, thisArg?: any ): Collection<T>; // tslint-disable-line max-line-length
139+
declare function whileEachRight<T = unknown>( collection: Collection<T>, predicate: Predicate<T>, fcn: Callback<T>, thisArg?: ThisParameterType<Callback<T>> ): Collection<T>;
141140

142141

143142
// EXPORTS //

0 commit comments

Comments
 (0)