Hook class.

Hierarchy

Constructors

Properties

_hooks: Record<string, Hook[]>
_lifecycleHookScore: number = 0

Methods

  • Parameters

    Returns Promise<void>

  • Parameters

    Returns Promise<void>

  • 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

  • Run command:after hook with dependencies. Note that this method is EXPERIMENTAL and might change without warning!

    Parameters

    • app: App
    • commandArgs: string[]

    Returns Promise<void>

  • Run command:before hook with dependencies. Note that this method is EXPERIMENTAL and might change without warning!

    Parameters

    • app: App
    • commandArgs: string[]

    Returns Promise<any>

  • 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>

  • Run server:start hook with dependencies. Note that this method is EXPERIMENTAL and might change without warning!

    Parameters

    Returns Promise<void>

  • Run server:stop hook with dependencies. Note that this method is EXPERIMENTAL and might change without warning!

    Parameters

    Returns Promise<void>

Generated using TypeDoc