Added additional type information to the calls object for Jasmine Spies

This commit is contained in:
Joe Skeen
2015-07-22 09:41:13 -06:00
parent 78339176ec
commit d82912b209
+10 -3
View File
@@ -442,14 +442,21 @@ declare module jasmine {
/** By chaining the spy with calls.allArgs(), will return the arguments to all calls **/
allArgs(): any[];
/** By chaining the spy with calls.all(), will return the context (the this) and arguments passed all calls **/
all(): any;
all(): CallInfo[];
/** By chaining the spy with calls.mostRecent(), will return the context (the this) and arguments for the most recent call **/
mostRecent(): any;
mostRecent(): CallInfo;
/** By chaining the spy with calls.first(), will return the context (the this) and arguments for the first call **/
first(): any;
first(): CallInfo;
/** By chaining the spy with calls.reset(), will clears all tracking for a spy **/
reset(): void;
}
interface CallInfo {
/** The context (the this) for the call */
object: any;
/** All arguments passed to the call */
args: any[];
}
interface Util {
inherit(childClass: Function, parentClass: Function): any;