I will teach you how to create Typescript classes from your existing C# classes effortlessly like a pro within 30 seconds.
Sometimes, you will need to create typescript classes where the class already exists in C#. This is super boring and tedious, but here is a cool plugin to help you.
First, you will need to install this plugin called TypescriptSyntaxPaste in Visual Studio.NET 2015.
- Go to Tools | Extensions in Visual Studio .NET 2015.
- Select Visual Studio Gallery under the Online category.
- Search for TypescriptSyntaxPaste in the search folder.
- Find the plugin in the results pane and click on Download.
- Then click Install.
- Restart Visual Studio.
After installing the plugin this is how you use it:
- Select your C# class and press Ctrl-C to copy.
- Open a Typescript file (.ts or .tsx extension will work).
- Paste the code.
- Observe the results.