Best extension to convert C# Class to Typescript Interface Class


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! :)


Asked by:- Aileereal
0
: 11035 At:- 1/28/2018 3:40:46 AM
ASP.NET C# ANGULAR 4







3 Answers
profileImage Answered by:- vikas_jk

Yes there are many plugin available to convert C# class file into typescript some of them are 

  1. Typewriter  : looks easy to use, it can create new typescript files when you create a C# class file and save it(after installing it)
  2. http://type.litesolutions.net/ Typelite, looks promising and widely used.
  3. Check this link http://littlebigtomatoes.com/2016/06/how-to-generate-typescript-classes-from-c-number-like-a-pro/ and explanation in it to generate typescript looks very easy (my personal recommendation after typeLite )
  4. Web Essentials allow to compile C# files to TypeScript .d.ts files on save. Then you could reference the definitions from your .ts files.
1
At:- 1/28/2018 11:48:29 AM


profileImage Answered by:- bhanu

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

0
At:- 1/30/2018 12:05:07 PM


profileImage Answered by:- pika

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

 

0
At:- 9/7/2021 9:20:12 AM






Login/Register to answer
Or
Register directly by posting answer/details

Full Name *

Email *




By posting your answer you agree on privacy policy & terms of use