Skip to content
Automatic TypeScript template generation from C# source files
C# Other
  1. C# 98.8%
  2. Other 1.2%
Branch: master
Clone or download
Latest commit 24af877 Apr 20, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build workaround for bug in vs gallery Sep 23, 2017
docs 1.22.0 Apr 20, 2019
lib
src 1.22.0 Apr 20, 2019
.gitattributes initial commit Nov 10, 2014
.gitignore Exposing Type on Class Oct 14, 2017
LICENSE Update LICENSE Mar 22, 2016
README.md Update README.md Mar 29, 2016
Typewriter.sln 1.9.0, vs 2017 install target Dec 11, 2016

README.md

Typewriter

Typewriter is a Visual Studio extensions that generates TypeScript files from c# code files using TypeScript Templates. This allows you to create fully typed TypeScript representations of server side API, models, controllers, SignalR hubs etc. that automatically updates when you make changes to your c# code.

Documentation
Download from Visual Studio Gallery

Issues

The issue tracker is the preferred channel for bug reports, features requests and submitting pull requests.
For personal support requests Stack Overflow is a better place to get help. Please use the typewriter tag when posting your questions.

Getting started

Step 1: Add a TypeScript Template file (.tst)
Step 2: Add the following code in the template

$Classes(*Model)[ // Find all classes with a name ending with Model
    class $Name {
        constructor($Properties[public $name: $Type][, ]) {
        }
    }
]

Step 3: Save the template
Step 4: Add a c# class named TestModel
Step 5: Add the following code to the class

using System;

namespace TestApplication
{
    public class TestModel
    {
        public int Id { get; set; }
        public int Name { get; set; }
    }
}

Step 6: Save the class.

Each time a class matching the filter in the template is saved a TypeScript class matching the template is updated or added to the project.

You can’t perform that action at this time.