v0.2.0CLI Tool · Open Source

C# models
TypeScript interfaces.

TypeSharp is a CLI tool that automatically generates TypeScript type definitions from your C# models. Keep your ASP.NET Core backend and Nuxt/Vue frontend in perfect sync — no more manual type maintenance.

Direct C# parsing → TypeScript interface not classes,

// example
UserDto.cs — typesharp
UserDto.cs
UserDto.ts
using TypeSharp.Attributes;

[TypeSharp]
public class UserDto
{
    public int Id { get; set; }
    public string Name { get; set; }
    public string? Email { get; set; }
    public UserRole Role { get; set; }
    public List<string> Tags { get; set; }
}
export interface UserDto {
    id: number;
    name: string;
    email: string | null;
    role: UserRole;
    tags: string[];
}
⎇ main✓ Prettier
csharpUTF-8Ln 1, Col 1
// features
Minimum Config

Point at your models directory and run. Works out of the box.

Inheritance

Fully resolves class hierarchies and maps them to TypeScript extends.

Enums

Converts C# enums to TypeScript const enums or union types.

Nullable Types

Handles nullable reference types and value types correctly.

Arrays & Generics

Maps List<T>, IEnumerable<T>, Dictionary<K,V> to proper TS types.

Custom Conventions

Configure casing, output path, file splitting, and more.