@1771technologies/lytenyte-pro
Version:
Blazingly fast headless React data grid with 100s of features.
11 lines (10 loc) • 394 B
TypeScript
/**
* Returns the first non-null element in an array.
* @param data - An array of any type
* @returns The first element that is neither null nor undefined, or undefined if no such element exists
* @example
* first([null, 1, 2]) // Returns 1
* first([]) // Returns undefined
* first([null, undefined]) // Returns undefined
*/
export declare function first(d: unknown[]): {} | undefined;