How to call async code in `MatchHandler` functions in Javascript runtime?

I find myself having to do some async http GET/POST calls (to interact with a 3rd party API) during the match loop but the interface for MatchLoopFunction must return a {state: State} | null which makes it not possible to return Promises even with .then.

What is the way to deal with this?