"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const async_event_dispatcher_1 = require("./async-event-dispatcher");
/**
* Decorator is used to mark a method as an event listener
*
* @param {string} eventName
* @param {number} priority
* @returns {MethodDecorator}
* @constructor
*/
function Observe(eventName, priority = 0) {
return function (target, propertyKey) {
async_event_dispatcher_1.asyncEventDispatcher.addListener(eventName, target[propertyKey].bind(target), priority);
};
}
exports.Observe = Observe;
//# sourceMappingURL=decorators.js.map |