why?

Reply to this note

Please Login to reply.

Discussion

Because 'on' method does not support accepting functions that return promises (your handles is async fn). It will work, until rejected promise will crash your app.

TS does a poor job at warning on these mistakes.

I am aware of this and I am writing code to take advantage these "mistakes", so worry not