UNPKG

ngx-decorate

Version:

Useful decorators for Angular 2 and above

12 lines 506 B
import { defineImmutable } from './lib/defineProp'; import { HookManager } from './lib/HookManager'; import { _destroyed } from './lib/symbols'; import { destroyed } from './processors/destroyed'; /** Set the given property to true when the component is destroyed */ export function TrackDestroyed() { return (target, value) => { defineImmutable(target, _destroyed, value); HookManager.for(target).add(1 /* PRE_DESTROY */, destroyed); }; } //# sourceMappingURL=TrackDestroyed.js.map