Skip to content

Update api reference to use typedoc#53

Open
TheLazySquid wants to merge 8 commits into
BetterDiscord:mainfrom
TheLazySquid:typedoc
Open

Update api reference to use typedoc#53
TheLazySquid wants to merge 8 commits into
BetterDiscord:mainfrom
TheLazySquid:typedoc

Conversation

@TheLazySquid
Copy link
Copy Markdown
Contributor

@TheLazySquid TheLazySquid commented May 19, 2026

This PR updates the api reference to be directly generated by typedoc, so it can stay up to date more easily. This is alongside this pull request to BD core which changes the structure to be more typedoc friendly. Notable changes from the old docs:

  • The "Api" link goes to /api/BdApi
  • Sidebar is manually created to prevent an overwhelming number of things
    • Types that aren't directly on BdApi are unlisted, but can be accessed via links
  • All types are directly under /api/ rather than /api/classes/ or whatever
  • Boundable apis have been split up into a bound and non-bound version so the signature is readable
  • Things like ReactUtils and Webpack have been converted into classes so they get documented better
image

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the documentation setup by integrating TypeDoc and its markdown plugin to automate API reference generation. It includes updates to the VitePress configuration for a more dynamic sidebar and introduces a large set of generated markdown files covering the BetterDiscord API. The reviewer identified several areas for improvement, including the removal of commented-out code in the configuration and fixing systemic issues in the generated documentation, such as redundant type definitions, exposed internal implementation details, and formatting inconsistencies in the JSDoc-derived sections.

Comment thread .vitepress/config.ts Outdated
Comment thread docs/api/BdApi.md Outdated
Comment thread docs/api/BdApi.md Outdated
Comment thread docs/api/Utils.md Outdated
Comment thread .vitepress/config.ts Outdated
Comment thread .vitepress/config.ts Outdated
Comment thread .vitepress/config.ts Outdated
Comment thread .gitignore Outdated
Comment thread scripts/apigen.ts Outdated
@zerebos zerebos requested a review from Copilot May 20, 2026 05:20
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@@ -0,0 +1,17 @@
# Overview
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is this duplicated here? Does the autogen overwrite index.md and then you have to re-overwrite with this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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