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

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

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

Creates a function that returns one of its arguments.

Type Parameters

Arg
optional
Self = any

Parameters

idx: number

Returns

(this: Self, ...args: Arg[]) => Arg