4 ms·
`null` isn't a valid value for "date" because it is defined as `date?: Date` which evaluates to the type "Date or undefined"
by dvdhnt 6y ago
`null` isn't a valid value for "date" because it is defined as `date?: Date` which evaluates to the type "Date or undefined"
- s0uthPaw88 6y agoYes assuming you are in strict mode, but not true otherwise.
- s0uthPaw88 6y agoIf you had something typed as `any` and the value was `null` it would be possible to encounter an issue