TypeScript 1.3 受保护的错误 [英] TypeScript 1.3 protected error

查看:29
本文介绍了TypeScript 1.3 受保护的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近在 VS2013 中安装了新的 TS 版本并尝试使用 protected 修饰符.但是 TS 验证器向我显示了一个错误(并用红线在 protected 字下划线.我收到类似

Recently installed new TS version into VS2013 and tried to use protected modifier. However TS validator shows me an error (and underlines protected word with a red line. I get an error like

未来保留字的使用.;预期

Use of future reserver word. ; expected

看起来像是在研究旧的 TS 定义.检查项目文件,有 1.1 版本的 TypeScript.还运行 tsc -v 产生 1.3.0.

looks like it's looking into old TS definitions. Checked the project file and there is 1.1 version of TypeScript. also running tsc -v produces 1.3.0.

你们中有人经历过吗?我缺少什么以及如何解决这个问题.

Does somebody of you guys experience that? What i'm missing and what to do to fix that.

非常感谢您的帮助.

export class SomeClass {
    protected metadata: Metadata;
    protected subItems: SomeClass[];
    constructor() {
    }
}

推荐答案

谢谢大家.为您解答!原因是(哦,有什么可耻的 =))ReSharper.它的验证显示该错误,暂停它我现在没有错误.看起来 JetBrains 的人应该像 Web Essentials 那样更新他们的定义.由于它们与新的 TS 版本 1.3.3 不兼容.并且目前没有待处理的更新.

thank you all guys. for your answers! the reason was (oh, what's the shame =) ) the ReSharper. It's validation was showing that error, suspending it i'm getting no errors now. Looks like JetBrains guys should update their definitions like Web Essentials did. As they aren't compatible with new TS version, 1.3. And no updates pending as for now.

希望它对其他人有用.

这篇关于TypeScript 1.3 受保护的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆