Open
Description
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:
declare function select<T extends string | number>(
value: T,
options: {
[key in T]: string
} & {
other: string
}
): string
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
Metadata
Metadata
Assignees
Labels
No labels