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

Allow author defined option source #3

Merged
merged 4 commits into from
Sep 6, 2022
Merged

Conversation

shadowspawn
Copy link
Contributor

The intent is to allow the author to make up and use their own option sources for advanced cases. Since this is rare, we also want editor to suggest the values Commander knows about. At the time I wrote the code I was not comfortable doing the fancy typing to make this possible and went for just the known values to get the editor and TypeScript support.

This repo is adding extra typing, so seems a good place to try this out before adding into Commander.

Also adds implied which got left out when Option.implies() added: tj/commander.js#1788 (comment)

Copy link
Contributor

@abetomo abetomo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@shadowspawn shadowspawn merged commit ac97cee into develop Sep 6, 2022
@shadowspawn shadowspawn deleted the feature/LiteralUnion branch September 6, 2022 09:04
aweebit added a commit to aweebit/commander.js that referenced this pull request Jul 29, 2023
OptionValueSource is only meaningful as defined in
commander-js/extra-typings#3
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