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

前端 未结 9 1914
名媛妹妹
名媛妹妹 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:34

    For what it worth, if anyone has this problem only in VSCode, just restart VSCode and it should fix it. Sometimes, Intellisense seems to mess up with imports or types.

    Related to Typescript: Argument of type 'RegExpMatchArray' is not assignable to parameter of type 'string'

提交回复
热议问题