benmerckx / genes

Generates split ES6 modules and Typescript definitions from Haxe modules.
43 stars 8 forks source link

Syntax.code and @:native #27

Closed kevinresol closed 3 years ago

kevinresol commented 3 years ago

Scenario 1:

js.Syntax.code('{0}.call(this)', Component);

@:native('React.Component')
extern class Component {}
Component.call(this); // but should be `React.Component.call(this)`

Scenario 2:

js.Syntax.code('{0}.call(this)', Component);

@:jsRequire('react', 'Component')
@:native('React.Component')
extern class Component {}
React.call(this); // but should be `React.Component.call(this)`

I think for scenario 2 there should be some sort of warning when both jsRequire and native is declared