UNPKG

@thisisagile/easy-express

Version:

Straightforward library for building domain-driven microservice architectures

17 lines 475 B
// src/types/NamespaceContext.ts import { createNamespace } from "cls-hooked"; import { BaseRequestContext } from "@thisisagile/easy"; var NamespaceContext = class extends BaseRequestContext { namespace = createNamespace("context"); get(key) { return this.namespace.get(key); } set(key, value) { return this.namespace.set(key, value); } create = (f) => this.namespace.run(f); }; export { NamespaceContext }; //# sourceMappingURL=NamespaceContext.mjs.map