mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #2402 from spencerwi/master
Add definition for angular ngMock's IIntervalService#flush
This commit is contained in:
@@ -50,7 +50,7 @@ exceptionHandlerProvider.mode('log');
|
||||
|
||||
|
||||
///////////////////////////////////////
|
||||
// IExceptionHandlerProvider
|
||||
// ITimeoutService
|
||||
///////////////////////////////////////
|
||||
var timeoutService: ng.ITimeoutService;
|
||||
|
||||
@@ -60,6 +60,14 @@ timeoutService.flushNext();
|
||||
timeoutService.flushNext(1234);
|
||||
timeoutService.verifyNoPendingTasks();
|
||||
|
||||
////////////////////////////////////////
|
||||
// IIntervalService
|
||||
////////////////////////////////////////
|
||||
var intervalService: ng.IIntervalService;
|
||||
var intervalServiceTimeActuallyAdvanced: number;
|
||||
|
||||
intervalServiceTimeActuallyAdvanced = intervalService.flush();
|
||||
intervalServiceTimeActuallyAdvanced = intervalService.flush(1234);
|
||||
|
||||
///////////////////////////////////////
|
||||
// ILogService, ILogCall
|
||||
|
||||
Vendored
+9
@@ -61,6 +61,15 @@ declare module ng {
|
||||
flushNext(expectedDelay?: number): void;
|
||||
verifyNoPendingTasks(): void;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// IntervalService
|
||||
// see http://docs.angularjs.org/api/ngMock.$interval
|
||||
// Augments the original service
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IIntervalService {
|
||||
flush(millis?: number): number;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// LogService
|
||||
|
||||
Reference in New Issue
Block a user