UNPKG

nest-events

Version:

Welcome to the Nest Events library! This library provides event handling and emitting capabilities for your [NestJS](https://nestjs.com/) applications. With Nest Events, you can easily manage and trigger events within your application, making it simpler t

14 lines (13 loc) 677 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.On = exports.From = exports.Emitter = exports.onKey = exports.fromKey = exports.emitterKey = void 0; const common_1 = require("@nestjs/common"); exports.emitterKey = 'nest-event:emitter'; exports.fromKey = 'nest-event:from'; exports.onKey = 'nest-event:on'; const Emitter = (emitter = 'default') => (0, common_1.SetMetadata)(exports.emitterKey, emitter); exports.Emitter = Emitter; const From = (emitter) => (0, common_1.SetMetadata)(exports.fromKey, emitter); exports.From = From; const On = (event, options) => (0, common_1.SetMetadata)(exports.onKey, { event, options }); exports.On = On;