Home > @whatsaaaa/types > isTypedArray
Check whether a given value is an array where each member is of a specified type
Signature:
export declare function isTypedArray<T>(arr: unknown, check: (x: any) => x is T): arr is T[];
Parameter | Type | Description |
---|---|---|
arr | unknown | array to check |
check | (x: any) => x is T | type guard to use when evaluating each item |
Returns:
arr is T[]