export default class Observable extends OperetorObservable{
constructor(subscribe: (observer: Observer) => any){
super(<OperetorObservable>{subscribe: subscribe}) //1
}
}
export default class OperatorObservable{
source:OperatorObservable = null;
constructor(source: OperatorObservable){
this.source = source;
}
subscribe() {
return null;
}
}
为什么OperatorObservable中包含方法subscribe的时候,就一切正常
而删除掉OperatorObservable中的subscribe方法的时候,super(<OperetorObservable>{subscribe: subscribe})
就报类型转换异常