UNPKG

kiss-js-bloc

Version:

Bloc type state management solution for typescript

12 lines (11 loc) 404 B
import { BlocBase } from "./bloc_base"; export interface EventHandler<State> { (data: State): Function; } export declare abstract class Bloc<State extends Object> extends BlocBase<State> { private eventEmitter; constructor(initialState: State); on(event: string, handler: ((state: State) => any)): void; call(event: string, state: State): void; addNewState(state: State): void; }