Umi — API References - v1.3.0
    Preparing search index...

    Type Alias GetDataEnumKind<T, K>

    GetDataEnumKind: Extract<T, { __kind: K }>

    Extracts a variant from a data enum.

    Type Parameters

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