Currently, I am working on an Angular 1.5 application that utilizes Typescript. My main concern is finding the most efficient way to handle ng.IPromise compared to Promise (ES6 promise). Personally, I would prefer to solely deal with the ES6 Promise type. Is there a sleek method to override all angular-js and angular-material interfaces to align with ES6 promises?
These are the options I have considered:
- Utilize some d.ts sorcery to achieve this goal (is it feasible?)
- Manually convert to ES6 Promise across the board (effective, but not very intuitive)
- Get involved in open source, modify the typings for ng and ng material, and adjust their return types to ES6 Promise (this may be the best solution, although it could be time-consuming)
Just to clarify:
The underlying Promise implementation being used by the angular application remains as $q (even though I am also implementing angular-bluebird-promises). My focus is solely on simplifying/streamlining the Typescript interfaces being utilized.