Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 1.66 KB

README.zh-CN.md

File metadata and controls

22 lines (15 loc) · 1.66 KB

Merge 中等 #object

by ZYSzys @ZYSzys

接受挑战    English 日本語

将两个类型合并成一个类型,第二个类型的键会覆盖第一个类型的键。

例如

type foo = {
  name: string;
  age: string;
}

type coo = {
  age: number;
  sex: string
}

type Result = Merge<foo,coo>; // expected to be {name: string, age: number, sex: string}

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