Type Alias SomeType<T>

SomeType<T>: T extends Option<infer A>
    ? A
    : never

Extract the value type from an Option type.

Type Parameters

  • T
type VoteOption = Option<"yes" | "no">;
type VoteValue = SomeType<VoteOption>; // "yes" | "no"