mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
angularjs - Fix ITimeoutService interface ($timeout signature)
$timeout is not correctly described by ITimeoutService, causing compile time errors like: 'TS2322:Type 'IPromise<IPromise>' is not assignable to type 'IPromise'...'
This commit is contained in:
parent
49f185c6ec
commit
b3959a812e
2
types/angular/index.d.ts
vendored
2
types/angular/index.d.ts
vendored
@ -602,7 +602,7 @@ declare namespace angular {
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface ITimeoutService {
|
||||
(delay?: number, invokeApply?: boolean): IPromise<void>;
|
||||
<T>(fn: (...args: any[]) => T, delay?: number, invokeApply?: boolean, ...args: any[]): IPromise<T>;
|
||||
<T>(fn: (...args: any[]) => T | IPromise<T>, delay?: number, invokeApply?: boolean, ...args: any[]): IPromise<T>;
|
||||
cancel(promise?: IPromise<any>): boolean;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user