@naverpay/hidash
Version:
improved lodash
11 lines (9 loc) • 362 B
TypeScript
/**
* @description
* Gets the first element of an array.
*
* @param {Array<T>|null|undefined} array The array to query.
* @returns {T|undefined} Returns the first element of the array, or `undefined` if the array is empty, null, or undefined.
*/
declare function first<T>(array: T[] | null | undefined): T | undefined;
export { first as default, first };