Type Alias KeysOfType<T, TProp>

KeysOfType<T, TProp>: {
    [P in keyof T]-?: T[P] extends TProp
        ? P
        : never
}[keyof T]

All keys of a type with properties of type TProp

Type Parameters

  • T
  • TProp