import { Disposable } from './disposable'; export interface IDisposableTracker { /** * Is called on construction of a disposable. */ trackDisposable(disposable: Disposable): void; /** * Is called when a disposable is registered as child of another disposable (e.g. {@link DisposableStore}). * If parent is `null`, the disposable is removed from its former parent. */ setParent(child: Disposable, parent: Disposable | null): void; /** * Is called after a disposable is disposed. */ markAsDisposed(disposable: Disposable): void; /** * Indicates that the given object is a singleton which does not need to be disposed. */ markAsSingleton(disposable: Disposable): void; } export declare function setDisposableTracker(tracker: IDisposableTracker | null): void; export declare function trackDisposable(x: T): T; export declare function markAsDisposed(disposable: Disposable): void; /** * Indicates that the given object is a singleton which does not need to be disposed. */ export declare function markAsSingleton(singleton: T): T; export declare function setParentOfDisposable(child: Disposable, parent: Disposable | null): void; export declare function setParentOfDisposables(children: Disposable[], parent: Disposable | null): void;