typescript delay
(async () => {
// Do something before delay
console.log('before delay')
await delay(1000);
// Do something after
console.log('after delay')
})();
setTimeout( () => { /*Your Code*/ }, Milliseconds );
import { timer } from 'rxjs';
await timer(1000).pipe(take(1)).toPromise();