diff --git a/src/util/safeExec.ts b/src/util/safeExec.ts index a03fe59d2..50369529f 100644 --- a/src/util/safeExec.ts +++ b/src/util/safeExec.ts @@ -3,7 +3,11 @@ import { handleError } from './handleError'; const SAFE_EXEC_ENABLED = !DEBUG_MORE; -export default function safeExec(cb: Function, rescue?: (err: Error) => void, always?: NoneToVoidFunction) { +export default function safeExec( + cb: F, + rescue?: (err: Error) => void, + always?: NoneToVoidFunction, +): ReturnType | undefined { if (!SAFE_EXEC_ENABLED) { return cb(); }