Type Parameters

  • T extends object

Hierarchy

  • HookManager

Constructors

Properties

cacheSymbol: symbol = ...
enabled: boolean = true
hooks: CallHook<T>[] = []
identity: `${string}-${string}-${string}-${string}-${string}` = ...

Methods

  • Attaches the hook manager to a target object. All of the target's functions will be wrapped in a proxy that will execute the hooks before and after any function is called.

    Type Parameters

    • A extends object

    Parameters

    • hookTarget: A

    Returns A

  • Parameters

    • target: T
    • name: string | symbol

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

      • (...args): any
      • Parameters

        • Rest ...args: any[]

        Returns any

  • Returns true if this hook manager is attached to the target object otherwise false

    Parameters

    • hookTarget: T

      The target object to check

    Returns boolean

    true if this hook manager is attached to the target object otherwise false