https://github.com/Microsoft/TypeScript/wiki/Updating-TypeScript-in-Visual-Studio-2017
авно обновил версию TypeScript с 2.3.4 до 2.4.0 в надежде использоватьстроковые перечисления, К моему ужасу, однако, меня встретили сообщения об ошибках:
Severity Code Description Project File Line Suppression State
Error TS2322 Type '"E"' is not assignable to type
'StepType'. ClientApp (tsconfig
project) Z:\SMART\Smart\Smart\ClientApp\app\models\process.model.ts 17 Active
Error TS2322 Type '"S"' is not assignable to type
'StepType'. ClientApp (tsconfig
project) Z:\SMART\Smart\Smart\ClientApp\app\models\process.model.ts 14 Active
Error TS2322 Type '"A"' is not assignable to type
'StepType'. ClientApp (tsconfig
project) Z:\SMART\Smart\Smart\ClientApp\app\models\process.model.ts 15 Active
Error TS2322 Type '"D"' is not assignable to type
'StepType'. ClientApp (tsconfig
project) Z:\SMART\Smart\Smart\ClientApp\app\models\process.model.ts 16 Active
Сообщения об ошибках относятся к следующему фрагменту кода (с номерами строк):
13. export enum StepType {
14. Start = 'S',
15. Activity = 'A',
16. Decision = 'D',
17. End = 'E'
18. }
Я использую Visual Studio 2017, которая утверждает, что установлен TypeScript 2.4.0:
Я искал черезПроблемы TypeScript, но без везения. Кто-нибудь знает, как это исправить?