Skip to main content
The Deno 2 Release Candidate is here
Learn more
function callWithMetadataAsync
import { callWithMetadataAsync } from "https://deno.land/x/caller_metadata@v0.0.2/src/main.ts";

Injects meta data to the stack trace, which can be accessed within the function. Calls the function (async) with paramters.

Type Parameters

args extends any[]
returns extends Promise<any>

Parameters

meta: any

object that can be accessed within the function by calling getMeta()

func: (...args: args) => returns

value of 'this' inside the function

optional
args: args

the function to call

optional
ctx: any

function arguments array

Returns

Promise<returns extends Promise<infer T> ? T : any>

return value of the function call