How to convert existing C-Sharp class to Type Script in Visual Studio 2015
Using TypeScriptSyntax Paste extension for visual studio we can easily convert C# classes into typeScript.
Here are the steps to install typescript paste extension & how to use it in Visual Studio (VS) 2015
How to add in VS:
- Open your visual studio. To to Tools => Extension & Updates
- On the "Extensions & updates" pop-up window select "Online" from your left-hand menu pane & in your right hand side search box search for "TypeScript Paste"
- Install this extension & restart your Visual studio.
How to use it:
- After installing "TypeScript Syntax Paste" open your visual studio. Go to "Tools => Options"
- Search for Typescript Paste. Click on it's node. On your right hand side pane, check these items. "Convert List<T> to assry t[], Add I to Interface Declaration, Convert member to camelcase, Convert to interface" to "True"
Now click Ok.
- Once done, copy your C# class model, and past it in your typescript file.
Here is the empty type script file,
Here is the generated typescript just after Ctrl + V.
References:
1. https://visualstudiogallery.msdn.microsoft.com/eb0887f8-3ac1-434a-b50b-f0112f1572f7
Comments
Post a Comment