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