GetDataEnumKindContent<T, K>: Omit<Extract<T, {
    __kind: K;
}>, "__kind">

Extracts a variant from a data enum without its discriminator.

Example

type WebPageEvent =
| { __kind: 'pageview', url: string }
| { __kind: 'click', x: number, y: number };
type ClickEvent = GetDataEnumKindContent<WebPageEvent, 'click'>;
// -> { x: number, y: number }

Type Parameters

  • T extends DataEnum

  • K extends T["__kind"]

Generated using TypeDoc