autotel
Version:
Write Once, Observe Anywhere
14 lines (12 loc) • 430 B
JavaScript
import { AsyncLocalStorage } from 'async_hooks';
// src/operation-context.ts
var operationStorage = new AsyncLocalStorage();
function getOperationContext() {
return operationStorage.getStore();
}
function runInOperationContext(name, fn) {
return operationStorage.run({ name }, fn);
}
export { getOperationContext, runInOperationContext };
//# sourceMappingURL=chunk-SEO6NAQT.js.map
//# sourceMappingURL=chunk-SEO6NAQT.js.map