You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a choice field contains a dash (-) then the resulting enum's name also contains a dash, which then doesn't compile. This results in an error running RudderTyper.
The reproduce here is a choice field within an array type, though I assume this would apply to any choice field.
$ npx rudder-typer update
✘ Error: An unexpected error occurred.
→ '{' expected. (44:19)
42 | }
43 |
> 44 | export enum Custom-type-enum-member {
| ^
45 | S_CT_FIRST = 'ct-first',
46 | S_CT_SECOND = 'ct-second',
47 | }
If you are unable to resolve this issue,open an issue on GitHub. Please include
that you are using version 1.3.1 of RudderTyper.
When addressing this it may be worth considering #104 at the same time.
The text was updated successfully, but these errors were encountered:
Thanks for opening this issue! We'll get back to you shortly. If it is a bug, please make sure to add steps to reproduce the issue.
PeterJCLaw
changed the title
TypeScript enum generation doesn't account for invalid characters in field names
TypeScript enum generation doesn't account for invalid characters (e.g: dashes) in field names
Dec 19, 2024
If a choice field contains a dash (
-
) then the resulting enum's name also contains a dash, which then doesn't compile. This results in an error running RudderTyper.The reproduce here is a choice field within an array type, though I assume this would apply to any choice field.
plan.json
When addressing this it may be worth considering #104 at the same time.
The text was updated successfully, but these errors were encountered: