Type Alias InsteadCallback<A, R>

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

Code to run instead of the original function

Type Parameters

  • A extends unknown[] = unknown[]
  • R = unknown

Type declaration

    • (args: A, orig: (...args: A) => R, self: ObjectExports): R | void
    • Parameters

      • args: A

        Arguments passed to the original function

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

        The original function

      • self: ObjectExports

        The module the injected function is on

      Returns R | void

      New result to return

MMNEPVFCICPMFPCPTTAAATR