Type Alias BeforeCallback<A>

BeforeCallback<A>: ((args: A, self: ObjectExports) => A | undefined | void)

Code to run before the original function

Type Parameters

  • A extends unknown[] = unknown[]

Type declaration

    • (args, self): A | undefined | void
    • Parameters

      • args: A

        Arguments passed to the original function

      • self: ObjectExports

        The module the injected function is on

      Returns A | undefined | void

      New arguments to pass to the original function, or undefined to leave them unchanged