Type alias DiscriminantPaths<T, _Paths>

DiscriminantPaths<T, _Paths>: _Paths extends string
    ? IsUnion<Get<T, _Paths>> extends true
        ? Get<T, _Paths> extends string
            ? _Paths
            : never
        : never
    : never

Extracts the discriminant paths from a nested object type. Discriminant paths are the paths in the object type where the value is a union of discriminant values.

Type Parameters

  • T

    The object type to extract discriminant paths from.

  • _Paths = Paths<T>

    Internal helper type for recursive path extraction.

Returns

The discriminant paths from the object type.

Generated using TypeDoc