1. Install NuGet package (https://nuget.org/packages/TypeLite/)
  2. Configure TypeLite in the TypeLite.tt file to generate interfaces for classes you want
    • Decorate your .NET classes with [TsClass] attribute and configure TypeLite to generate definitions for an assembly
    • --- OR ---
    • Configure TypeLite to generate definitions for specific classes
  3. Run TypeLite.tt file (right-click in the Solution Explorer and select Run custom tool
  4. Use generated TypeLite.d.ts file with TypeScript interfaces

Example

C# classes

Generated interfaces