Hacker News new | ask | show | jobs
by samirahmed 4446 days ago
at first glance, i thought the mere edge cases alone (listed under limitations in the readme) would be sufficient reason to stay well away from this c# -> js route.

however on second glance ... there have been numerous times where I have written c# server side with 'UI Model' Classes that use to serialize to XML/json for consumption by the client/browser and corresponding models in javascript/typescript. The C# -> Typescript conversion would save me a lot of time (and automate keeping the two in sync) and I would imagine for that niche case it would be totally worth it.

1 comments

I've used Typelite and T4TS to generate Typescript definition files (interfaces effectively) for my C# code. I'm not sure about going further than that and exposing logic.