• Intercept the named prototype functions for the target class / object

    Parameters

    • target: any

      The target object

    • funcName: string

      The function name

    • callbacks: IInstrumentHooksCallbacks

      The callbacks to configure and call whenever the function is called

    • checkPrototype: boolean = true

      If the function doesn't exist on the target should it attempt to hook the prototype function

    • OptionalcheckParentProto: boolean

      If the function doesn't exist on the target or it's prototype should it attempt to hook the parent's prototype

    Returns IInstrumentHook