nestjs-cls
Version:
A continuation-local storage module compatible with NestJS's dependency injection.
12 lines (11 loc) • 538 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.InjectableProxy = InjectableProxy;
const common_1 = require("@nestjs/common");
const proxy_provider_constants_1 = require("./proxy-provider.constants");
/**
* Mark a Proxy provider with this decorator to distinguish it from regular NestJS singleton providers
*/
function InjectableProxy(options = {}) {
return (target) => (0, common_1.Injectable)()((0, common_1.SetMetadata)(proxy_provider_constants_1.CLS_PROXY_METADATA_KEY, options)(target));
}