Skip to content

MethodKeys<Obj>

Keys of Obj whose value is a plain function (a “real method”). Function-like objects that carry extra members are excluded — e.g. a Debouncer (which adds cancel/run) belongs to MonkeyAroundComponent#registerFunctionPatch, not MonkeyAroundComponent#registerMethodPatch. The check is whether the member has any own keys beyond a bare function’s (Exclude<keyof T, keyof GenericFunction> is never).

Import:

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

Signature:

export type MethodKeys<Obj extends object>

Signature:

type MethodKeys<Obj> = MethodKeysMap<Obj>[FunctionKeys<Obj>]

Type: MethodKeysMap<Obj>[FunctionKeys<Obj>]