asAssertion

function asAssertion<TO, FROM>(validator): (val) => asserts val is TO

Type parameters

Type parameter
TO
FROM

Parameters

ParameterType
validatorValidator<TO, FROM>

Returns

Function

Parameters

ParameterType
valFROM

Returns

asserts val is TO