Contents tagged with Enum

  • Generate TypeScript from Enum

    Hello everybody,

    today I want to share with the world code, which generates typescript from enum declaration. I suppose everything should be understandable from code itself:

    using System;

    using System.Collections.Generic;

    using System.ComponentModel;

    using System.Linq;

    using System.Reflection;

    using System.Text;

    using System.Threading.Tasks;

    namespace System


    public static class AttributesSimplification





    public enum EnumSample


    [Description("Choice One")]


    [Description("Choice Two")]



       gives following ts:

    module Enumerations {

    export module EnumSample {

    export enum Enum {

    ChoiceOne = 0, … more