Skip to content

Fix TypeDoc warnings for referenced but unexported types#1344

Merged
neet merged 2 commits into
mainfrom
copilot/fix-typedoc-documentation-issue
Oct 31, 2025
Merged

Fix TypeDoc warnings for referenced but unexported types#1344
neet merged 2 commits into
mainfrom
copilot/fix-typedoc-documentation-issue

Conversation

Copilot AI commented Oct 31, 2025

Copy link
Copy Markdown
Contributor

TypeDoc generated 47 warnings, with 31 "referenced but not included in the documentation" warnings for internal types like BaseCreateTokenParams, BaseEvent, AccountWarning, etc. These types were used by exported APIs but not documented.

Changes

  • Added typedoc-plugin-missing-exports to automatically include referenced internal types in documentation
  • Configured excludeExternals: true to filter out Node.js built-in types

tsconfig.json:

"typedocOptions": {
  "plugin": ["typedoc-plugin-missing-exports"],
  "excludeExternals": true
}

Result

  • Warnings reduced from 47 to 17
  • 61 internal types now documented under <internal> module
  • All referenced types accessible in generated docs

Internal type documentation example

Note

The issue mentioned --treatWarningsAsErrors working in TypeDoc 0.26.11, but this flag causes build failures in 0.28.14. The plugin approach is the proper solution for this version.

Original prompt

This section details on the original issue you should resolve

<issue_title>typedoc: referenced files "not included in the documentation"</issue_title>
<issue_description>A lot of files don't get included in the document generation by typedoc.

📦[nabil@npm masto.js]$ npm run docs:build

> masto@6.10.1 docs:build
> typedoc ./src/index.ts && touch ./docs/.nojekyll

./src/mastodon/rest/v1/featured-tag-repository.ts:15:5 - [warning] Encountered an unknown block tag @done

15       * @done

[warning] The signature mastodon.rest.v1.AccountRepository.$select.__type.follow has an @param with name "id", which was not used
[warning] The signature mastodon.rest.v1.AccountRepository.$select.__type.unfollow has an @param with name "id", which was not used
[warning] The signature mastodon.rest.v1.AccountRepository.$select.__type.note.__type.create has an @param with name "id", which was not used
[warning] The signature mastodon.rest.v1.AccountRepository.$select.__type.note.__type.create has an @param with name "param", which was not used
[warning] The signature mastodon.rest.v1.DomainBlockRepository.create has an @param with name "domain", which was not used
[warning] The signature mastodon.rest.v1.DomainBlockRepository.remove has an @param with name "domain", which was not used
[warning] The signature mastodon.rest.v1.ListRepository.$select.__type.remove has an @param with name "id", which was not used
[warning] The signature mastodon.rest.v1.ListRepository.$select.__type.accounts.__type.list has an @param with name "id", which was not used
[warning] The signature mastodon.rest.v1.ListRepository.$select.__type.accounts.__type.create has an @param with name "id", which was not used
[warning] The signature mastodon.rest.v1.ListRepository.$select.__type.accounts.__type.remove has an @param with name "id", which was not used
[warning] The signature mastodon.rest.v1.MediaAttachmentRepository.$select.__type.fetch has an @param with name "id", which was not used
[warning] The signature mastodon.rest.v1.MediaAttachmentRepository.$select.__type.update has an @param with name "id", which was not used
[warning] The signature mastodon.rest.v1.TimelineRepository.tag.__type.$select.__type.list has an @param with name "hashtag", which was not used
[warning] The signature mastodon.rest.v1.TimelineRepository.list.__type.$select.__type.list has an @param with name "id", which was not used
[warning] The signature mastodon.rest.v2.FilterRepository.$select.__type.keywords.__type.create has an @param with name "id", which was not used
[warning] BaseCreateTokenParams, defined in ./src/mastodon/oauth/token-repository.ts, is referenced by mastodon.oauth.CreateTokenWithClientCredentialsParams but not included in the documentation
[warning] BaseEvent, defined in ./src/mastodon/streaming/event.ts, is referenced by mastodon.streaming.AnnouncementDeleteEvent but not included in the documentation
[warning] BaseNotificationWithReport, defined in ./src/mastodon/entities/v1/notification.ts, is referenced by mastodon.v1.AdminReportNotification but not included in the documentation
[warning] NotificationGroupWithReport, defined in ./src/mastodon/entities/v1/grouped-notifications.ts, is referenced by mastodon.v1.AdminReportNotificationGroup but not included in the documentation
[warning] BaseNotificationPlain, defined in ./src/mastodon/entities/v1/notification.ts, is referenced by mastodon.v1.AdminSignUpNotification but not included in the documentation
[warning] NotificationGroupPlain, defined in ./src/mastodon/entities/v1/grouped-notifications.ts, is referenced by mastodon.v1.AdminSignUpNotificationGroup but not included in the documentation
[warning] BaseNotificationWithStatus, defined in ./src/mastodon/entities/v1/notification.ts, is referenced by mastodon.v1.FavouriteNotification but not included in the documentation
[warning] NotificationGroupWithStatusId, defined in ./src/mastodon/entities/v1/grouped-notifications.ts, is referenced by mastodon.v1.FavouriteNotificationGroup but not included in the documentation
[warning] NotificationGroupWithModerationWarning, defined in ./src/mastodon/entities/v1/grouped-notifications.ts, is referenced by mastodon.v1.ModerationWarningNotificationGroup but not included in the documentation
[warning] NotificationGroupWithEvent, defined in ./src/mastodon/entities/v1/grouped-notifications.ts, is referenced by mastodon.v1.SeveredRelationshipsNotificationGroup but not included in the documentation
[warning] MastoHttpConfigProps, defined in ./src/adapters/config/http-config.ts, is referenced by createOAuthAPIClient.props but not included in the documentation
[warning] LogConfigProps, defined in ./src/adapters/clients.ts, is referenced by createOAuthAPIClient.props but not included in the documentation
[warning] WebSocketConfigProps, defined in ./src/adapters/config/web-socket-config.ts, is referenced by createStreamingAPIClient.props but not included in the documentati...

</details>

- Fixes neet/masto.js#1241

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

Copilot AI self-assigned this Oct 31, 2025
@github-actions

github-actions Bot commented Oct 31, 2025

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
rest 3.84 KB (0%)
streaming 3.84 KB (0%)
oauth 3.84 KB (0%)

@pkg-pr-new

pkg-pr-new Bot commented Oct 31, 2025

Copy link
d06c14a_ " data-view-component="true" class="dropdown-item btn-link"> Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/neet/masto.js/masto@1344

commit: d06c14a

Co-authored-by: neet <19276905+neet@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix referenced files not included in typedoc documentation Fix TypeDoc warnings for referenced but unexported types Oct 31, 2025
Copilot AI requested a review from neet October 31, 2025 02:00
@neet neet marked this pull request as ready for review October 31, 2025 02:06
Copilot AI review requested due to automatic review settings October 31, 2025 02:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds the typedoc-plugin-missing-exports plugin to the project's TypeDoc configuration to improve documentation coverage by including missing exports.

  • Added typedoc-plugin-missing-exports package as a dev dependency
  • Configured the plugin in tsconfig.json TypeDoc options
  • Added excludeExternals option to prevent external dependencies from being documented

Reviewed Changes

Copilot reviewed 1 out of 3 changed files in this pull request and generated no comments.

File Description
package.json Added typedoc-plugin-missing-exports v4.1.2 as a dev dependency
package-lock.json Lockfile update for the new plugin dependency with peer dependency on typedoc ^0.28.1
tsconfig.json Added plugin configuration and excludeExternals option to TypeDoc settings

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@neet neet merged commit 4a89223 into main Oct 31, 2025
17 checks passed
@neet neet deleted the copilot/fix-typedoc-documentation-issue branch October 31, 2025 02:07
@neet neet mentioned this pull request Oct 31, 2025
@neet

neet commented Oct 31, 2025

Copy link
Copy Markdown
Owner

Closes #1241

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants