Skip to main content
Module

x/rimbu/spy/mod.ts>Spy.obj

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
function Spy.obj
import { Spy } from "https://deno.land/x/rimbu@0.14.0/spy/mod.ts";
const { obj } = Spy;

Returns a tuple containing the spied object, and the metadata object giving more information about the stubbed object.

Type Parameters

T extends { readonly [key: string | number | symbol]: any; }

Parameters

optional
originalObj: T
  • (optional) the original object to spy on
optional
stubs: Spy.ObjStub<T>
  • (optional) a partial implementation of the object type containing default stubs