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

[misc] TS: Make typescript definitions work with 1.x #3638

Closed
wants to merge 3 commits into from

Conversation

ichernev
Copy link
Contributor

@ichernev ichernev commented Dec 4, 2016

This fixes the definitions file from breaking changes introduced in #3490. Now the file is somewhat compatible with 2.0 with the use of void instead of undefined, but unfortunately null arguments are not supported with 2.x and strictNullChecks, because null keyword is not available in 1.x.

The typescript definitions will be updated for 2.0 (proper null support) with the release of moment 3.x. NOTE Any requests to fix the definitions before that will be denied.

NOTE2: For the eager 2.0 ts users -- the definition file includes in comments whether the void corresponds to null, undefined, or both. So one can simply write a script to generate a proper 2.0 definition. The scope of this generator is not part of the moment team's efforts, so PRs won't be accepted.

@ichernev
Copy link
Contributor Author

ichernev commented Dec 4, 2016

Merged in aedd0dd

@ichernev ichernev changed the title Make typescript definitions work with 1.x [misc] TS: Make typescript definitions work with 1.x Dec 4, 2016
@ichernev ichernev closed this Dec 4, 2016
ichernev added a commit that referenced this pull request Dec 4, 2016
[misc] TS: Make typescript definitions work with 1.x
@mattjohnsonpint mattjohnsonpint added this to the 2.17.1 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants