-
Notifications
You must be signed in to change notification settings - Fork 136
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Hi. thanks for this awesome library!
Is it possible to generate numeric enums in typescript from my rust enums?
#[derive(Serialize, Deserialize, TS, Debug)]
#[serde(rename_all = "camelCase")]
#[ts(export, export_to = "../src/types/interfaces/")]
pub enum PlotType {
Display = 0,
Extents = 1,
Limits = 2,
View = 3,
Window = 4,
Layout = 5,
}
becomes
export type PlotType = "display" | "extents" | "limits" | "view" | "window" | "layout";
I would expect it to become something like
export const enum PlotType = {
Display = 0,
Extents = 1,
Limits = 2,
View = 3,
Window = 4,
Layout = 5,
}
Is this possible?
Chaoses-Ib, joaoantoniocardoso, jonatino and carlocorradini
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request