@lifeart/gxt
Version:
<img align="right" width="95" height="95" alt="Philosopher’s stone, logo of PostCSS" src="./public/logo.png">
22 lines (20 loc) • 1.09 kB
TypeScript
import { DOMApi, ComponentLike } from './types';
/**
* Synchronously destroy a component or array of components.
* Used for immediate cleanup when async destruction is not needed.
*/
export declare function destroyElementSync(component: ComponentLike | Node | Array<ComponentLike | Node>, skipDom: boolean | undefined, api: DOMApi): void;
/**
* Unregister a component from its parent's child list.
* Used when relocating components without destroying them.
*/
export declare function unregisterFromParent(component: ComponentLike | Node | Array<ComponentLike | Node>): void;
/**
* Asynchronously destroy a component or array of components.
* Waits for all async destructors to complete.
*/
export declare function destroyElement(component: ComponentLike | Node | Array<ComponentLike | Node>, skipDom?: boolean, api?: DOMApi): Promise<void>;
/**
* Run destructors for a component and its children, collecting async promises.
*/
export declare function runDestructors(target: ComponentLike, promises?: Array<Promise<void>>, skipDom?: boolean, _api?: DOMApi): Array<Promise<void>>;