Skip to content

Conversation

@zerebos
Copy link
Member

@zerebos zerebos commented Aug 29, 2025

This also modifies some of the files and apis to be more friendly to typedoc and make the generation better. However considering this includes changing some spots from plain objects to classes this should wait until after 1.13 to merge. It can still be used to generate accurate docs though.

Copy link
Contributor

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.

Pull Request Overview

This PR adds TypeDoc for API reference documentation generation and refactors multiple API modules from plain objects to classes to improve TypeDoc compatibility. The changes include adding TypeDoc annotations, converting object exports to class instances, and updating package.json with TypeDoc dependencies.

Key changes:

  • Converts API modules (Webpack, Utils, UI, ReactUtils, Net, ContextMenu) from plain objects to class instances
  • Adds comprehensive TypeDoc annotations including @hideconstructor, @group, @enum tags
  • Updates build scripts and adds TypeDoc-related dependencies

Reviewed Changes

Copilot reviewed 20 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/betterdiscord/ui/tooltip.ts Improves JSDoc comment for tooltip constructor
src/betterdiscord/ui/spinner.tsx Adds @enum annotation for SpinnerType
src/betterdiscord/ui/base/text.tsx Exports TextProps type and adds component documentation
src/betterdiscord/ui/base/flex.tsx Exports FlexProps type and adds component documentation
src/betterdiscord/ui/base/button.tsx Adds @enum annotations for button constants
src/betterdiscord/builtins/general/contextmenu.ts Fixes type reference in ContextMenu assignment
src/betterdiscord/api/webpack.ts Converts Webpack object to class with instance methods
src/betterdiscord/api/utils.ts Converts Utils object to class with instance properties
src/betterdiscord/api/ui.ts Converts UI object to class and improves type definitions
src/betterdiscord/api/reactutils.ts Converts ReactUtils object to class
src/betterdiscord/api/patcher.ts Removes redundant JSDoc comments
src/betterdiscord/api/net.ts Converts fetch function to Net class method
src/betterdiscord/api/logger.ts Removes redundant JSDoc comments
src/betterdiscord/api/index.ts Updates imports and API class structure
src/betterdiscord/api/dom.ts Updates JSDoc link syntax
src/betterdiscord/api/data.ts Changes @warning to @experimental tag
src/betterdiscord/api/contextmenu.ts Converts to class instance export
src/betterdiscord/api/commands.ts Removes redundant JSDoc comments
src/betterdiscord/api/addonapi.ts Adds @hideconstructor annotation
package.json Updates scripts and adds TypeDoc dependencies

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

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.

Pull request overview

Copilot reviewed 24 out of 27 changed files in this pull request and generated 2 comments.


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

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.

2 participants