Search code examples
angulartypescripttslint

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). My tslint extension in vscode is highlighting all of my subscriptions as deprecated, however, they're not. If I f12 into them they take me to the non-deprecated version:

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). Please help, this highlighting is driving me insane. I can also run "npm run lint" and the subscriptions are not found as lint errors.


Solution

  • 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

    posted from an answer in the comments as the OP did not post after several days