Is @:native not supprt in typedef?

look at this js code ,there are some keyword in haxe ,how to wirte same object in haxe ?

extends: cc.Component,
 default: null,
    cc.Class({
        extends: cc.Component,

        properties: {
            label: {
                default: null,
                type: cc.Label
            },
        
            text: 'Hello, World!'
        },

    });

I want to defined some code like

typedef Type2 ={

    @:native("extend")
    var extends:Dynamic;
  

  
}

but not work.

Hey @Zhan, unfortunately this isn’t supported yet, if you can use an interface or a class instead it will work

There’s a plan to support this, and some PRs but nothing has yet been merged

Here’s the haxe issue

1 Like

thanks .wait for haxe compiler merge this pr.