Typescript Type Async Function In Javascript