Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 1.49 KB

README.zh-CN.md

File metadata and controls

20 lines (15 loc) · 1.49 KB

Diff 中等 #object

by ZYSzys @ZYSzys

接受挑战    English

获取两个接口类型中的差值属性。

type Foo = {
  a: string;
  b: number;
}
type Bar = {
  a: string;
  c: boolean
}

type Result1 = Diff<Foo,Bar> // { b: number, c: boolean }
type Result2 = Diff<Bar,Foo> // { b: number, c: boolean }

返回首页 分享你的解答 查看解答