You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 */exportfunctionmerge<O2extendsobject>(__: Placeholder,b: O2): <O1extendsobject>(a: O1)=>Merge<O2,O1,'flat'>;exportfunctionmerge(__: Placeholder): <O1extendsobject,O2extendsobject>(b: O2,a: O1)=>Merge<O2,O1,'flat'>;exportfunctionmerge<O1extendsobject,O2extendsobject>(a: O1,b: O2): Merge<O2,O1,'flat'>;exportfunctionmerge<O1extendsobject>(a: O1): <O2extendsobject>(b: O2)=>Merge<O2,O1,'flat'>;
Here the strikethrough is applied correctly:
Here it's not:
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.
The text was updated successfully, but these errors were encountered:
rdsedmundo
changed the title
JSDoc @deprecated block tag should expand for all overloads
JSDoc @deprecated block tag should expand for all function overloads
May 13, 2021
but from this comment from @sandersn I understood that as of TypeScript 4.0
That was actually 4.0 beta; by the full release the behaviour matched other jsdoc behaviour.
This is a subissue of #407, so let's continue the discussion over there. I believe the current thing missing is (1) a comprehensive proposal (2) that includes analysis of @inheritdoc.
Steps to Reproduce:
@deprecated
block tag on the first overload.Does this issue occur when all extensions are disabled?: Yes
Example from Ramda package:
Here the strikethrough is applied correctly:

Here it's not:

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.The text was updated successfully, but these errors were encountered: