Extracts keys from T whose value types extend V.
T
V
The target type
The value type to match against
type Result = KeyOfType< { a: string; b: number; c: string }, string>;// ^?// "a" | "c" Copy
type Result = KeyOfType< { a: string; b: number; c: string }, string>;// ^?// "a" | "c"
type A = { a: string };type B = { b: number };type Result = KeyOfType<A | B, string | undefined>;// ^?// "a" Copy
type A = { a: string };type B = { b: number };type Result = KeyOfType<A | B, string | undefined>;// ^?// "a"
Extracts keys from
Twhose value types extendV.