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:
- Use some d.ts magic to do this (can it be done?)
- Cast to ES6 Promise everywhere (works, but not intuitive)
- Contribute to open source, fork the typings for ng and ng material, and make them return type of ES6 Promise (I probably should just do this, but not sure I have time for a rabbit hole right now)
Clarification
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.