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

fix: custom flags with union type #813

Merged
merged 5 commits into from
Oct 9, 2023
Merged

fix: custom flags with union type #813

merged 5 commits into from
Oct 9, 2023

Conversation

mdonnalley
Copy link
Contributor

Fixes issue with custom flags with union type unnecessarily enforcing multiple: true

Fixes #812

@W-14261473@

@@ -145,39 +145,39 @@ export const help = (opts: Partial<BooleanFlag<boolean>> = {}): BooleanFlag<void
},
})

type ElementType<T extends ReadonlyArray<unknown>> = T[number]
type ReadonlyElementOf<T extends ReadonlyArray<unknown>> = T[number]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This isn't part of the fix - I just thought it would be a clearer name for the type

shetzel
shetzel previously approved these changes Oct 9, 2023
@mdonnalley mdonnalley merged commit a4afa23 into main Oct 9, 2023
4 checks passed
@mdonnalley mdonnalley deleted the mdonnalley/812 branch October 9, 2023 21:30
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.

Custom flags with multiple: false
2 participants