Typescript Call Async Function Synchronously