Argument of type 'X' is not assignable to parameter of type 'X'

前端 未结 9 1916
名媛妹妹
名媛妹妹 2021-02-02 05:15

Good day. I\'m new to Type Script, using VSCode.

Getting following errors:

  1. error TS2322: Type \'() => string\' is not assignable to type

9条回答
  •  孤街浪徒
    2021-02-02 05:47

    In my case, strangely enough, I was missing the import of the class it was complaining about and my IDE didn't detect it.

提交回复
热议问题