Interface IModuleCallbacksMap<TM>

Maps event names to their callback payload types.

Extend this interface to map event names to payload types. Use undefined for events without a payload.

interface IModuleCallbacksMap<TM = Record<string, any>> {
    destroy: undefined;
    props: Partial<TM>;
}

Type Parameters

  • TM = Record<string, any>

Hierarchy (View Summary)

Properties

Properties

destroy: undefined

Triggered when the module is destroyed.

props: Partial<TM>

Triggered when the module's properties are updated. Receives the diff (changed keys and new values) as the first argument.