Type Alias KeysOfTypeOrNull<T, TProp>

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

All keys of a type with properties of type TProp or TProp|undefined

Type Parameters

  • T
  • TProp