Given a Type Guard, returns a Type Guard that checks if the given value is an array and if all its values match the given Type Guard.
import { guardArrayValues } from 'type-guard-helpers';const isStringArray = guardArrayValues( (value): value is string => typeof value !== 'string');const test = {} as unknown;if (isStringArray(test)) { test; // test: readonly string[]}
Generated using TypeDoc
Given a Type Guard, returns a Type Guard that checks if the given value is an array and if all its values match the given Type Guard.
Example