UNPKG

@baseplate-dev/sync

Version:

Library for syncing Baseplate descriptions

26 lines 828 B
/** * Structure representing the context of a generator runner */ interface RunnerContext { /** The ID of the task being executed */ taskId: string; } /** * Runs a function within a generator runner context * * @param context The runner context * @param fn The function to run within the context * @returns The result of the function */ export declare function runInRunnerContext<T>(context: RunnerContext, fn: () => T): T; /** * Gets the current runner context if it exists. * * Note: This should only be used for debugging purposes and not part of the main flow * to allow for more effective testing. * * @returns The current runner context or undefined if not in a context */ export declare function getRunnerContext(): RunnerContext | undefined; export {}; //# sourceMappingURL=runner-context.d.ts.map