KartikTalwar / gmail.js

Gmail JavaScript API
MIT License
3.74k stars 455 forks source link

Typing for GmailBindAction Incorrect if register used #699

Open cancan101 opened 2 years ago

cancan101 commented 2 years ago

register allows adding arbitrary DOM listeners which in turn means the strict set of possible actions specified GmailBindAction may not be correct. This means the typing on on_dom, on, etc are overly strict. I don't know a clean way to relax this other than changing the type to string. I suppose as a starting point we could relax the typing on on_dom

cancan101 commented 2 years ago

This is how I would fix this: https://github.com/KartikTalwar/gmail.js/pull/700