Skip to main content

@tscommon/option

Index

Classes

Type Aliases

Type Aliases

OptionType

OptionType<T>: T extends Option<infer U> ? U : T

Returns the type of the value of the option.

@example
type T0 = OptionType<Option<number>>; // number
type T1 = OptionType<Option<string>>; // string
type T2 = OptionType<None>; // never

Type parameters

  • T
Page Options