hoppscotch/types/ts-utils.d.ts
2021-05-17 17:11:58 +05:30

4 lines
93 B
TypeScript

export type KeysMatching<T, V> = {
[K in keyof T]-?: T[K] extends V ? K : never
}[keyof T]