Skip to content

feat: support enum arg type - #83

Merged
pi0 merged 5 commits into
mainfrom
feat/support-enum
Mar 18, 2024
Merged

pi0 merged 5 commits into
mainfrom
feat/support-enum

Conversation

@Barbapapazes

@Barbapapazes Barbapapazes commented Oct 9, 2023 •

Copy link
Copy Markdown
Contributor

🔗 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
pi0 pushed a commit that referenced this pull request Mar 18, 2024
@ineshbose

Copy link
Copy Markdown

Hey 👋 is this going to be released? 😬

@nozomuikuta
nozomuikuta deleted the feat/support-enum branch May 1, 2025 16:53
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

3 participants