TypeScript's string enums - “Type … is not assignable to type …”

后端 未结 9 2066
不思量自难忘°
不思量自难忘° 2020-12-10 23:45

I have recently upgraded the version of TypeScript from 2.3.4 to 2.4.0 hoping to use the string enums. To my dismay, however, I have been greeted with the error messages:

9条回答
  •  余生分开走
    2020-12-11 00:22

    If you are like me, using VS but not in project (just opening a folder), then I just had to install the latest version of TS for VS:

    https://marketplace.visualstudio.com/items?itemName=TypeScriptTeam.typescript-27-vs2017

提交回复
热议问题