flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: [FalconJx / EXTERNC] interface members have no JSDoc ?
Date Tue, 07 Jul 2015 16:33:24 GMT
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" <erik@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 <webdoublefx@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

Mime
View raw message