When there are no events, part of the bindings file is unused.
In my case with "noUnusedLocals": true, in the tsconfig this lead to my project not compiling.
This PR splits the global.ts and global.js into two parts and only includes the event related code if there are any events defined.
I tested this in my project, but I am not very used to ts/js. So feel free to point out any issues.
When there are no events, part of the bindings file is unused. In my case with
"noUnusedLocals": true,
in the tsconfig this lead to my project not compiling.This PR splits the global.ts and global.js into two parts and only includes the event related code if there are any events defined.
I tested this in my project, but I am not very used to ts/js. So feel free to point out any issues.