Type alias Defined<Input>

Defined<Input>: Exclude<Input, undefined>

Excludes undefined of a type union.

Remarks

Every now and then a type is possibly undefined, this type gets rid of the undefined in the union.

Example

const maybeUndefined: string | undefined = "🟢";
const definitelyDefined: Defined<typeof maybeUndefined> = "🟢";

See

Maybe

Type Parameters

  • Input