Skip to content

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

Open

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.

Activity

  1. Gerrit0 commented on Mar 5, 2025

    @Gerrit0
    Contributor

    TypeDoc does not support the old style declaration references which you're trying to use there, docs

    What that link should be is dependent on a few things. Given that you're using it for inheritDoc, TypeDoc requires that your site also include documentation for that module. It won't just go retrieve docs from undocumented modules...

  2. theogravity commented on Mar 5, 2025

    @theogravity
    Author

    Do you mean the 3rd party type needs to be exported from the package I'm working on for it to be recognized?

  3. Gerrit0 commented on Mar 5, 2025

    @Gerrit0
    Contributor

    Yes, that's correct

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions