UNPKG

ngx-decorate

Version:

Useful decorators for Angular 2 and above

15 lines 670 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const defineProp_1 = require("./lib/defineProp"); const HookManager_1 = require("./lib/HookManager"); const symbols_1 = require("./lib/symbols"); const destroyed_1 = require("./processors/destroyed"); /** Set the given property to true when the component is destroyed */ function TrackDestroyed() { return (target, value) => { defineProp_1.defineImmutable(target, symbols_1._destroyed, value); HookManager_1.HookManager.for(target).add(1 /* PRE_DESTROY */, destroyed_1.destroyed); }; } exports.TrackDestroyed = TrackDestroyed; //# sourceMappingURL=TrackDestroyed.js.map