Open lmcarreiro opened 7 years ago
Hi @lmcarreiro,
Thanks for the compliment. Actually I rewrote the whole generator in typescript and wanted to include it in my UI5 extension for vscode to always get the declaration for the according version that is used in the project. But I was very busy the last month, so I did not have time for that.
These declarations are also in a modular syntax and would not struggle with the jquery problem, or maybe only if you import both, jquery and sap jquery. And they would play along really well with your ui5ts project. So maybe it would be more interesting to get those together and on dt for example.
But my goal was not to reflect the openui5 framework as close as I can. I wanted to have a better coding experience and, therefore, I did templated models and events and other stuff to improve intellisense and code completion.
Here is the repo: https://github.com/apazureck/UI5TypescriptDefinitionParser
So if you are interested fork it and have fun with it, I am not sure, if I have enough time the upcoming weeks to push it forward, but as you have a solution for the import problem I am pretty motivated by now ;)
Your declarations of sap.* namespaces are a lot better than the @types/openui5 package, but the jQuery.sap of yours, are having a conflict with actual jQuery typescript declarations, it hides the jQuery declarations.
You need to extend the JQueryStatic interface to avoid this conflict, like in this file (the last lines): https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/openui5
It would be very nice to have your declarations like a package on npm (with the jQuery problem fixed).