Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nulls cannot be passed as arguments in place of MomentInput #5285

Closed
capaj opened this issue Nov 8, 2019 · 2 comments
Closed

nulls cannot be passed as arguments in place of MomentInput #5285

capaj opened this issue Nov 8, 2019 · 2 comments

Comments

@capaj
Copy link

capaj commented Nov 8, 2019

This commit: 5a1843d

breaks typescript strict mode-it shows a type error whenever I pass null into isAfter method for example.

Can it be reverted?
Maybe in a next major?

@capaj capaj changed the title nulls cannot be passed as arguments to MomentInput nulls cannot be passed as arguments in place of MomentInput Nov 8, 2019
@harkue
Copy link
Contributor

harkue commented Nov 14, 2019

It is said as "Replace null/undefined with void in moment.d.ts to fix pre 2.0 typescript users" in the commit log. Maybe reverted in a new major version will be better.

@marwahaha
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants