Can someone help me grasp the distinction between two methods of defining an optional parameter in a function:
parameter?: type
and
parameter?: type | undefined
My understanding is that the first option is essentially a shortcut for
parameter: type | undefined = undefined
Is there any nuance to the second approach?
Appreciate any insights!