EventHorizon.Blazor.TypeScript.Interop.Generator icon indicating copy to clipboard operation
EventHorizon.Blazor.TypeScript.Interop.Generator copied to clipboard

Feature: Enum support

Open canhorn opened this issue 4 years ago • 0 comments

Support TypeScript enum generation.

Since a TypeScript definition file can encode the value for the enum into this should just create a class with the values as static file.

Example TS.d:

export enum Space {
    /** Local (object) space */
    LOCAL = 0,
    /** World space */
    WORLD = 1,
    /** Bone space */
    BONE = 2
}

Generated "Enum":

public static class Space 
{
    public const int LOCAL = 0;
    public const int WORLD = 1;
    public const int BONE = 2;
}

canhorn avatar Aug 02 '20 20:08 canhorn