you can use optional variable by ? or if you have multiple optional variable by ..., example:
function details(Namename: string, country="CA", address?: string, ...hobbies: string) { // ... } In the above: Name: is a must country: has a default address: is an optional param hobbies: is an array of optional params
nameis requiredcountryis required and has a default valueaddressis optionalhobbiesis an array of optional params