CSharpToTypescript is a powerful Visual Studio Code extension that simplifies the process of converting C# classes to TypeScript interfaces/classes. No more manual rewriting - just select, convert, and go!
✨ Features
🔄 Instantly convert C# classes to TypeScript
📋 Supports basic class structures
🎯 Automatic type mapping
💻 Easy to use with just a few clicks
🛠️ Installation
From Visual Studio Code Marketplace
Open Visual Studio Code
Go to Extensions (Ctrl+Shift+X)
Search for "CSharpToTypescript"
Click "Install"
Manual Installation
Download the latest .vsix file from the releases
Open VS Code
Go to Extensions
Click on "..." (More Actions)
Select "Install from VSIX..."
Choose the downloaded .vsix file
🖥️ Usage
Open a typescript file
Patse the class you want to convert
Open Command Palette (Ctrl+Shift+P)
Type "CSharp to TypeScript"
Press Enter
Example
C# Input:
public class Person {
public string Name { get; set; }
public int Age { get; set; }
}
TypeScript Output:
export default class PersonType {
name: string;
age: number;
}
🔍 Limitations
Supports basic class structures
Limited support for complex generics
Does not preserve comments
No inheritance conversion
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📋 Requirements
Visual Studio Code v1.60.0 or higher
TypeScript knowledge
🐛 Reporting Issues
Found a bug? Please report it in the GitHub issues section with: