std/testing/mock.ts

Deno standard library
Go to Latest
function returnsArg
import { returnsArg } from "https://deno.land/std@0.145.0/testing/mock.ts?s=returnsArg";

Creates a function that returns one of its arguments.

Type Parameters

optional
Self = any
[src]

Parameters

idx: number[src]

Returns

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