UNPKG

@ribajs/core

Version:

Core module of Riba.js

37 lines (36 loc) 1.28 kB
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: { [name: string]: ComponentLifecycleObject; }; protected constructor(); static getInstance(): LifecycleService; protected getEmpty(): ComponentLifecycleObject; protected addEventListeners(): void; protected getState(tagName: string): { connected: number; bound: number; }; protected getStates(): { [tagName: string]: ComponentLifecycleStates; }; protected checkStates(): { states: { [tagName: string]: 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; }