[TypeScript]インターセクション型
type Product = { title:string; price:number; }; type User = { name:string; }; type Order = Product & User; const firstOrder :Order = { title : "走れメロス", price : 512, name : "John Smith", }; console.log(firstOrder);
{ title: '走れメロス', price: 512, name: 'John Smith' }