Managing ES6/2015 Promises in Typescript with an Angular 1 App
We have an Angular 1.5 application built with Typescript, and I am trying to figure out the best way to deal with ng.IPromise vs Promise (ES6 promise). My preference would be to only deal with the ES6 Promise type. Is there an elegant way to override all angular-js and angular-material (also included) interfaces to use es6 promises?
Options I can think of:
The underlying Promise implementation used by the angular application is still $q (though, I am also applying angular-bluebird-promises). I’m only trying to simplify/consolidate the Typescript interfaces involved.
There are very good reasons why they should remain two different interfaces.
There are fundamental differences between
In TS/ES6 application where native and
If the promise is expected to be exported from Angular and used by non-Angular code, it is preferable to convert it to
For given non-Angular context
will pause the chain till next root scope digest, even though
While not being relevant to TS, this question is a good example why it is important to always be aware of whether it is