作为预期的常量类型名称

问题描述 投票:0回答:1

我正在尝试实现TypeScript array to string literal type

我在PhpStorm上出现红色下划线错误,在type name expected之后出现错误as const

enter image description here

我也尝试了<const>,但在<>附近也遇到了相同的错误

enter image description here

我的用户打字稿3.8.3

typescript phpstorm syntax-highlighting jetbrains-ide
1个回答
1
投票

对我来说很好:

© www.soinside.com 2019 - 2024. All rights reserved.