MonkeyAroundComponentRegisterFunctionPatchParams<Obj, FunctionName>
Parameters passed to MonkeyAroundComponent#registerFunctionPatch.
Import:
import type { MonkeyAroundComponentRegisterFunctionPatchParams } from 'obsidian-dev-utils/obsidian/components/monkey-around-component';Signature:
export interface MonkeyAroundComponentRegisterFunctionPatchParams<Obj extends object, FunctionName extends FunctionKeys<Obj>>Properties
| Property | Type | Description |
|---|---|---|
| functionName | FunctionName | The function name to patch. |
| obj | Obj | The object to patch. |
| once? | boolean | When true, the patch uninstalls itself the first time the patched function is invoked (by unloading this component), restoring the original — so the interception happens exactly once. Intended for a component dedicated to this single patch. Existing callers that omit it are unaffected. |
Methods
| Method | Returns | Description |
|---|---|---|
| patchHandler(originalValue) | Obj[FunctionName] | Patch handler function that takes the original value and returns the patched value. |