UNPKG

@rws-framework/client

Version:

This package provides the core client-side framework for Realtime Web Suit (RWS), enabling modular, asynchronous web components, state management, and integration with backend services. It is located in `.dev/client`.

24 lines (21 loc) 977 B
import { DefaultRWSPluginOptionsType, RWSPlugin } from "../plugins/_plugin"; import IRWSUser from "./IRWSUser"; import { Container } from "../components/_container"; import RWSWindow from "./RWSWindow"; import { RWSInfoType } from "../client/components"; export abstract class IRWSPlugin<T extends DefaultRWSPluginOptionsType> { abstract onClientStart(): Promise<void>; abstract onPartedComponentsLoad(componentParts: RWSInfoType): Promise<void>; abstract onComponentsDeclare(): Promise<void>; abstract onSetUser(user: IRWSUser): Promise<void>; protected abstract options: T; protected abstract container: Container; protected abstract window: RWSWindow; } export interface IStaticRWSPlugin<T extends DefaultRWSPluginOptionsType> { new (options: T): RWSPlugin<T>; } export interface IPluginSpawnOption<T extends DefaultRWSPluginOptionsType = DefaultRWSPluginOptionsType> { pluginEntry: IStaticRWSPlugin<T>; options?: T; }