loading...

re: Advanced TypeScript Types cheat sheet (with examples) VIEW POST

TOP OF THREAD FULL DISCUSSION
re: What are some really good real world examples for this? (3,4 examples). Wouldn't the optional operator be enough? function foo(bar?: string) { ...
 

Actually it's just personal preference to have null values instead of undefined.
The example I provided is actually not that great, because I tend to use this more with objects and their properties.

code of conduct - report abuse