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