Y
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
s0uthPaw88
1963 days ago
Yes assuming you are in strict mode, but not true otherwise.
link
s0uthPaw88
1963 days ago
If you had something typed as `any` and the value was `null` it would be possible to encounter an issue
link