import { Spy } from "https://deno.land/x/rimbu@1.2.1/spy/index.ts";
const { fn } = Spy;
Returns a spied function instance that tracks the function calls and optionally uses some original or stub implementation.
Type Parameters
F extends Func
Parameters
optional
originalFn: F- (optional) the original function to spy on, if stubbed still useful to supply to get the correct types
optional
originalStub: Spy.FnStub<F>- (optional) the default stub implementation to use when the function is called
optional
onCall: (args: Parameters<F>) => void- (optional) a callback function that receives the parameters used on each function call