Module: core/hook
Variables
GlobalHook
• GlobalHook: Object
Type declaration
| Name | Type |
|---|---|
befores | Object |
callbacks | Object |
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
| Name | Type |
|---|---|
befores | Object |
callbacks | Object |
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