Hi, i just wanted to seek advice what is the best extension to reuse and convert my C# Class to Typescript Interface Class without coding it again.
I've seen many extesions out there. Just copy and paste and it will produce typescript class, but I don't know what is the best of them. I also want a converter that convert accurately. Thanks, Happy Coding! :)
Yes there are many plugin available to convert C# class file into typescript some of them are
.d.ts
files on save. Then you could reference the definitions from your
.ts
files. If you are using Visual Studio 2015 or above (as TypeScriptSyntaxPaste needs the Rosalyn compiler), you can use TypescriptSyntaxPaste , you just need to install it from the Visual Studio Tools | Extensions menu, once you install it whenever you copy some C# code and paste it into a TypeScript file (either .ts or .tsx), TypeScriptSyntaxPaste will step in and will convert C# code to TypeScript.
The above answer already mentions about it, you can consider below links for reference
http://littlebigtomatoes.com/2016/06/how-to-generate-typescript-classes-from-c-number-like-a-pro/
https://visualstudiomagazine.com/articles/2016/05/16/typescript-class-with-csharp.aspx
If anyone looking for a Visual Studio Code Extension for C# to Typescript converter, take a look at this one
https://marketplace.visualstudio.com/items?itemName=adrianwilczynski.csharp-to-typescript
Typescript to C# for VS code
https://marketplace.visualstudio.com/items?itemName=Box-Of-Hats.ts-to-csharp
For Visual Studio 2017 or above (C# to typescript)
https://marketplace.visualstudio.com/items?itemName=NhaBuiDuc.TypescriptSyntaxPaste
Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly