Typescript Type Async Function In Javascript Definition