type KeyOfByType<T extends object, P> = ???type T1 = { a: string b: number c: string d: object }type T2 = KeyOfByType<T1, string>// type T2 = "a" | "c"
如何定义以上的KeyOfByType?
KeyOfByType
呼唤远方
相关分类