Interface Spy<Self, Args, Return>
interface Spy<Self, Args, Return> {
calls: SpyCall<Self, Args, Return>[];
original: ((this: Self, ...args: Args) => Return);
restored: boolean;
restore(): void;
(this: Self, ...args: Args): Return;
}
calls: SpyCall<Self, Args, Return>[];
original: ((this: Self, ...args: Args) => Return);
restored: boolean;
restore(): void;
(this: Self, ...args: Args): Return;
}
A function or instance method wrapper that records all calls made to it.