From b3959a812efc71520c624d69f236683b337d2aa1 Mon Sep 17 00:00:00 2001 From: Natan Camargos Date: Fri, 24 Mar 2017 14:41:10 -0300 Subject: [PATCH] angularjs - Fix ITimeoutService interface ($timeout signature) $timeout is not correctly described by ITimeoutService, causing compile time errors like: 'TS2322:Type 'IPromise' is not assignable to type 'IPromise'...' --- types/angular/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/angular/index.d.ts b/types/angular/index.d.ts index 485ad9ebb3..4c0edf95cc 100644 --- a/types/angular/index.d.ts +++ b/types/angular/index.d.ts @@ -602,7 +602,7 @@ declare namespace angular { /////////////////////////////////////////////////////////////////////////// interface ITimeoutService { (delay?: number, invokeApply?: boolean): IPromise; - (fn: (...args: any[]) => T, delay?: number, invokeApply?: boolean, ...args: any[]): IPromise; + (fn: (...args: any[]) => T | IPromise, delay?: number, invokeApply?: boolean, ...args: any[]): IPromise; cancel(promise?: IPromise): boolean; }