PatchData

Contains local patch data and state of the function.
Properties:
Name Type Description
thisObject object Original `this` value in current call of patched method.
methodArguments Arguments Original `arguments` object in current call of patched method. Please, never change function signatures, as it may cause a lot of problems in future.
cancelPatch cancelPatch Function with no arguments and no return value that may be called to reverse patching of current method. Calling this function prevents running of this callback on further original method calls.
originalMethod function Reference to the original method that is patched. You can use it if you need some special usage. You should explicitly provide a value for `this` and any method arguments when you call this function.
callOriginalMethod function This is a shortcut for calling original method using `this` and `arguments` from original call.
returnValue * This is a value returned from original function call. This property is available only in `after` callback or in `instead` callback after calling `callOriginalMethod` function.