svenheden / csharp-models-to-typescript

C# models to TypeScript
89 stars 58 forks source link

Are public const supported? #36

Open fwd079 opened 5 years ago

fwd079 commented 5 years ago

Hi My class

name MyNamespace {
    public class MyClass
    {
        #region Constants.

        public const string DefaultLanguage= "English";

        public const string AllowedArea = "index.html"

        #endregion
   }
}

When run through the tool, comes out as:

declare module MyNamespace {
    // MyNamespace\MyClass.cs
    export interface MyClass{

    }
}

How to gain this output please:

namespace MyNamespace {
    // MyNamespace\MyClass.cs
    export class MyClass {
       public static DefaultLanguage: string = "English";
       public static AllowedArea: string = "index.html"
    }
}

Thank you for your help in this.

Kind Regards Fawad