Using JavaScript
to create and object that will be assigned default values optional values aren't assigned.Destructuring assignment
Create an interface like the following:
Create a defaults object like the following:
Then create a couple of overrides:
Then you can use these to create a combined set of inputs using Javascript's language feature:Destructuring assignment
will produce the following result type: