I didn't know the @interface was not used, I thought the compiler might have checked if the members were implemented, apparently, once again, it is done at compile time. So, I'm fine with how it is now, I was just pointing that out as well as getting thoughts about as-js-as round-trip but actually, there is no point to go that way IMO.
Thanks, Frédéric THOMAS ---------------------------------------- > From: aha...@adobe.com > To: dev@flex.apache.org > Subject: Re: [FalconJx / EXTERNC] interface members have no JSDoc ? > Date: Tue, 7 Jul 2015 16:33:24 +0000 > > The FLEXJS output type doesn’t currently output much for Interfaces. > Should it? How does GCC use interfaces? AFAICT, the methods on the > interface aren’t used at runtime so there isn’t much need for it. The AS > compiler and Flash/AIR runtime has already verified correctness. > > If we need more interface details for the JSC output-type we can certainly > add them, but I don’t know if it is worth it just to be able to round-trip > code from JS to AS and back to JS. > > -Alex > > On 7/7/15, 8:06 AM, "Erik de Bruin" <e...@ixsoftware.nl> wrote: > >>No, there should be a full signature, if I'm not mistaken. But since I was >>last in the emitter, they switched to using Object.createProperties. I'm >>not familiar with the expected outcome for that pattern. >> >>EdB >> >> >> >>On Tue, Jul 7, 2015 at 4:01 PM, Frédéric THOMAS <webdoubl...@hotmail.com> >>wrote: >> >>> Is that expected the qux member has no JSDoc and is emitted as a simple >>> var? >>> >>> If I compile that emitted JS back to AS3, how the EXTERNC is suppose to >>> guess the Type without JSDoc and react if a class implementing the >>> interface use getter / setter ? >>> >>> package interfaces { >>> import foo.Qux; >>> >>> public interface IImport { >>> function get qux():Qux; >>> function set qux(value:Qux):void; >>> } >>> } >>> >>> >>> Emitted to: >>> >>> /** >>> * interfaces.IImport >>> * >>> * @fileoverview >>> * >>> * @suppress {checkTypes} >>> */ >>> >>> goog.provide('interfaces_IImport'); >>> >>> /** >>> * @interface >>> */ >>> interfaces_IImport = function() {}; >>> interfaces_IImport.prototype.qux; >>> >>> >>> /** >>> * Metadata >>> * >>> * @type {Object.<string, Array.<Object>>} >>> */ >>> interfaces_IImport.prototype.FLEXJS_CLASS_INFO = { names: [{ name: >>> 'IImport', qName: 'interfaces_IImport'}] }; >>> >>> Thanks, >>> Frédéric THOMAS >> >> >> >> >>-- >>Ix Multimedia Software >> >>Jan Luykenstraat 27 >>3521 VB Utrecht >> >>T. 06-51952295 >>I. www.ixsoftware.nl >