getParentOfClass
Available since v0.9
Returns the parent class of given target class, or null
if class does not have a parent.
import { getParentOfClass } from '@aedart/support/reflections';
class A {}
class B extends A {}
class C extends B {}
getParentOfClass(A); // null
getParentOfClass(B); // A
getParentOfClass(C); // B
See also getAllParentsOfClass()
.