@ribajs/core
Version:
Core module of Riba.js
37 lines (36 loc) • 1.28 kB
TypeScript
import { EventDispatcher } from "@ribajs/events";
import type { ComponentLifecycleEventData, ComponentLifecycleObject, ComponentLifecycleStates } from "../types/index.js";
export declare class LifecycleService {
events: EventDispatcher;
protected debug: boolean;
protected routerEvents: EventDispatcher;
protected timeout: number | null;
protected allBound: boolean;
protected static instance: LifecycleService;
protected components: {
[]: ComponentLifecycleObject;
};
protected constructor();
static getInstance(): LifecycleService;
protected getEmpty(): ComponentLifecycleObject;
protected addEventListeners(): void;
protected getState(tagName: string): {
connected: number;
bound: number;
};
protected getStates(): {
[]: ComponentLifecycleStates;
};
protected checkStates(): {
states: {
[]: ComponentLifecycleStates;
};
allBound: boolean;
};
protected onAllBound(): void;
protected onError(error: Error, data: ComponentLifecycleEventData): void;
protected onTimeout(): void;
protected clearTimeout(): void;
protected resetTimeout(): number;
protected reset(): void;
}