Error: Cannot invoke an expression whose type lacks a call signature

后端 未结 8 2103
执笔经年
执笔经年 2020-12-02 17:50

I am brand new to typescript, and I have two classes. In the parent class I have:

abstract class Component {
  public deps: any = {};
  public props: any = {         


        
8条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-02 18:18

    The function that it returns has a call signature, but you told Typescript to completely ignore that by adding : any in its signature.

    Don't do that.

提交回复
热议问题