UNPKG

681 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.Global = void 0;
4const constants_1 = require("../../constants");
5/**
6 * Decorator that makes a module global-scoped.
7 *
8 * Once imported into any module, a global-scoped module will be visible
9 * in all modules. Thereafter, modules that wish to inject a service exported
10 * from a global module do not need to import the provider module.
11 *
12 * @see [Global modules](https://docs.nestjs.com/modules#global-modules)
13 *
14 * @publicApi
15 */
16function Global() {
17 return (target) => {
18 Reflect.defineMetadata(constants_1.GLOBAL_MODULE_METADATA, true, target);
19 };
20}
21exports.Global = Global;