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

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

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

Creates a function that returns its arguments or a subset of them. If end is specified, it will return arguments up to but not including the end.

Type Parameters

Args extends unknown[]
optional
Self = any

Parameters

optional
start = [UNSUPPORTED]
optional
end: number

Returns

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