@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.
26 lines • 937 B
JavaScript
/**
* @module ExecutionContext
*/
import {} from "../../../../execution-context/contracts/_module.js";
import { callInvokable } 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 class NoOpExecutionContextAdapter {
get() {
return null;
}
run(_context, fn) {
return callInvokable(fn);
}
}
//# sourceMappingURL=no-op-execution-context-adapter.js.map