catchOutOfBandApply
catchOutOfBandApply<
A,R>(func,args):R|undefined
Defined in: packages/core/src/function/no-throw.ts:18
Calls a function, containing any error it throws — the error still surfaces,
out of band (via queueMicrotask), instead of propagating to this call’s
caller.
Note: this does not handle promise rejections. For async functions, use catchOutOfBandApplyAsync.
Type Parameters
Section titled “Type Parameters”A extends unknown[]
R
Parameters
Section titled “Parameters”Callable<A, R>
The function to call.
A
Arguments to pass to it.
Returns
Section titled “Returns”R | undefined
The function’s result, or undefined if it threw.