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

Type Parameters

  • T
  • U