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

feat: support enum arg type #83

Merged
merged 5 commits into from Mar 18, 2024
Merged

feat: support enum arg type #83

merged 5 commits into from Mar 18, 2024

Conversation

Barbapapazes
Copy link
Member

@Barbapapazes Barbapapazes commented Oct 9, 2023

πŸ”— Linked issue

fix #82

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

I add support for enum. This allow to specify a list of possible values for a property and fail if the value is not in the list.

  • I have a type issue with ParsedArgs. I would love to infer from the options. eg: if ['a', 'b'] are the options, then the type of the property should be 'a' | 'b' instead of string or number. I don't know how to solve it.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@Barbapapazes Barbapapazes added the enhancement New feature or request label Oct 9, 2023
@Barbapapazes Barbapapazes self-assigned this Oct 9, 2023
@Barbapapazes Barbapapazes requested a review from pi0 October 9, 2023 07:12
@pi0 pi0 changed the title feat: support enum feat: support enum arg type Mar 18, 2024
@pi0 pi0 merged commit 00a9ffd into main Mar 18, 2024
2 checks passed
pi0 pushed a commit that referenced this pull request Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support enum type for args
2 participants