Implement DiffKeys<A, B> to return the keys either in A or B, but not in both. 题目出处:https://bigfrontend.dev/zh/typescript/implement-Diff-A-B type A = DiffKeys<{a: 1, b: 2}, {b: 1, c: 2}> // 'a' | 'c' 1.实现思路分析 获取对象类型的keys,可以通过keyof 操作符去实现。 用数学集合的角度去...

Markdown supported · ⌘↵ to post
No responses yet.