MultiLoader-Template/node_modules/es-toolkit/dist/compat/object/findKey.d.mts
3944Realms 768f38fc97 feat: 可使用的构建模板
修改了脚本,使其可以推给Maven仓库
2026-05-03 13:02:19 +08:00

18 lines
728 B
TypeScript

import { ObjectIteratee } from '../_internal/ObjectIteratee.mjs';
/**
* Finds the key of the first element that matches the given predicate.
*
* This function determines the type of the predicate and delegates the search
* to the appropriate helper function. It supports predicates as functions, objects,
* arrays, or strings.
*
* @template T - The type of the object.
* @param {T | null | undefined} obj - The object to inspect.
* @param {ObjectIteratee<T>} predicate - The predicate to match.
* @returns {string | undefined} Returns the key of the matched element, else `undefined`.
*/
declare function findKey<T>(obj: T | null | undefined, predicate?: ObjectIteratee<T>): string | undefined;
export { findKey };