import { Effect, ExecutionMode } from 'corrie'; import { Mode as RoutineMode, Routine } from './routines'; import { Priority, HandlerProperties, Handler } from './HooterBase'; import { Events, UserEvent } from './events'; interface TootEffect extends Effect { effect: 'toot'; event: UserEvent | string; args: any[]; } interface HookEffect extends Effect { effect: 'hook'; event: string | HandlerProperties; priority?: Priority; routineMode: RoutineMode; fn?: Function; } interface ForkEffect extends Effect { effect: 'fork'; routine: Routine; mode: ExecutionMode; args: any[]; } declare function throwHandler(effect: Effect, execution: any): never; declare function tootHandler(effect: TootEffect, execution: any): any; declare function toot(event: UserEvent | string, ...args: any[]): TootEffect; declare function tootWith(event: UserEvent | string, cb: Function, ...args: any[]): TootEffect; declare function hookHandler(effect: HookEffect, execution: any): Handler & Routine; declare function hook(event: string | HandlerProperties, fn: Function): HookEffect; declare function hookStart(event: string | HandlerProperties, fn: Function): HookEffect; declare function hookEnd(event: string | HandlerProperties, fn: Function): HookEffect; declare function preHook(event: string, fn: Function): HookEffect; declare function preHookStart(event: string | HandlerProperties, fn: Function): HookEffect; declare function preHookEnd(event: string | HandlerProperties, fn: Function): HookEffect; declare function postHook(event: string | HandlerProperties, fn: Function): HookEffect; declare function postHookStart(event: string | HandlerProperties, fn: Function): HookEffect; declare function postHookEnd(event: string | HandlerProperties, fn: Function): HookEffect; declare function forkHandler(effect: ForkEffect, execution: any): any; export { TootEffect, HookEffect, ForkEffect, throwHandler, tootHandler, toot, tootWith, hookHandler, hook, hookStart, hookEnd, preHook, preHookStart, preHookEnd, postHook, postHookStart, postHookEnd, forkHandler };