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
The other implementations for Kotlin and C# output an enum type. The Typescript code standard in PR's keep asking for Enums as the preferred implementation, so we are converting the String literal Union types output from this package to hardcoded Enums... This process seems backwards.
Describe the solution you'd like
I would like the Typescript allowedValues to ouput an Enum type
If this works and is accepted, it would be a breaking change and not backwards compatible. So for that reason, it may not be possible to make this update.
The Typescript string literal type definition says:
In practice string literal types combine nicely with union types, type guards, and type aliases. You can use these features together to get enum-like behavior with strings.
Which I think works fine. We keep getting comments on poor implementation for allowedValues and should use Enum types as its the "preferred standard" for reviewers.
I would expect consistency in the implementation here across languages, if possible.
In practice string literal types combine nicely with union types, type guards, and type aliases. You can use these features together to get enum-like behavior with strings.
Which I think works fine. We keep getting comments on poor implementation for allowedValues
We can enhance telemetry generator to generate iterable names for the union types.
Is your feature request related to a problem? Please describe.
The current VSCode
allowedValues
outputs a string literal union type in Typescript:The other implementations for Kotlin and C# output an enum type. The Typescript code standard in PR's keep asking for Enums as the preferred implementation, so we are converting the String literal Union types output from this package to hardcoded Enums... This process seems backwards.
Describe the solution you'd like
I would like the Typescript
allowedValues
to ouput an Enum typeDescribe alternatives you've considered
I have not
Additional context
Kotlin output for enum
All code snippets referenced from test files
generatorOutput.ts
andtestGeneratorOutput
for Kotlin and Typescript within this package.The text was updated successfully, but these errors were encountered: