question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JSDoc @link not resolved across modules

See original GitHub issue

Bug Report

While verifying https://github.com/microsoft/vscode/issues/119357

🔎 Search Terms

  • link
  • export
  • modules

🕗 Version & Regression Information

  • I was unable to test this on prior versions because it did not previously exist

⏯ Playground Link

Workbench Repro

💻 Code

// @filename: a.ts
import { Model } from './b';

/**
 * {@link Model}
 */

// @filename: b.ts
export class Model {}

🙁 Actual behavior

@link Model is not clickable

🙂 Expected behavior

I expected to be able to click on @link Model

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:7
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ortacommented, Jun 10, 2021

This had a bit of chatter about whether expanding the scope to all identifiers is the right call, so I’ll wait till @sandersn is back to chat about that

Otherwise, we’ll make the un-used import as used if it’s in the @link

1reaction
sandersncommented, Jun 15, 2021

After discussing this with @orta, we switched our opinions. Now I think that expanding the scope to all identifiers is the right call and he doesn’t. However: it would be difficult to decide on the precise semantics and difficult to implement efficiently, so I don’t think it’s worthwhile right now.

What should work is import references: import('./b').Model. I don’t think that @link even parses this reference right now.

Edit: @mjbvz beat me to it: #43950

Read more comments on GitHub >

github_iconTop Results From Across the Web

JSDoc3 does not generate hyperlinks to namespaces in NodeJS
I have found out my issue was related to the usage of JSDoc with CommonJS (NodeJS). After several hours of googling and trial...
Read more >
Documentation - ECMAScript Modules in Node.js - TypeScript
js ecosystem is built on a different module system called CommonJS (CJS). Interoperating between the two module systems brings large challenges, with many...
Read more >
Use JSDoc: {@link}
The {@link} inline tag creates a link to the namepath or URL that you specify. When you use the {@link} tag, you can...
Read more >
Declaration References - TypeDoc
Reference Scope. If no module source is specified, by default component paths are resolved relative to the scope where they are declared (note:...
Read more >
rollup.js
Importing CommonJS · Publishing ES Modules ... Do not follow symlinks when resolving files --no-sanitizeFileName Do not replace invalid characters in file ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found