Type alias KeyHaving<T, V>

KeyHaving<T, V>: keyof {
    [K in keyof T as T[K] extends V
        ? K
        : never]: never
}

A helper type to get the keys of a type depending on a value constraint.

Type Parameters

  • T

    The source type

  • V

    The value type