Type alias ExcludeKeys<T, U>

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

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

Type Parameters

  • T
  • U