• Add an instrumentation hook to the provided named "event" for the target class / object, this doesn't check whether the named "event" is in fact a function and just assigns the instrumentation hook to the target[evtName]

    Parameters

    • target: any

      The target object

    • evtName: string

      The name of the event

    • callbacks: IInstrumentHooksCallbacks

      The callbacks to configure and call whenever the function is called

    • OptionalcheckPrototype: boolean

      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