Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno_slack_sdk/dev_deps.ts>mock.stub

SDK for building Run on Slack apps using Deno
Extremely Popular
Go to Latest
function mock.stub
import { mock } from "https://deno.land/x/deno_slack_sdk@2.2.0/dev_deps.ts";
const { stub } = mock;

Replaces an instance method with a Stub.

Type Parameters

Self
Prop extends keyof Self

Parameters

self: Self
property: Prop

Returns

Stub<Self, GetParametersFromProp<Self, Prop>, GetReturnFromProp<Self, Prop>>

Type Parameters

Self
Prop extends keyof Self

Parameters

self: Self
property: Prop
func: (this: Self, ...args: GetParametersFromProp<Self, Prop>) => GetReturnFromProp<Self, Prop>

Returns

Stub<Self, GetParametersFromProp<Self, Prop>, GetReturnFromProp<Self, Prop>>