1//You have to wait for TypeScript 2.0 with async/await for ES5 support as it now supported only for TS to ES6 compilation.
2//You would be able to create delay function with async:
3
4function delay(ms: number) {
5 return new Promise( resolve => setTimeout(resolve, ms) );
6}
7
8//And call it
9await delay(300);