Skip to content

Fix option value source type - #1963

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

aweebit wants to merge 1 commit into
tj:developfrom
aweebit:fix/option-value-source-type

Conversation

@aweebit

@aweebit aweebit commented Aug 13, 2023 •

Copy link
Copy Markdown
Contributor

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

shadowspawn commented Aug 17, 2023 •

Copy link
Copy Markdown
Collaborator

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

@aweebit

aweebit commented Aug 17, 2023 •

Copy link
Copy Markdown
Contributor Author

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