Open obriankevin11 opened 1 year ago
Instead of using a C# class use a C# enum with the TsEnum UseString option.
[TsEnum(UseString = true)]
public enum MyEnum
{
Property1,
Property2
}
This will generate your desired TypeScript enum. To access the string equivilant of the enum in C# simply use the ToString funciton.
MyEnum.Property1.ToString()
Is there a way to allow more flexibility in naming conventions for enums? What if I have property value such as "x-my-http-header"?
Hi,
Is it possible to convert this
MyStaticClass.cs
to
myEnums.ts
?
Thank you!