Need a marco auto convert Haxe's Function to cs Action?

need a marco auto-convert Haxe’s Function to cs Action?

current I have a project mixed use c# and haxe .

the problem what I got is can’t direct use haxe Function in c# target .

like

addEventListener(event, handler);

handle in Haxe ,it’s a function ,but in cs ,it’s an Action or delegate, I can’t pass a delegate to haxe use

our original code compiler from haxe.

it’s huge work to change all

addEventListener(event, handler); hander to Action.

is there any easy to do this?

Here are some examples: napi/Function.hx at code · kevinresol/napi · GitHub