Home > @skunkteam/types > TypeguardResult
The resulting type of a typeguard based on the ResultType
of the Type and the given Input
.
Signature:
type TypeguardResult<ResultType, Input> = unknown extends Input
? Input & ResultType
: [Extract<Input, ResultType>] extends [never]
? Input & ResultType
: Extract<Input, ResultType>;