Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
function mock.returnsArg
import { mock } from "https://deno.land/x/deno_slack_sdk@1.2.0/dev_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