PatchHandlerParams<$Object, MethodName>
Parameters passed to a PatchHandlerFunction callback.
Import:
import type { PatchHandlerParams } from 'obsidian-dev-utils/obsidian/components/monkey-around-component';Signature:
export interface PatchHandlerParams<$Object extends object, MethodName extends MethodKeys<$Object>>Properties
| Property | Type | Description |
|---|---|---|
| originalArguments | Parameters<ExtractFunction<$Object, MethodName>> | The original arguments of the intercepted call, as a tuple. |
| originalMethod | ExtractFunction<$Object, MethodName> | The original (unpatched) method. Call via originalFn.call(originalThis, ...originalArgs). |
| originalMethodBound | OmitThisParameter<ExtractFunction<$Object, MethodName>> | The original method, but with the this context already bound to the original object. Call via originalMethodBound(...originalArgs). |
| originalThis | $Object | The original this context of the intercepted call. |
Methods
| Method | Returns | Description |
|---|---|---|
| fallback(this) | ReturnType<ExtractFunction<$Object, MethodName>> | Invokes the original method with the original this and arguments. |
Links to this page: