Skip to content

Ability to define a converter for JSDocNamepathType #2947

Closed
@pomek

Description

@pomek

Search Terms

  • JSDocNamepathType

Problem

The problem I described touches the 0.28 branch. However, to give you some context, I'd like to share a brief story.

In CKEditor 5, we render API pages based on output produced by typedoc. We wrote a custom plugin for handling the @error tag, so the following code (block comment) - https://github.com/ckeditor/ckeditor5/blob/dcb0b8c936c197acf215a96153350d0a4ce83834/packages/ckeditor5-core/src/accessibility.ts#L331-L339 - can be displayed on our error codes page.

Recently, we started migrating from version 0.23. x to the latest (0.28.3 at the moment of writing this). The documentation is based on the older version so far.

While processing the project, typedoc prints a few warnings that look like this:

./packages/ckeditor5-core/src/accessibility.ts:338:14 - [warning] Failed to convert type node with kind: JSDocNamepathType and text module:core/accessibility~AddKeystrokeInfosData#keystrokes. Please report a bug.

338                      * @param {module:core/accessibility~AddKeystrokeInfosData#keystrokes} keystrokes Keystroke definitions about to be added.

Even when the warning appears, I can translate the {module:...} part to a link because I know how to map a module between brackets.

Image

☝ This is a screenshot of my local build using the latest typedoc package and the plugin I share below.

There is a logic responsible for converting parameters from the @param annotation for error codes: https://github.com/ckeditor/ckeditor5-dev/blob/4f1a3acfd3b79c634b9b5b147c54ce922b61bfc7/packages/typedoc-plugins/src/tag-error/index.ts#L133-L158

I would like to request the addition of an option to define a converter for resolving the JSDocNamepathType kind. Or, at least, to mute the warnings, because in my case, they are false positives.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions