我想输入一个类型(无需实现),它可以帮助我在类中添加一些动态字符串
例如:
class Dog() {
bark: () => void
eat: () => void
}
// But actually in runtime, bark is nobark; eat is noeat
// That's why I would like to have such type
inteface Husky extends addSomethingInClass(Dog, 'no') {}
// Husky.nobark && Husky.noeat can be autocompleted
inteface Corgi extends addSomethingInClass(Dog, 'go') {}
// Corgi.gobark && Corgi.goeat can be autocompleted
我想知道是否可以
感谢帮助