Search terms
- @link
- link
- cross-file links
Expected Behavior
Provide a way to give users a good experience via linking both when using the package in IDE vs scanning the TypeDoc.
Actual Behavior
I want to provide links to types that make sense to use for various types. I want this to improve developer experience both for TypeDoc and when using the package itself via VSCode's inline documentation. We should be able to use them together without importing everything directly.
HOWEVER, this is impossible:
- In TypeDoc you CAN NOT use an imported variable which is in scope to link
{@link enums.OrderTypes}
- In VSCode you MUST use an imported variable which is in scope to link
{@link enums.OrderTypes}
So TypeDoc would REQUIRE {@link OrderTypes} and it will try to find things directly instead of realizing I imported enums and I am referring to the OrderTypes on the enums import.
Using {@link enums.OrderTypes}
import type * as enums from '../enums';
export interface Random {
/**
* @see enum {@link enums.OrderTypes}
* @see type {@link enums.OrderType}
*/
type: enums.OrderType;
}
When Using VSCode Documentation

What TypeDoc Generates

Using {@link OrderTypes}
import type * as enums from '../enums';
export interface Random {
/**
* @see enum {@link OrderTypes}
* @see type {@link OrderType}
*/
type: enums.OrderType;
}
When Using VSCode Documentation

What TypeDoc Generates

What is notable here is that it obviously understands this kind of linking... because I am using enums.OrderType for the type itself and typedoc links to it flawlessly in that situation.
Steps to reproduce the bug
- Import a module as namespace
- Try to link to it so both VSCode and TypeDoc work
- importing direct without the import type * also doesn't work but that shouldn't matter regardless
- Direct import instead of namespace importing not really acceptable when you have thousands of links and many of them are not used in that specific file anywhere but are being linked for developer convenience
Environment
- Typedoc version: "typedoc": "^0.23.24",
- TypeScript version:"typescript": "4.9.4"
- Node.js version: 18
- OS: 13.1
Search terms
Expected Behavior
Provide a way to give users a good experience via linking both when using the package in IDE vs scanning the TypeDoc.
Actual Behavior
I want to provide links to types that make sense to use for various types. I want this to improve developer experience both for
TypeDocand when using the package itself via VSCode's inline documentation. We should be able to use them together without importing everything directly.HOWEVER, this is impossible:
{@link enums.OrderTypes}{@link enums.OrderTypes}So TypeDoc would REQUIRE
{@link OrderTypes}and it will try to find things directly instead of realizing I importedenumsand I am referring to the OrderTypes on theenumsimport.Using
{@link enums.OrderTypes}When Using VSCode Documentation
What TypeDoc Generates
Using
{@link OrderTypes}When Using VSCode Documentation
What TypeDoc Generates
Steps to reproduce the bug
Environment