isClassMethodReference
Available since v0.11
Determine if value is a "class method reference". A class method reference is an array
with two values:
0 = Constructor | object
Target class constructor or class instance1 = PropertyKey
Name of method (property key in target).
import { isClassMethodReference } from '@aedart/support/reflections';
class A {
age = 23;
foo: () => { /* ...not shown... */ }
}
const instance = new A();
isClassMethodReference([ A, 'age' ]); // false
isClassMethodReference([ instance, 'age' ]); // false
isClassMethodReference([ A, 'foo' ]); // true
isClassMethodReference([ instance, 'foo' ]); // true