Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 551 Bytes

types.typeguardresult.md

File metadata and controls

17 lines (12 loc) · 551 Bytes

Home > @skunkteam/types > TypeguardResult

TypeguardResult type

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>;