You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If one has a Java package name like "com.acme.delete" or "com.acme.export" then the resulting TypeScript will not work due to "delete" and "export" being reserved words.
The text was updated successfully, but these errors were encountered:
I ended up using java2typescript as an inspiration for my own custom Javadoc-doclet-based TypeScript definition generator -- and generating only a .d.ts file, i.e. no actual JavaScript implementation.
On this particular front, I ended up using xx_yy_zz namespaces for packages, rather than x.y.z namespaces to resolve the issue.
Trying to straddle Java and JavaScript's notions of some types (i.e. chars and strings) in the same way that Nashorn does was challenging and the result a bit imperfect, I believe. And some of Nashorn's special sugar for extension (extend, etc), didn't end up getting covered quite correctly, IIRC.
P.S. I only generate a .d.ts file in my case because I'm dealing with a very large Java API -- and don't want to produce large amounts of actual JavaScript due to that.
If one has a Java package name like "com.acme.delete" or "com.acme.export" then the resulting TypeScript will not work due to "delete" and "export" being reserved words.
The text was updated successfully, but these errors were encountered: