UNPKG

@daiso-tech/core

Version:

The library offers flexible, framework-agnostic solutions for modern web applications, built on adaptable components that integrate seamlessly with popular frameworks like Next Js.

22 lines (21 loc) 970 B
/** * @module ExecutionContext */ import { type IExecutionContextAdapter } from "../../../../execution-context/contracts/_module.js"; import { type InvokableFn } from "../../../../utilities/_module.js"; /** * IMPORT_PATH: `"@daiso-tech/core/execution-context/no-op-execution-context-adapter"` * * No-operation execution context adapter. * * This adapter implements IExecutionContextAdapter but provides no actual context storage. * It always returns null for get() and simply executes functions without maintaining any context. * Useful for scenarios where context management is not needed or for testing purposes. * * Use this adapter when you want to disable context functionality or in environments * where context propagation is not necessary. */ export declare class NoOpExecutionContextAdapter<TValue> implements IExecutionContextAdapter<TValue> { get(): TValue | null; run<TReturn>(_context: TValue, fn: InvokableFn<[], TReturn>): TReturn; }