KeysWhere

source
type KeysWhere<T, U> = {
  [K in StringKeyOf<T>]: T[K] extends U ? K : never;
}[StringKeyOf<T>];