Hacker News new | ask | show | jobs
by dvdhnt 1963 days ago
`null` isn't a valid value for "date" because it is defined as `date?: Date` which evaluates to the type "Date or undefined"
2 comments

Yes assuming you are in strict mode, but not true otherwise.
If you had something typed as `any` and the value was `null` it would be possible to encounter an issue