piral-base
Version:
The base library for creating a Piral instance.
19 lines (18 loc) • 830 B
TypeScript
import { SinglePilet, PiletApi, PiletLifecycleHooks } from '../types';
/**
* Cleans up the pilet by destroying the referenced stylesheets and
* running the cleanup steps incl. deletion of referenced global
* resources.
* @param app The pilet to be cleaned up.
* @param api The api for the pilet to be used.
* @param hooks The hooks to use in the cleanup process.
*/
export declare function runCleanup(app: SinglePilet, api: PiletApi, hooks: PiletLifecycleHooks): void;
/**
* Prepares the cleanup of a pilet by wiring up a handler to the
* unload event.
* @param app The pilet to be prepared for cleanup.
* @param api The api for the pilet to be used.
* @param hooks The hooks to use in the cleanup process.
*/
export declare function prepareCleanup(app: SinglePilet, api: PiletApi, hooks: PiletLifecycleHooks): void;