Excludes undefined of a type union.
undefined
Every now and then a type is possibly undefined, this type gets rid of the undefined in the union.
const maybeUndefined: string | undefined = "🟢";const definitelyDefined: Defined<typeof maybeUndefined> = "🟢"; Copy
const maybeUndefined: string | undefined = "🟢";const definitelyDefined: Defined<typeof maybeUndefined> = "🟢";
Maybe
Excludes
undefined
of a type union.Remarks
Every now and then a type is possibly
undefined
, this type gets rid of theundefined
in the union.Example
See
Maybe