Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/hex/src/di/tests/deps.ts>mock.returnsThis

An ecosystem delivering practices, philosophy and portability.
Go to Latest
function mock.returnsThis
import { mock } from "https://deno.land/x/hex@0.5.15/src/di/tests/deps.ts";
const { returnsThis } = mock;

Creates a function that returns the instance the method was called on.

Type Parameters

optional
Self = any
optional
Args extends unknown[] = any[]

Returns

(this: Self, ...args: Args) => Self