Skip to main content
Latest
interface Interfaces.IMethodChanger
import { type Interfaces } from "https://deno.land/x/rhum@v2.2.0/mod.ts";
const { IMethodChanger } = Interfaces;

Type Parameters

ReturnValue

Methods

willReturn(action: (...args: unknown[]) => ReturnValue): void

Pre-program a method to return (and call) the following action.

willReturn<T>(returnValue: T): void

Pre-program this method to return the given value.

willThrow<T>(error: IError & T): void

Pre-program this method to throw the given error.