Skip to content

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

PropertyTypeDescription
originalArgsParameters<ExtractFunction<Obj, MethodName>>The original arguments of the intercepted call, as a tuple.
originalMethodExtractFunction<Obj, MethodName>The original (unpatched) method. Call via originalFn.call(originalThis, ...originalArgs).
originalMethodBoundOmitThisParameter<ExtractFunction<Obj, MethodName>>The original method, but with the this context already bound to the original object. Call via originalMethodBound(...originalArgs).
originalThisObjThe original this context of the intercepted call.

Methods

MethodReturnsDescription
fallback(this)ReturnType<ExtractFunction<Obj, MethodName>>

Links to this page: