async / await

This is a new way of writing asynchronous code
Before this you could use either Callbacks or Promises.
This is built on top of promises.
This approach means your asynchronous code looks and behave more like synchronous code.

Added in ES2017

This has been added in ES2017
This has been added in TypeScript 2.1 function (ctx) { 
   await ctx.sync();
   //more stuff
   await ctx.sync();
   //more stuff
   await ctx.sync();
.catch(error) {

© 2018 Better Solutions Limited. All Rights Reserved. © 2018 Better Solutions Limited TopPrevNext