UNPKG

@robotlegsjs/core

Version:

An architecture-based IoC framework for JavaScript/TypeScript

58 lines 2.33 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.PinEvent = void 0; var tslib_1 = require("tslib"); var Event_1 = require("../../events/impl/Event"); /** * Detain/release pin Event */ var PinEvent = /** @class */ (function (_super) { tslib_1.__extends(PinEvent, _super); /*============================================================================*/ /* Constructor */ /*============================================================================*/ /** * Create a Pin Event * * @param type The event type * @param instance The associated instance */ function PinEvent(type, instance) { var _this = _super.call(this, type) || this; _this._instance = instance; return _this; } Object.defineProperty(PinEvent.prototype, "instance", { /** * The instance being detained or released */ get: function () { return this._instance; }, enumerable: false, configurable: true }); /*============================================================================*/ /* Public Functions */ /*============================================================================*/ /** * @inheritDoc */ PinEvent.prototype.clone = function () { return new PinEvent(this.type, this._instance); }; /*============================================================================*/ /* Public Static Properties */ /*============================================================================*/ PinEvent.DETAIN = "detain"; PinEvent.RELEASE = "release"; return PinEvent; }(Event_1.Event)); exports.PinEvent = PinEvent; //# sourceMappingURL=PinEvent.js.map