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

Updated yargs.js to allow both undefined and nulls #945

Merged
merged 1 commit into from Sep 3, 2017

Conversation

mike-weshop
Copy link
Contributor

TypeScript requires the usage of undefined instead of null - this update allows both.

TypeScript requires the usage of undefined instead of null - this update allows both.
@mike-weshop
Copy link
Contributor Author

The main reason for this, if I use "null" then the TypeScript Compiler fails as it needs undefined instead of null. And if i use undefined then yargs fails as it requires a number or null. This hopefully fixes yargs for people using TS.

@bcoe bcoe merged commit 792564d into yargs:master Sep 3, 2017
@bcoe
Copy link
Member

bcoe commented Sep 3, 2017

@mike-weshop thanks for the contribution; off the top of my head I can't think of why accepting both undefined and null anywhere would cause issues, we can always follow on with a patch worst case scenario.

@bcoe
Copy link
Member

bcoe commented Sep 3, 2017

@mike-weshop your work is scheduled to go out the door in the next release of yargs. Mind helping me test? You can do so by running:

npm i yargs@next

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

Successfully merging this pull request may close these issues.

None yet

2 participants