Why does Typescript say my type is “assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint”?

后端 未结 0 1783
天涯浪人
天涯浪人 2021-01-07 19:18

Consider the following Typescript code:

class OrderFixture {
  orderId: string;

  constructor() {
    this.orderId = "foo";
  }
}

class DecisionFi         


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