Handling Missing, Null, Undefined, and Empty Strings with Default Values in TypeScript Structs
Is there a cleaner way to do this?
Basically, I want to turn
I'd love to be able to say something like the below (although I doubt it would actually be possible):
Basically, I want to turn
<missing> | null | undefined | "" into the default value...and this is the only way I've found so far that seems to work.I'd love to be able to say something like the below (although I doubt it would actually be possible):
