I just hope you don't do ws.on('message', onMessage(deps));
Discussion
why?
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
