interface Order { id : string ; amount : number ; currency : string ; } interface Stripe { card : string ; cvc : string ; } interface PayPal { email : string ; } type CheckoutCard = Order & Stripe ; type CheckoutPayPal = Order & PayPal ; const order = { id : 'xj28s' , amount : 100 , currency : 'USD' } ; const orderCard = { ... order , card : '1000 2000 3000 4000' , cvc : '123' } ; const orderPayPal = { ... order , email : 'abc@def.com' } ; const assigned = Object . assign ( { } , order , orderCard ) ;