@mojojs/core
    Preparing search index...

    Class Hooks

    Hook class.

    Hierarchy (View Summary)

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

      Returns Promise<void>

    • Parameters

      Returns Promise<void>

    • Parameters

      • chain: Hook[]

      Returns (...args: any[]) => 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
      • Optionalfn: Hook

      Returns void

    • Run hook.

      Parameters

      • name: string
      • ...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>