Async hook class.

Hierarchy

Constructors

Properties

_hooks: Record<string, Hook[]>

Methods

  • Parameters

    • chain: Hook[]

    Returns ((...args) => Promise<any>)

      • (...args): Promise<any>
      • Parameters

        • Rest ...args: any[]

        Returns Promise<any>

  • Add hook.

    Parameters

    • name: string
    • fn: Hook

    Returns void

  • Remove one or more hook handlers.

    Parameters

    • name: string
    • Optional fn: Hook

    Returns void

  • Run hook.

    Parameters

    • name: string
    • Rest ...args: any[]

    Returns Promise<any>

Generated using TypeDoc