slovely / TypeScriptDefinitionsGenerator

Generate TypeScript .d.ts files for your server classes, plus optionally create client-side interfaces for WebAPI / SignalR server implementations
MIT License
10 stars 1 forks source link

Rename project due to similarity with Kristensen's TypeScriptDefinitionGenerator #12

Closed vmandic closed 6 years ago

vmandic commented 6 years ago

Firstly, thanks for the awesome project you made available in the open source and built upon the cool and powerful TypeLITE lib.

So, if you were not aware Mads Kristensen has a project with almost the same name which differs for just one character, i.e. the letter s, he's tool is in singular, the full name (and link) is TypeScriptDefinitionGenerator

Should you maybe consider renaming the project/tool? Maybe something more closer to TypeLITE like TypeLITEGenerator? Or IDK sth totally different?

Of course the same issue could be opened on Kristensen's project... :) thanks.

slovely commented 6 years ago

Mine was first, maybe he copied me :) Plus, what has Mads ever done for the community!? 🤣 Given that hardly anyone using this project I am not sure it really matter. Plus I suck at names!

vmandic commented 6 years ago

Suit yourself... 👍 ...anyways there are more important matters to adhere in this cool project.

vmandic commented 6 years ago

btw don't be surprised but you have over 1000 downloads... thats what nuget says at the moment:

1,380 total downloads NuGet link

slovely commented 6 years ago

...anyways there are more important matters to adhere in this cool project.

That is definitely true! :) Can I ask if you are using the project? If so, hope it's useful and do raise any issues that you have.

I think I account for at least 1000 of the downloads haha.

I will have a think about alternative names.

vmandic commented 6 years ago

Heh, yes. I am actually investigating what you have done here and how you used the TypeLITE lib. I'd very much like to have a powerful solution that would be able to specify multiple input directories (in my case C# projects), also a way to choose what will get translated from those input dirs (like you the cool namespace filter you have added) and be able to configure the output dynamically (and even to configure it on the target class maybe via an CustomAttribute like the TypeLITE has the TsClass that could be inherited or sth like that). From my brief analysis I see you tackled WebAPI and SignalR which is cool but not of my interest at the moment. 😃

TL;DR - looking for path/name configurable (on single file config level and per target class config override) solution for C# POCO to .ts class/interface translation.

Your solution gave me motivation to develop my own solution for this task I have and I see that TypeLITE.Lib will suit me just perfect. I'm doing this internally in my company but after completion I'd maybe PR you here.

Thanks for the discourse!

vmandic commented 6 years ago

+opening some issues you may find interesting 😅

vmandic commented 6 years ago

FYI the tools I am analyzing besides TypeLITE are Typewriter, custom T4 scripts (with TS parser logic added, basically an implementation of TypeLITE.Lib) and Mads' TypeScriptDefinitionGenerator. I was not able to find any other suitable solutions for C# to TS translation.

slovely commented 6 years ago

It depends what you are doing of course, but as the generation creates .d.ts files that don't end up as JS, it hasn't mattered to us how big the file gets (different for enums.ts though).

Yeah, I really dislike (well, HATE, haha) T4 which is why I ended up wrapping TypeLITE in what is effectively a hacked together console app - started off just manually adding it into the build events, then eventually had nuget update the project to call it automatically. Been using some variation of it for >3 years - I'm genuinely shocked that Microsoft haven't already done something around this. I find it an absolute life-saver when server-side objects/API methods change and I get compile errors!

vmandic commented 6 years ago

Sorry for OT but rather comment here then spam a new issue, just FYI I found a tool that I think can suit all of my issues, still exploring: https://github.com/reinforced/Reinforced.Typings

Thanks for the feedback again, good luck!