Skip to content

Commit

Permalink
fix: fixed type definition for findIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
abdul99ahad committed Aug 6, 2024
1 parent 3104df0 commit 6362758
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/collection.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function find<T>(collection: Collection<T>, matcher: Matcher<T>): T | und
*
* @return
*/
export function findIndex<T>(collection: Collection<T>, matcher: Matcher<T>): number | undefined;
export function findIndex<T>(collection: Collection<T>, matcher: Matcher<T>): number | string | undefined;

/**
* Find element in collection.
Expand Down
2 changes: 1 addition & 1 deletion lib/collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export function find(collection, matcher) {
* @param {Collection<T>} collection
* @param {Matcher<T>} matcher
*
* @return {number}
* @return {number | string | undefined}
*/
export function findIndex(collection, matcher) {

Expand Down

0 comments on commit 6362758

Please sign in to comment.