Skip to main content

Module: core/hook

Variables

GlobalHook

GlobalHook: Object

Type declaration

NameType
beforesObject
callbacksObject
before(event: string, cb: (data: any) => any, deps: any[]) => void
emit(event: string, data: any) => void
on(event: string, cb: Function, deps: any[]) => void

Hook

Hook: Context<{ befores: {} = {}; callbacks: {} = {}; before: (event: string, cb: (data: any) => any, deps: any[]) => void ; emit: (event: string, data: any) => void ; on: (event: string, cb: Function, deps: any[]) => void }>

Functions

useHook

useHook(): Object

Returns

Object

NameType
beforesObject
callbacksObject
before(event: string, cb: (data: any) => any, deps: any[]) => void
emit(event: string, data: any) => void
on(event: string, cb: Function, deps: any[]) => void

useHookLogger

useHookLogger(): void

Logs all hook events for debugging purposes

Returns

void