return HookType.STATIC
}
-async function internalRunHook <T>(handler: Function, hookType: HookType, result: T, params: any, onError: (err: Error) => void) {
+async function internalRunHook <T> (handler: Function, hookType: HookType, result: T, params: any, onError: (err: Error) => void) {
try {
if (hookType === HookType.FILTER) {
const p = handler(result, params)
}
if (hookType === HookType.ACTION) {
- if (isCatchable(p)) p.catch(err => onError(err))
+ if (isCatchable(p)) p.catch((err: any) => onError(err))
return undefined
}