Skip to content

Allow author defined option source#3

Merged
shadowspawn merged 4 commits intodevelopfrom
feature/LiteralUnion
Sep 6, 2022
Merged

Allow author defined option source#3
shadowspawn merged 4 commits intodevelopfrom
feature/LiteralUnion

Conversation

@shadowspawn
Copy link
Copy Markdown
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
Copy Markdown
Member

@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.

2 participants