UNPKG

@plugjs/plug

Version:
21 lines (20 loc) 760 B
import type { Context } from './pipe'; /** * Run the specified `callback` associating the specified {@link Context} and task * name with the current asynchronous invocation context. */ export declare function runAsync<T>(context: Context, callback: () => Promise<T>): Promise<T>; /** * Returns the {@link Context} associated with the current asynchronous * invocation context or `undefined`. */ export declare function currentContext(): Context | undefined; /** * Returns the {@link Context} associated with the current asynchronous * invocation context and fail if none was found. */ export declare function requireContext(): Context; /** * Return an array of all _task names_ currently running */ export declare function runningTasks(): string[];