In typescript how do you properly represent a class method that returns an a new instance of itself

后端 未结 0 1720
傲寒
傲寒 2021-01-13 10:14

Essentially what I am trying to accomplish is this

interface Clonable {
  clone(): this;
}

class BaseClass implements Clonable {
  clone() {
    return new t         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题