How To Make Synchronous Call In Typescript