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

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

    I'm doing angular 2 and typescript and I didn't realize I had a space in my arrow notation

    I had .map(key = > instead of .map(key =>

    Definitely keep your eyes open for stupid syntax errors

提交回复
热议问题