-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
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
Feature request: Emit string enums instead of string literal unions #200
Comments
Hey @rkdrnf! When I released JSTT, TS didn't support string enums yet :) We should support them behind an option. PRs are welcome! |
Is this still not possible? I was really hoping it would be and have run into this now in using it. I may make a PR to do this if I have the chance. |
{ Creates: export interface Resource { export const enum ReservationKind { This is what you need, right? |
This can be closed as #306 was merged. |
@bcherny @johnbillion Would you guys not be in favour to make this possible without adding custom schema properties (#306) and having a flag instead? That's exactly what @cdietschrun seems to have done but it was never finally merged? #262 |
Reopening this per @PerttiK's request. |
I've opened a PR (#405) to add |
Hi, just adding my support for this feature request. I think the |
My PR: #578 |
This is included in [email protected]. Thank you @codan84 for the contribution! |
I hope enums of string
to be converted as typescript string enum like below.
Is there any way to do this?
I need this because I want to reference this enum in other json file as a string,
and also in code, I don't want to use raw string to reference these enum values.
The text was updated successfully, but these errors were encountered: