Contents tagged with TypeScript generation

  • 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

    {

    /*

     

    [Description("Enumerations")]

    public enum EnumSample

    {

    [Description("Choice One")]

    ChoiceOne,

    [Description("Choice Two")]

    ChoiceTwo,

    }

       gives following ts:

    module Enumerations {

    export module EnumSample {

    export enum Enum {

    ChoiceOne = 0, … more