flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From OmPrakash Muppirala <bigosma...@gmail.com>
Subject Re: [FalconJX] d.as definition file (was: [FalconJX JXEmitter] Hello Greeter! working ... )
Date Mon, 01 Jun 2015 18:41:17 GMT
On Mon, Jun 1, 2015 at 6:31 AM, Alex Harui <aharui@adobe.com> wrote:

>
>
> On 6/1/15, 5:39 AM, "Harbs" <harbs.lists@gmail.com> wrote:
>
> >I believe what you say, but out of curiosity, what about the conversion
> >was the deal-breaker?
>
> I suspect the 10% where TS doesn’t map cleanly to AS.
>
> FWIW, it was never clear to me that the SWCs to represent popular JS
> frameworks could be completely auto-generated.  It would always depend on
> whether everything in their API surface was truly object-oriented or
> whether it relied on something you could only do in JS.  So even a tool
> that gets you 90% there might be very helpful.
>

Agreed.  Getting the Typesript d.ts file for a JS library is the hard
part.  If I am understanding it correctly, almost every d.ts file (for a JS
library) is hand-coded.

If we have a tool that converts a majority portion of that d.ts to a d.as
file, going in and hand-coding things to fit an AS3 paradigm should not be
very hard.

Also, these are one time conversions.  We could do it for a few popular
libraries and set the ball rolling. Hopefully, the community will start
chipping in to create a bigger collection of d.as files as time goes.


>
> A few other ideas on this topic:
> 1) Since TS is a high-level language, it may not map as cleanly to AS as
> the JS it generates.  I pondered whether there was a way to get the d.ts
> to output to JS and work from there.
>

It should be possible because, typescript compiles down to javascript.  And
d.ts is a regular typescript file as well.

Thanks,
Om

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message