Skip to content

"Overriding" JSDoc at re-exports mostly only results in propagation of added "@deprecated" JSDoc tag #53960

Description

@starball5

Bug Report

🔎 Search Terms

JSDoc, Daniel Edeling (@deprecated), override, re-export.

Related on Stack Overflow: How can I make VS Code recognize an overridden JSDoc for a re-export?.

🕗 Version & Regression Information

I tried this with TypeScript 5.0.4 and 4.6.4. I tried 4.6.4 because I noticed that #47293 happened just a bit before the release of 4.6. I witnessed the same behaviour for both versions I tried. I have described that behaviour below.

💻 Code

exporter.js:

/** * JSDoc from original export. * A thing that is definitely not deprecated. */exportconstthing=123;

reexporter.js:

export{/** * JSDoc from re-export. * A thing that is deprecated. * @deprecated reasons. */thing}from"./exporter";

importer.js:

// ✅ means expected behaviour// ❌ means unexpected behaviourimport{thing// ✅ not crossed out. ✅ hover info: "JSDoc from original export. A thing that is definitely not deprecated."asoriginalThing// ✅ not crossed out. ✅ hover info: "JSDoc from original export. A thing that is definitely not deprecated."}from"./exporter"import{thing// ✅ crossed out. ✅ hover info: "JSDoc from re-export. A thing that is deprecated. @deprecated — reasons." off. even this comment is crossed out.asreexportedThing// ✅ crossed out. ❌ hover info: "JSDoc from original export. A thing that is definitely not deprecated."}from"./reexporter";reexportedThing();// ✅ crossed out. ❌ hover info: "JSDoc from original export. A thing that is definitely not deprecated."import{thing// ✅ crossed out. ❌ hover info: "JSDoc from original export. A thing that is definitely not deprecated."}from"./reexporter"thing();// ✅ crossed out. ❌ hover info: "JSDoc from original export. A thing that is definitely not deprecated."

🙁 Actual behavior

see the above code.

🙂 Expected behavior

see the above code. Everywhere with a "❌", I expected to see the overridden JSDoc in the VS Code hover info backed by tsserver.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs More InfoThe issue still hasn't been fully clarified

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions