Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
dvdhnt
· 5y ago · 0 comments
`null` isn't a valid value for "date" because it is defined as `date?: Date` which evaluates to the type "Date or undefined"
Comments
[–]
s0uthPaw88
5y ago
Yes assuming you are in strict mode, but not true otherwise.
[–]
s0uthPaw88
5y ago
If you had something typed as `any` and the value was `null` it would be possible to encounter an issue