Skip to content

isMethodOverridden

Whether an instance overrides a method its base class declares.

Import:

import { isMethodOverridden } from '@mnaoumov/obsidian-lib/command-handlers/command-handler';

Signature:

function isMethodOverridden(instance: object, baseClass: abstract new (...arguments_: never[]) => object, methodName: string): boolean

Parameters:

Parameter Type Description
instance object The instance.
baseClass abstract new (…arguments_: never[]) => object The class whose own implementation counts as not overridden.
methodName string The method name.

Returns: boolean — Whether the instance’s method is not the base class’s own.