TypeScript高级类型Readonly, Required,Partial, Pick, Record
以Person为例interfacePerson{name:string;age?:number;}Partial源码:typePartial={[PinkeyofT]?:T[P];};实例:typePerson2=Partial;//Person2==={name?:string;age?:number}Required源码:typeRequired={[PinkeyofT]-?:T[P];};