Traditionally, I begin by setting a timeout, then if that timeout resolves, only then do I reject.
Otherwise, I can use async await as follows:
I require the callback itself to be async within the returned promise, i.e. async (resolve, reject)
Then, I await that result, and thereby resolve immediately after. I surround by try catch blocks as well.
this works since async is syntactic sugar which itself returns a promise, so I won’t have memory leaks. In other words, it is a promise inside a promise …