isPair

function isPair<T, U>(tGuard, uGuard): (x) => x is [T, U]

Returns true if the specified value is a tuple where the first element, T, passes the tGuard function
and the second element, U, passes the uGuard function

Type parameters

Type parameter
T
U

Parameters

ParameterTypeDescription
tGuard(x) => x is Tthe type guard function to test the first element in the tuple, T
uGuard(x) => x is Uthe type guard function to test the second element in the tuple, U

Returns

Function

whether the value is a tuple of the form [T, U]

Parameters

ParameterType
xunknown

Returns

x is [T, U]