@rxx/core
Version:
React MVI micro framework.
20 lines (19 loc) • 575 B
TypeScript
/**
* @fileoverview
* @author Taketoshi Aono
*/
import { Intent } from './intent';
import { SubjectTree } from '../subject';
/**
* Intent dispatcher interface.
*/
export interface IntentHandler {
(key: string, args?: any): void;
callback<Args = any>(key: string, args?: Args, fix?: boolean): (e?: Args) => void;
}
/**
* Create intent handler from Intent StateHandler.
* @param intent Intent StateHandler instance.
* @returns IntentHandler implementation.
*/
export declare function generateIntentHandler(intent: Intent, subject: SubjectTree): IntentHandler;