Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/hex/src/lib/stdx/testing.ts>mock.returnsArg

An ecosystem delivering practices, philosophy and portability. Powered By Deno and JavaScript.
Latest
function mock.returnsArg
import { mock } from "https://deno.land/x/hex@0.6.5/src/lib/stdx/testing.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