Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rimbu/spy/spy.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@1.2.0/spy/spy.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