简体   繁体   English

tslint 扩展将订阅的非弃用版本标识为弃用

[英]tslint extension identifying non-deprecated version of subscribe as deprecated

Wondering if anyone else is seeing this issue (Yes I know I should switch to eslint but haven't gotten there yet).想知道是否有其他人看到这个问题(是的,我知道我应该切换到 eslint 但还没有到那里)。 My tslint extension in vscode is highlighting all of my subscriptions as deprecated, however, they're not.我在 vscode 中的 tslint 扩展将我的所有订阅都突出显示为已弃用,但是,它们不是。 If I f12 into them they take me to the non-deprecated version:如果我 f12 进入他们,他们会将我带到非弃用版本:

subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void): Subscription;

Here's one, just incase I'm loosing my mind:这是一个,以防我失去理智:

poll.subscribe(LastValue => {
    this.runsomecode();
});

I've tried uninstalling and reinstalling the extension and restarting vscode and my computer (the usual IT issues).我已经尝试卸载并重新安装扩展并重新启动 vscode 和我的计算机(常见的 IT 问题)。 Please help, this highlighting is driving me insane.请帮忙,这个突出显示让我发疯。 I can also run "npm run lint" and the subscriptions are not found as lint errors.我也可以运行“npm run lint”,并且没有发现订阅作为 lint 错误。

This is caused by a typescript bug in v4.2.2 and will be addressed in next release per https://github.com/microsoft/TypeScript/issues/43053这是由 v4.2.2 中的 typescript 错误引起的,将在下一个版本中按https://github.com/microsoft/TypeScript/issues/43053解决

posted from an answer in the comments as the OP did not post after several days从评论中的答案发布,因为几天后OP没有发布

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM