Type alias ExtractKeys<T, U>

ExtractKeys<T, U>: {
    [K in keyof T]: T[K] extends U
        ? K
        : never
}[keyof T]

Returns a union of all the keys of T whose values extend from U

Type Parameters

  • T
  • U