UNPKG

@inversifyjs/binding-decorators

Version:

InversifyJs binding decorators package

20 lines 954 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.buildProviderModule = buildProviderModule; const reflect_metadata_utils_1 = require("@inversifyjs/reflect-metadata-utils"); const inversify_1 = require("inversify"); const bindingMetadataMapReflectKey_1 = require("../../reflectMetadata/data/bindingMetadataMapReflectKey"); function buildProviderModule() { return new inversify_1.ContainerModule((options) => { const bindingMetadataMap = (0, reflect_metadata_utils_1.getReflectMetadata)(Object, bindingMetadataMapReflectKey_1.bindingMetadataMapReflectKey); if (bindingMetadataMap === undefined) { return; } for (const bindingMetadataList of bindingMetadataMap.values()) { for (const bindingMetadata of bindingMetadataList) { bindingMetadata.action(options.bind); } } }); } //# sourceMappingURL=buildProviderModule.js.map