The code bits that you specified indicate that you have an older version of the Angular file. This version is really wrong (in the eyes of Typescript 2.4+) extends IPromise<T> and therefore is incompatible with v2.4 +.
Strict contravariance for callback parameters
Typescript "dragged on" type checking for callback function parameters in 2.4.0 and made further improvements in 2.4.2. This is described on the “What's New in Typescript (2.4)” wiki , and on “Breaking Changes” for 2.4.
At the bottom of the compiler error stack, it makes sense that IHttpPromiseCallbackArg<T> not assigned to T Thus, the typing file you have always been “wrong” in this regard, but the compiler was not smart enough to recognize it as such prior to version 2.2.
Illustration
Mappable<T> example is very similar to IPromise.then() . We can adapt this example by expanding the interface:
interface Mappable<T> { map<U>(f: (x: T) => U): Mappable<U>; } type R = {}; interface SubMappable<T> extends Mappable<T> { map<U>(f: (x: R) => U): Mappable<U>; }
This code will be compiled using Typescript 2.3.3. Typescript 2.4 (rightfully) complains that R is not assigned T.
As I mentioned, this example is (essentially) structurally identical (with a reduced version) to IPromise.then() . We can rename functions, interfaces, parameters, and types by specifying:
interface MyPromise<T> { then<TResult>(successCallback: (promiseValue: T) => TResult): MyPromise<TResult>; } type R = {}; interface MyHttpPromise<T> extends MyPromise<T> { then<TResult>(successCallback: (response: R) => TResult): MyPromise<TResult>; }
Again, Typescript 2.3.3 or earlier will accept this code, but Typescript 2.4+ will not. Substituting IHttpPromiseCallbackArg<T> for R , we get the same result.
Correction
Install a file of newer types .
A relatively recent typing file would have an IHttpPromise<T> defined as
interface IHttpPromise<T> extends IPromise<IHttpPromiseCallbackArg<T>> { }
or
type IHttpPromise<T> = IPromise<IHttpResponse<T>>;