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.

Third-Party symbol not resolved in @link

See original GitHub issue

Search terms

link; link to third-party symbol; third-party symbol; will break in v0.24

Question

We generate API documentation for a library that heavily depends on a third-party library. In many comments, we refer to types of that third-party library using the link tag, e.g., {@link Session}.

When generating the documentation, for every link to the third-party library, we get an error like Failed to resolve {@link Session} in ... with declaration references. This link will break in v0.24. That makes sense since TypeDoc has no idea where to find the respective documentation site. We learned that we could write a custom TypeDoc plugin similar to the MDN link plugin for providing a mapping for our third-party symbols. But, it turned out that this only works for symbols referenced in code but not for symbols referenced in links via the @link tag.

Below an example. The MessageClient class references the third-party symbol Session both by link and in the constructor.

import {Session} from 'solclientjs';

/**
 * See {@link Session} for more information.  // will not be resolved
  */
export class MessageClient {

  constructor(session: Session) { // will be resolved if writing a custom TypeDoc plugin that adds a resolver for the unknown symbol `Session`
  }
}

Did we miss something?

Also, having to write a custom TypeDoc plugin for solely providing associations of third-party symbols to their documentation site seems very cumbersome. Isn’t there a way to configure the mappings directly in tsconfig.json under typedocOptions? That would be so straightforward, sort of like this. What do you think about it?

    "typedocOptions": {
      ... omitted
      "validation": {
        "invalidLink": true
      },
      "externalSymbolLinkMappings": { // something like this would be great to not have to write a custom TypeDoc plugin
        "solclientjs": {
          "Session": "https://docs.solace.com/API-Developer-Online-Ref-Documentation/js/solace.Session.html"
        }
      }
    }

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
danielwiehlcommented, Sep 2, 2022

These docs will be added to the website as well on release - but too late for that tonight, do you think this will meet your use case? https://github.com/TypeStrong/typedoc/blob/master/internal-docs/third-party-symbols.md#third-party-symbols

@Gerrit0 Great, this is precisely what we were looking for and will cover our use case. Thank you very much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

g++ does not link third-party libraries - Stack Overflow
When telling the compiler, g++, where the third-party library was, ... -symbolic -T script -Wl,option -Xlinker option -u symbol.
Read more >
Unresolved external symbol when linking to third party library
I'm trying to use AngelScript library with Unreal Engine. After following the tutorial here I'm stuck at linker error.
Read more >
Build Dynamic Library (.dll) with third-party lib: Error LNK2019 ...
Build Dynamic Library (.dll) with third-party lib: Error LNK2019 unresolved ... I found the reason why the cipher library cannot be linked.
Read more >
Manage third-party apps & services with access to your account
Report a third-party app or service · Go to the Apps with access to your account section of your Google Account. You might...
Read more >
Library Linking : undefined symbols? - Code Composer Studio ...
But when we needed a third party library that needs to be called from one of our sub-projects (b), it is not accessible...
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