[idl-generator] Add event handler support

where is `type`?