Type alias HookCallback<ARGS, RET>

HookCallback<ARGS, RET>: HookSyncCallback<ARGS, RET> | HookAsyncCallback<ARGS, RET>

Represents a callback function for a hook, which can be either synchronous or asynchronous.

Type Parameters

  • ARGS extends CBArgs = any[]

    The type of the arguments passed to the callback.

  • RET = any

    The type of the return value of the callback.

Param: args

The arguments passed to the callback.

Returns

The return value of the callback, or a promise that resolves with the return value.