UNPKG

584 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.SubscribeMessage = void 0;
4const constants_1 = require("../constants");
5/**
6 * Subscribes to messages that fulfils chosen pattern.
7 *
8 * @publicApi
9 */
10const SubscribeMessage = (message) => {
11 return (target, key, descriptor) => {
12 Reflect.defineMetadata(constants_1.MESSAGE_MAPPING_METADATA, true, descriptor.value);
13 Reflect.defineMetadata(constants_1.MESSAGE_METADATA, message, descriptor.value);
14 return descriptor;
15 };
16};
17exports.SubscribeMessage = SubscribeMessage;