8
错误:无法调用类型缺少调用签名的表达式
我是打字稿的新手,并且有两节课。在父类中,我有: abstract class Component { public deps: any = {}; public props: any = {}; public setProp(prop: string): any { return <T>(val: T): T => { this.props[prop] = val; return val; }; } } 在儿童班,我有: class Post extends Component { public toggleBody: string; constructor() { this.toggleBody = this.setProp('showFullBody'); } public …