Skip to content

Fix option value source type#1963

Closed
aweebit wants to merge 1 commit intotj:developfrom
aweebit:fix/option-value-source-type
Closed

Fix option value source type#1963
aweebit wants to merge 1 commit intotj:developfrom
aweebit:fix/option-value-source-type

Conversation

@aweebit
Copy link
Copy Markdown
Contributor

@aweebit aweebit commented Aug 13, 2023

The change has been manually cherry-picked from #1919 so that it can be discussed independently.

Problem

#1919 (comment)
#1919 (comment)
#1919 (comment)

Solution

Compared with the original solution from #1919 (see 7fd0b22...52d5885), the one suggested here keeps OptionValueSource as an exported type (could be used in subclasses to narrow down the allowed custom sources) and uses the OptionValueSource | string union instead of just string for additional clarity.

ChangeLog

Fixed

  • option value source type (undefined and arbitrary custom source strings are allowed now)

Peer PRs

Changes are to be merged into…

@shadowspawn
Copy link
Copy Markdown
Collaborator

shadowspawn commented Aug 17, 2023

This isn't quite right, and ultimately I want to bring in the changes first tried in commander-js/extra-typings#3

@aweebit
Copy link
Copy Markdown
Contributor Author

aweebit commented Aug 17, 2023

This isn't quite right, and ultimately I want to bring in the changes first tried in commander-js/extra-typings#3

Okay, but #1967 won't work without the problem with this type being solved.

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