Type alias InsteadCallback<A, R>

InsteadCallback<A, R>: ((args, orig, self) => R | void)

Type Parameters

  • A extends unknown[] = unknown[]

  • R = unknown

Type declaration

    • (args, orig, self): R | void
    • Code to run instead of the original function

      Parameters

      • args: A

        Arguments passed to the original function

      • orig: ((...args) => R)

        The original function

          • (...args): R
          • Parameters

            • Rest ...args: A

            Returns R

      • self: ObjectExports

        The module the injected function is on

      Returns R | void

      New result to return

Generated using TypeDoc