I wrote a tutorial that teaches you how to add an externs SWC to an FDT project.
http://nextgenactionscript.com/tutorials/fdt-project-dts2as-javascript-library-swc/ While the tutorial refers to a utility named dts2as, don't spend too much time wondering about that. It's just a way to generate externs SWCs from TypeScript definitions. - Josh On Sun, Apr 17, 2016 at 11:00 PM, Harbs <harbs.li...@gmail.com> wrote: > OK. That helps. Thanks. > > If I would want to add a SWC to an FDT project as an extrern, do you know > what I should try to do? > > On Apr 18, 2016, at 7:12 AM, Alex Harui <aha...@adobe.com> wrote: > > > Any SWC can be an externs SWC. For the FalconJX compiler, it is just a > > SWC that goes on the external-library-path so that the compiler doesn't > > try to look for actual .JS implementation files. Anything on the > > external-library-path is assumed to have its implementation loaded some > > other way (or because it is built into the browser). > > > > But since no actual running code is needed in the SWC itself, the externs > > SWCs are full of definitions that have no implementation, but the API > > signature. > > > > We've create extern swcs in many different ways. Google gives us a bunch > > of .JS files for es3, es5, svg, etc. There are also .JS files for > jquery > > and jasmine and google_maps. Michael Schmalle wrote the externC compile > > that converts .JS files to AS. For GCL, we hand-wrote the AS that > matches > > the JS signatures. For CreateJS, we take CreateJS sources, run sed on > > them, then run them through externC. > > > > For CSInterface, you could: > > 1) just try running externC on it. > > 2) empty all of the function bodies and then run externC > > 3) just hand-port the signature to AS. > > > > HTH, > > -Alex > > > > > > On 4/17/16, 4:38 AM, "Harbs" <harbs.li...@gmail.com> wrote: > > > >> I’m still kind of fuzzy on how externs work. > >> > >> I decided to try to create a CC Extension using FlexJS as an educational > >> exercise (and possibly as a prototype for others). > >> > >> I would like to add compiler checking for CSInterface[1], but I’m not > >> sure how to go about it. I tried looking for how Create.js was setup to > >> use as a guide, but I could not find/figure that out. > >> > >> Could someone give me some pointers? > >> > >> Thanks, > >> Harbs > >> > >> [1] > https://github.com/Adobe-CEP/CEP-Resources/blob/master/CEP_6.x/CSInterf > >> ace.js > > > >