Skip to content

@lelantos-org/sdk / internal / safeCall

Function: safeCall() ​

ts
function safeCall<A>(
   name, 
   cb, 
   arg
): void;

Defined in: @lelantos-org/sdk/dist/core/callbacks.d.ts:6

Invoke a caller-supplied callback, logging and swallowing any throw, so a throwing listener cannot break an in-flight operation. Use for every user-provided hook that fires mid-operation.

Type Parameters ​

Type Parameter
A

Parameters ​

ParameterType
namestring
cb((arg) => void) | undefined
argA

Returns ​

void