Interface ICallback<Types>

Full data for a registered callback, including its settings and unique information such as ID and target.

Type Parameters

  • Types

Hierarchy

Properties

action: TAction<Types[keyof Types]>

The actual callback function to be executed.

id: string

The unique identifier of the callback.

isEnabled: boolean

Indicates whether the callback is enabled. If false, the callback will not be executed.

isOnce?: boolean

If true, the callback will automatically be removed after it is called once.

isProtected?: boolean

If true, the callback is protected and cannot be removed by standard removal methods.

name?: string

The name of the callback.

target: keyof Types

The target event or event name for which the callback is registered.

timeout?: number

The timeout (in milliseconds) before the callback is executed. A value of undefined means no timeout.