UNPKG

ayanami

Version:
18 lines (17 loc) 780 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SameScope = exports.SameScopeMetadataKey = void 0; exports.SameScopeMetadataKey = Symbol('SameScopeInjectionParams'); var SameScope = function () { return function ( // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types target, _propertyKey, parameterIndex) { var sameScopeInjectionParams = []; if (Reflect.hasMetadata(exports.SameScopeMetadataKey, target)) { sameScopeInjectionParams = Reflect.getMetadata(exports.SameScopeMetadataKey, target); } else { Reflect.defineMetadata(exports.SameScopeMetadataKey, sameScopeInjectionParams, target); } sameScopeInjectionParams[parameterIndex] = true; }; }; exports.SameScope = SameScope;