remeda
Version:
A utility library for JavaScript and Typescript.
21 lines (19 loc) • 655 B
TypeScript
import { NarrowedTo } from "./NarrowedTo-DcQJp20I.js";
//#region src/isArray.d.ts
/**
* A function that checks if the passed parameter is an Array and narrows its type accordingly.
*
* @param data - The variable to check.
* @returns True if the passed input is an Array, false otherwise.
* @signature
* R.isArray(data)
* @example
* R.isArray([5]) //=> true
* R.isArray([]) //=> true
* R.isArray('somethingElse') //=> false
* @category Guard
*/
declare function isArray<T>(data: ArrayLike<unknown> | T): data is NarrowedTo<T, ReadonlyArray<unknown>>;
//#endregion
export { isArray };
//# sourceMappingURL=isArray-oTu1EVfi.d.ts.map