Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only mark function/method name as deprecated instead of entire call expression #39686

Closed
mjbvz opened this issue Jul 21, 2020 · 0 comments · Fixed by #39702
Closed

Only mark function/method name as deprecated instead of entire call expression #39686

mjbvz opened this issue Jul 21, 2020 · 0 comments · Fixed by #39702
Assignees
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Jul 21, 2020

TypeScript Version: 4.0.0-dev.20200720

Search Terms:

Code

For the typescript

/** @deprecated */
function bar(x: number, y: number){}
bar(1, 2);

export interface Foo { 
    /** @deprecated */
    bar(x: number, y: number): void;
}

({ } as Foo).bar(1, 2);

Expected behavior:
I'd expect that just the function and method names (bar) are marked as deprecated

Actual behavior:
The entire call expression is marked as deprecated

Screen Shot 2020-07-21 at 12 17 18 AM

For complex function/method calls, the current behavior feels a little too agressive :

Screen Shot 2020-07-21 at 12 19 15 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants