isRecord

function isRecord<T>(typeGuard): (val) => val is Record<string, T>

Returns true if the specified value is an object (i.e. it's safe to do property accesses on it),
and every value matches the record type.

Type parameters

Type parameter
T

Parameters

ParameterType
typeGuard(a) => a is T

Returns

Function

Whether variable is an object.

Parameters

ParameterType
valunknown

Returns

val is Record<string, T>