UNPKG

@robotlegsjs/createjs

Version:
113 lines 3.57 kB
"use strict"; // ------------------------------------------------------------------------------ // Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved. // // NOTICE: You are permitted to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // ------------------------------------------------------------------------------ Object.defineProperty(exports, "__esModule", { value: true }); exports.MediatorMapping = void 0; /** * @private */ var MediatorMapping = /** @class */ (function () { /*============================================================================*/ /* Constructor */ /*============================================================================*/ /** * @private */ function MediatorMapping(matcher, mediatorClass) { this._guards = []; this._hooks = []; this._autoRemoveEnabled = true; this._matcher = matcher; this._mediatorClass = mediatorClass; } Object.defineProperty(MediatorMapping.prototype, "matcher", { /** * @inheritDoc */ get: function () { return this._matcher; }, enumerable: false, configurable: true }); Object.defineProperty(MediatorMapping.prototype, "mediatorClass", { /** * @inheritDoc */ get: function () { return this._mediatorClass; }, enumerable: false, configurable: true }); Object.defineProperty(MediatorMapping.prototype, "guards", { /** * @inheritDoc */ get: function () { return this._guards; }, enumerable: false, configurable: true }); Object.defineProperty(MediatorMapping.prototype, "hooks", { /** * @inheritDoc */ get: function () { return this._hooks; }, enumerable: false, configurable: true }); Object.defineProperty(MediatorMapping.prototype, "autoRemoveEnabled", { /** * @inheritDoc */ get: function () { return this._autoRemoveEnabled; }, enumerable: false, configurable: true }); /*============================================================================*/ /* Public Functions */ /*============================================================================*/ /** * @inheritDoc */ MediatorMapping.prototype.withGuards = function () { var guards = []; for (var _i = 0; _i < arguments.length; _i++) { guards[_i] = arguments[_i]; } this._guards = this._guards.concat.apply(this._guards, guards); return this; }; /** * @inheritDoc */ MediatorMapping.prototype.withHooks = function () { var hooks = []; for (var _i = 0; _i < arguments.length; _i++) { hooks[_i] = arguments[_i]; } this._hooks = this._hooks.concat.apply(this._hooks, hooks); return this; }; /** * @inheritDoc */ MediatorMapping.prototype.autoRemove = function (value) { if (value === void 0) { value = true; } this._autoRemoveEnabled = value; return this; }; return MediatorMapping; }()); exports.MediatorMapping = MediatorMapping; //# sourceMappingURL=MediatorMapping.js.map