You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/object/findKey.ts
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
/**
2
2
* Finds the key of the first element in the object that satisfies the provided testing function.
3
3
*
4
-
* @param obj - The object to search.
5
-
* @param predicate - The function to execute on each value in the object. It takes three arguments:
4
+
* @param{T} obj - The object to search.
5
+
* @param{(value: T[keyof T], key: keyof T, obj: T) => boolean} predicate - The function to execute on each value in the object. It takes three arguments:
6
6
* - value: The current value being processed in the object.
7
7
* - key: The key of the current value being processed in the object.
8
8
* - obj: The object that findKey was called upon.
9
-
* @returns The key of the first element in the object that passes the test, or undefined if no element passes.
9
+
* @returns{keyof T | undefined} The key of the first element in the object that passes the test, or undefined if no element passes.
0 commit comments