import { OnDestroy, TemplateRef, ViewContainerRef, ViewRef } from '@angular/core'; export declare type TemplateDef = any; export declare const enum KeepAliveFlags { Detached = 0, Attached = 1 } export declare class ViewRefAttachable { viewRef: ViewRef; flag: KeepAliveFlags; viewContainerRef: ViewContainerRef; get attached(): boolean; get detached(): boolean; constructor(viewRef: ViewRef); attachToViewContainerRef(viewContainer: ViewContainerRef): void; detachFromViewContainerRef(): void; destroy(): void; } export declare class KeepAliveConfig { limit: number; } export declare class KeepAliveGC { private config; constructor(config: KeepAliveConfig); collect(viewRefs: Map): void; } export declare class KeepAliveViewRefs implements OnDestroy { private gc; private viewRefs; constructor(gc: KeepAliveGC); add(templateRef: TemplateRef, viewRef: ViewRef): void; has(templateRef: TemplateRef): boolean; get(templateRef: TemplateRef): ViewRefAttachable; delete(templateRef: TemplateRef): boolean; reattach(templateRef: TemplateRef): void; ngOnDestroy(): void; collect(): void; forEach(fn: (v: ViewRefAttachable) => void): void; private getTemplateDef; } export declare class KeepAliveManager { private viewRefs; static patched: symbol; constructor(viewRefs: KeepAliveViewRefs); attach(viewContainerRef: ViewContainerRef, templateRef: TemplateRef): void; detach(viewContainerRef: ViewContainerRef, templateRef: TemplateRef): void; private patchClear; } export declare class KeepAliveDirective implements OnDestroy { private manager; private viewContainerRef; private templateRef; constructor(manager: KeepAliveManager, viewContainerRef: ViewContainerRef, templateRef: TemplateRef); ngOnDestroy(): void; }