trackable-class
v1.0.1
Published
a package to trackable class that you can check the classs all subClass
Downloads
2
Readme
简介
JavaScript 获取指定基类的所有子类
示例
npm i trackable-class
import trackable from 'trackable-class'
class Parent {
constructor(props) {
}
hello () {
console.log(1);
}
}
Parent = trackable(Parent)
class B extends Parent{
}
class D extends Parent {
}
new B()
new D()
console.log(Parent.childClass);
// [class B, class D]