microsoft / microsoft/tsdoc

What's the proper way to use inheritDoc with a 3rd party module + path?

Open
#438 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5k
Forks
162
Avg merge
17h 24m
Merged PRs (30d)
8

Description

I tried looking at this file as a reference:

https://github.com/microsoft/tsdoc/blob/main/spec/code-snippets/DeclarationReferences.ts

And have the following code:

import type { WindowIDData } from "atop-sdk/resources/index.js";

/**
 * The window data containing window-specific information.
 */
export type WindowCreateData = WindowIDData;

I've tried:

/**
 * The window data containing window-specific information.
 * {@inheritDoc atop-sdk/resources/index.js#WindowIDData:interface}
 */
export type WindowCreateData = WindowIDData;

But that doesn't seem to be recognized by the parser I'm using (via docusaurus-plugin-typedoc which uses typedoc-plugin-markdown under the hood):

[warning] Declaration reference in @inheritDoc for WindowCreateData was not fully parsed and may resolve incorrectly
[warning] Failed to find "atop-sdk/resources/index.js#WindowIDData:interface" to inherit the comment from in the comment for WindowCreateData

May I ask what I am doing incorrectly? WindowIDData would be an interface. Not sure if it's a bug in the parser I'm using or if I'm not specifying the reference correctly.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading spec/code-snippets/DeclarationReferences.ts and comparing its declaration-reference syntax with the reference passed to @inheritDoc. Then inspect how docusaurus-plugin-typedoc and typedoc-plugin-markdown parse that reference; done means identifying the correct syntax or documenting that the parser cannot resolve this third-party module path.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.