Closed
Description
- VS Code Version: 1.56.1
- OS Version: macOS Big Sur 11.3.1
Steps to Reproduce:
- Create two overloads for a function. Add a JSDoc
@deprecated
block tag on the first overload. - For the first overload, VSCode will strike it correctly, but for the second it will not.
Does this issue occur when all extensions are disabled?: Yes
Example from Ramda package:
/**
* Create a new object with the own properties of a
* merged with the own properties of object b.
* This function will *not* mutate passed-in objects.
*
* @deprecated since 0.26 in favor of mergeRight
*/
export function merge<O2 extends object>(__: Placeholder, b: O2): <O1 extends object>(a: O1) => Merge<O2, O1, 'flat'>;
export function merge(__: Placeholder): <O1 extends object, O2 extends object>(b: O2, a: O1) => Merge<O2, O1, 'flat'>;
export function merge<O1 extends object, O2 extends object>(a: O1, b: O2): Merge<O2, O1, 'flat'>;
export function merge<O1 extends object>(a: O1): <O2 extends object>(b: O2) => Merge<O2, O1, 'flat'>;
Here the strikethrough is applied correctly:
From the quick info tooltip you can see that the @deprecated
tag was read, but the strike wasn't applied.
I realize that an overload might be deprecated individually, but from this comment from @sandersn I understood that as of TypeScript 4.0 if the first overload is deprecated, then it would cascade, but I might have misunderstood what he said.
This might very well be an issue on TypeScript side in fact, as the (ts)
error report is different.