type Collection = T[] | Record; /** * Return the last item of an array, or undefined for null/empty inputs. * This is a tiny, predictable helper used throughout the codebase. */ export declare function last(items?: T[] | null): T | undefined; /** * Determine whether a value is "empty" by lodash-style rules. * - null/undefined → empty * - arrays/strings → length === 0 * - objects → no own keys */ export declare function isEmpty(value: unknown): boolean; /** * Iterate over an array or object with a simple callback signature. * This keeps call sites uniform without pulling in a full utility library. */ export declare function each(collection: Collection | null | undefined, iteratee: (value: T, key: string | number) => void): void; /** * Alias for each() to preserve compatibility with lodash-style usage. */ export declare function forEach(collection: Collection | null | undefined, iteratee: (value: T, key: string | number) => void): void; /** * Map a collection into an array of results. */ export declare function map(collection: Collection | null | undefined, iteratee: (value: T, key: string | number) => R): R[]; /** * Merge object properties into a target object. * Design note: we intentionally skip null/undefined sources to keep call sites compact. */ export declare function extend(target: T, ...sources: Array): T & U; /** * Return the own keys of an object or an empty array for nullish inputs. */ export declare function keys(value: object | null | undefined): string[]; /** * Return the own values of an object or an empty array for nullish inputs. */ export declare function values(value: Record | null | undefined): T[]; /** * Safe hasOwnProperty wrapper. */ export declare function has(value: object | null | undefined, key: PropertyKey): boolean; /** * Pick a subset of properties into a shallow clone. */ export declare function pick>(value: T, ...props: (keyof T)[]): Partial; /** * Create a new array sorted by a numeric iteratee. */ export declare function sortBy(items: T[], iteratee: (value: T) => number): T[]; /** * Throttle a function so it runs at most once per `wait` milliseconds. * Design note: this mirrors lodash's trailing invocation behavior for the last call. */ export declare function throttle void>(fn: T, wait: number): (...args: Parameters) => void; declare const utils: { last: typeof last; isEmpty: typeof isEmpty; each: typeof each; forEach: typeof forEach; map: typeof map; extend: typeof extend; keys: typeof keys; values: typeof values; has: typeof has; pick: typeof pick; sortBy: typeof sortBy; throttle: typeof throttle; }; export default utils;