Skip to content

PatchHandlerFunction<$Object, MethodName>

A patch handler function that intercepts calls to a method on an object.

Import:

import type { PatchHandlerFunction } from 'obsidian-dev-utils/obsidian/components/monkey-around-component';

Signature:

export type PatchHandlerFunction<$Object extends object, MethodName extends MethodKeys<$Object>>

Signature:

type PatchHandlerFunction<$Object, MethodName> = (
params: PatchHandlerParams<$Object, MethodName>
) => ReturnType<ExtractFunction<$Object, MethodName>>

Type: ( params: PatchHandlerParams<$Object, MethodName> ) => ReturnType<ExtractFunction<$Object, MethodName>>


Links to this page: