On 12/20/16, 6:56 AM, "Christofer Dutz" <christofer.d...@c-ware.de> wrote:
>Hi, > >I think this is what our „externs“ do ... you sort of generate a no-op AS >counterpart which the IDE is able to use for content assist, but the >FlexJS then directly calls the JS library. >But I bet the others will be able to give you more detailled infos on >this. Our ExternC tool is capable of converting the Google Externs pattern of JS to AS. It cannot currently handle a full JS implementation, but probably could with a chunk of work. But even that would only be for what I would call prototype-based JS patterns with Google-style JSDoc. Plenty of libraries are written with other patterns like functions that generate the classes and use different annotations for type information. CreateJS and Jquery for example, can't currently be parsed by ExternC. Doing so would be a significant amount of work, IMO. But volunteers are welcome to try. I believe anyone could now write a JS library in AS and cross-compile it. I'm sure there are still transpilar bugs that need fixing though. But folks may not like the output format we currently support so new emitters would need to be written. And some folks simply like doing non-object-oriented, non-sealed-class tricks that JS allows that AS wouldn't in order to get performance or size. Evangelizing our transpilar is welcome. Keep in mind that Javascript is not really a 1995 thing any more. The ES5 and ES6 flavors are slowly pushing it into a more structured feel, not unlike AS2 to AS3. -Alex