Skip to content

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

Closed
@mjbvz

Description

@mjbvz

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

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions