最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - False positive "Lexical declarations require ECMAScript 6" and "TypeScript 1.x feature.

programmeradmin1浏览0评论

After updating TypeScript to version 1.7 (the latest version at this time) I've been seeing Resharper point out errors, for example when using namespace, const and let, even though they should be supported by this version of TypeScript.

For example:

TypeScript 1.x feature. Current language is 1.4

and

Lexical declarations (let and const) require ECMAScript 6 piler target. Current target is ECMAScript 5.

After updating TypeScript to version 1.7 (the latest version at this time) I've been seeing Resharper point out errors, for example when using namespace, const and let, even though they should be supported by this version of TypeScript.

For example:

TypeScript 1.x feature. Current language is 1.4

and

Lexical declarations (let and const) require ECMAScript 6 piler target. Current target is ECMAScript 5.

Share Improve this question edited Dec 8, 2015 at 3:28 Nic asked Dec 7, 2015 at 5:45 NicNic 12.9k20 gold badges84 silver badges106 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 15

It seems my version of Resharper (10.0.1) is unable to detect the TypeScript version.

To resolve this you can specify the version manually. Since this version of Resharper (the latest at this time of posting) doesn't support TypeScript 1.7, TypeScript 1.6 needs to be used.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论