[英]Strange typescript Object.values issue in vscode
I want to write Object.values
and TS gives me a visual error (it compiles fine though). 我想编写
Object.values
,TS给了我一个视觉上的错误(尽管编译很好)。
I've done the googling, restarted vscode, and that's my tsconfig.json
. 我完成了谷歌搜索,重新启动了vscode,这就是我的
tsconfig.json
。
Could this be a linter issue? 难道这是一个小问题? I'm using
eslint
with eslint-plugin-typescript
. 我将
eslint
与eslint-plugin-typescript
eslint
一起使用。 I did check their docs for something akin to a --lib
option, but nothing. 我确实检查了他们的文档是否类似于
--lib
选项,但是什么也没有。 I assume it should read tsconfig.json
. 我认为它应该读
tsconfig.json
。
Oh, using select typescript version
set to project's version, not vscode's. 哦,使用
select typescript version
设置为项目的版本,而不是vscode的版本。
Try using "lib": ["es2018"]
for the moment. "lib": ["es2018"]
尝试使用"lib": ["es2018"]
。
Object.values
doesn't seem to be included in es2017
, which seems like a regression. Object.values
中似乎没有包含es2017
,这似乎是一种回归。 I've opened this issue to track the problem 我已打开此问题来跟踪问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.