|
|
|
|
|
by tshaddox
1040 days ago
|
|
It’s not a perfect mapping with JSON. Everyone knows that stuff like functions and dates can’t go over JSON, but there are also subtler things, like the fact that undefined can’t exist as a value in JSON. I’ve seen codebases get pretty mixed up about the semantics of things like properties being optional versus T | undefined. |
|
I use `null` for that purpose, and it's been pretty reliable. What are the situations where that falls down?