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
That might be possible to add support for. One of the current challenges though is that based on the swagger schema (AFAIK) we dont get a name of the enum type, so that needs to be generated somehow when generating the output TS types (so that we have a type to reference), while ensuring the new type name is unique (and at least to some degree with a descriptive name). Have you tried marking the enum type as a reference type in the schema? If that is done that type definition can be used for this, making it easier to make it a string enum type. It could then be possible to have an option flag for which enum type to generate (we want to retain backwards compatibility, and I know many prefer string union types over string enums)
What is string enums needed for btw? Is it needed to have a declared type that can be referenced, or is it something specific with the string enum types thats needed, or is it something else?
Is there a way to transform enums into tyepscript string enums instead of string literal type?
The text was updated successfully, but these errors were encountered: