We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Select macro doesn't validate choices other than other currently.
other
Make the macro generic over value, and the choice keys required if the value is a union type.
Potential solution:
declare function select<T extends string | number>( value: T, options: { [key in T]: string } & { other: string } ): string
I can extend the types or patch the dependency locally, but it could make sense to contribute this change to benefit everyone
No response
The text was updated successfully, but these errors were encountered:
Feel free to create a PR, there are also type tests, include the updates to them covering your changes. Thanks!
Sorry, something went wrong.
Sounds good! I'll check it out soon
Successfully merging a pull request may close this issue.
Problem Description
Select macro doesn't validate choices other than
other
currently.Proposed Solution
Make the macro generic over value, and the choice keys required if the value is a union type.
Potential solution:
Alternatives Considered
I can extend the types or patch the dependency locally, but it could make sense to contribute this change to benefit everyone
Additional Context
No response
The text was updated successfully, but these errors were encountered: