Interface Handler<T>

Handler defines a single Hook handler. Multiple handlers can share the same id. If Id is not explicitly set it will be autogenerated by Hook.Add and Hook.AddHandler.

Type Parameters

  • T

Hierarchy

  • Handler

Properties

Properties

func: ((_arg0) => void)

Type declaration

    • (_arg0): void
    • Func defines the handler function to execute.

      Note that users need to call e.Next() in order to proceed with the execution of the hook chain.

      Parameters

      • _arg0: T

      Returns void

id: string

Id is the unique identifier of the handler.

It could be used later to remove the handler from a hook via [Hook.Remove].

If missing, an autogenerated value will be assigned when adding the handler to a hook.

priority: number

Priority allows changing the default exec priority of the handler within a hook.

If 0, the handler will be executed in the same order it was registered.

Generated using TypeDoc