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

TypeLITE [TsClass], [TsInterface] and [TsIgnore] attributes not picked up #13

Open vmandic opened 6 years ago

vmandic commented 6 years ago

So when using the tool only the classes and interfaces filtered by the namespace filter get picked up for translation. It would be handy if the generator could recognize and respect the TypeLITE's attributes [TsClass], [TsIgnore] and [TsInterface] including the filter.

slovely commented 6 years ago

I think the attributes only work if you reference the exact same version of TypeLITE as the generator references - which is currently a pretty old v1.8.1. I can't check this right now, but will try to confirm soon; unless it's easy for you to change the version of TypeLITE you are referencing?

vmandic commented 6 years ago

Yes, you are correct, the line below specifies what you have said: https://github.com/slovely/TypeScriptDefinitionsGenerator/blob/master/src/TypeScriptDefinitionsGenerator/packages.config#L12

...and I confirm the explanation you have provided, i.e. changing the .Lib version worked.

slovely commented 6 years ago

I'm not entirely show that a fix for this will be easy... the attribute matching is in the TypeLITE library itself. I think I'll probably end up just updating the internal version and document that it needs to match. Otherwise it would likely involve having a property in the '.props' file to point to the users version of TyepLITE, and dynamically loading and using that one.