jquery - Typescript: What is the best way to handle async requests -


in c# have await statements. handle async requests. using typscript because find hard work javascript

now when using typescript dont know rigth way handle requests when posts have been processed.

what best way handle that.

both async keyword (1.7) , backwards-compilation ecmascript 6 (2.0) planned typescript. in meantime, both q , rsvp follow promises/a+ standard - , both have typings available typed.

in depth

there proposal introducing async keyword typescript.

this feature scheduled part of typescript 1.7 (no guarantees).

the news there will, in fact, backwards compile es5 (this scheduled typescript 2.0). not backwards compile typescript does, don't take notice of people typescript doesn't add javascript except types - there polyfills many ecmascript 6 features either available or planned, example (but not limited to):

  • import * 'module';
  • let
  • generators
  • async / promises
  • destructuring

there occasional ecmascript 7 features landing on roadmap now, in typescript 1.7.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -