How to implement sleep function in TypeScript?
<p>I'm developing a website in Angular 2 using TypeScript and I was wondering if there was a way to implement <code>thread.sleep(ms)</code> functionality.</p>
<p>My use case is to redirect the users after submitting a form after a few seconds which is very easy in JavaScript but I'm not sure how to do it in TypeScript.</p>