Interface ICallback<Types>

Represents a registered callback with its settings and metadata.

interface ICallback<Types> {
    action: TCallbacksAction<Types[keyof Types]>;
    id: string;
    name?: string;
    once?: boolean;
    protected?: boolean;
    target: keyof Types;
    timeout?: number;
}

Type Parameters

  • Types

Hierarchy (View Summary)

Properties

action: TCallbacksAction<Types[keyof Types]>

Callback function to execute.

id: string

Unique identifier for the callback.

name?: string

Optional name for debugging.

once?: boolean

Removes the callback after its first execution.

protected?: boolean

Marks the callback as protected, preventing its removal.

target: keyof Types

Event name associated with the callback.

timeout?: number

Execution delay in milliseconds; undefined means no timeout.