fractal-core
Version:
A minimalist and well crafted app, content or component is our conviction
19 lines (18 loc) • 499 B
TypeScript
import { ModuleAPI } from './module';
export interface Handler {
(...params: any[]): HandlerInterface | Promise<HandlerInterface>;
}
export interface HandlerInterface {
(mod: ModuleAPI): HandlerObject | Promise<HandlerObject>;
}
export interface HandlerObject {
state: any;
handle: HandlerFunction;
destroy: {
(): void | Promise<void>;
};
}
export interface HandlerFunction {
(id: string, value: HandlerMsg): Promise<any>;
}
export declare type HandlerMsg = any;