ts-monorepo

Home > @whatsaaaa/types > isTypedArray

isTypedArray() function

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[];

Parameters

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[]