wanasit / chrono

A natural language date parser in Javascript
MIT License
4.6k stars 341 forks source link

Fix parseDate return type not nullable #544

Closed amh4r closed 10 months ago

amh4r commented 10 months ago

Fix parseDate returning Date instead of Date | null in its types.

Setting "strictNullChecks": true in tsconfig.json will prevent regressions, but that requires some refactoring to satisfy. There are a handful of places that:

coveralls commented 10 months ago

Coverage Status

coverage: 91.378%. remained the same when pulling 3126f4459d7e22e38dbd8207b4f406ac776828c7 on goodoldneon:fix-parseDate-type into 1f9f7416fecde0ea298bb70c54c31ed160f699aa on wanasit:master.

wanasit commented 10 months ago

Thanks for the fix!