context.sync - 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 ES 2017

This was also added in TypeScript 2.1 function (context) { 
   await context.sync();
   //more stuff
   await context.sync();
   //more stuff
   await context.sync();
.catch(error) {

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