From 636275867235305f38241f51f2bcbf0db584f6b2 Mon Sep 17 00:00:00 2001 From: Abdul Ahad Date: Tue, 6 Aug 2024 11:39:44 +0200 Subject: [PATCH] fix: fixed type definition for findIndex --- lib/collection.d.ts | 2 +- lib/collection.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/collection.d.ts b/lib/collection.d.ts index 088ce63..54eaf8d 100644 --- a/lib/collection.d.ts +++ b/lib/collection.d.ts @@ -31,7 +31,7 @@ export function find(collection: Collection, matcher: Matcher): T | und * * @return */ -export function findIndex(collection: Collection, matcher: Matcher): number | undefined; +export function findIndex(collection: Collection, matcher: Matcher): number | string | undefined; /** * Find element in collection. diff --git a/lib/collection.js b/lib/collection.js index 5a32da3..7639eef 100644 --- a/lib/collection.js +++ b/lib/collection.js @@ -92,7 +92,7 @@ export function find(collection, matcher) { * @param {Collection} collection * @param {Matcher} matcher * - * @return {number} + * @return {number | string | undefined} */ export function findIndex(collection, matcher) {