Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New site is missing some classes, types, etc... #9316

Closed
TetieWasTaken opened this issue Apr 2, 2023 · 3 comments
Closed

New site is missing some classes, types, etc... #9316

TetieWasTaken opened this issue Apr 2, 2023 · 3 comments

Comments

@TetieWasTaken
Copy link
Contributor

Which package is this bug report for?

discord.js

Issue description

As discovered in #9313, some things are missing from the new website. Is this intentional, or is there something wrong with the docgen?

Steps to reproduce:

  1. Head over to the old documentation @ https://old.discordjs.dev/#/docs/collection/main/class/Collection
  2. See typedefs
  3. See the new documentation @ https://discord.js.org/docs/packages/collection/main/
  4. Observe missing types (Comparator, CollectionConstructor, Keep)

Note: Make sure you have the new site loaded by doing a hard reset or clearing your cache

Other examples are: SelectMenuBuilder and JSONEncodable

Code sample

No response

Package version

Does not apply

Node.js version

Does not apply

Operating system

Chrome 111.0.5563.146

Priority this issue should have

Medium (should be fixed soon)

Which partials do you have configured?

Not applicable (subpackage bug)

Which gateway intents are you subscribing to?

Not applicable (subpackage bug)

I have tested this issue on a development release

No response

@kyranet
Copy link
Member

kyranet commented Apr 2, 2023

They're marked as @internal, which do not get exposed to the docs.

/**
* @internal
*/
export interface CollectionConstructor {
new (): Collection<unknown, unknown>;
new <K, V>(entries?: readonly (readonly [K, V])[] | null): Collection<K, V>;
new <K, V>(iterable: Iterable<readonly [K, V]>): Collection<K, V>;
readonly prototype: Collection<unknown, unknown>;
readonly [Symbol.species]: CollectionConstructor;
}

/**
* @internal
*/
export type Keep<V> = { keep: false } | { keep: true; value: V };
/**
* @internal
*/
export type Comparator<K, V> = (firstValue: V, secondValue: V, firstKey: K, secondKey: K) => number;

The old docs generator/website didn't honor that, so it's basically a bug that has been fixed, and thus, working as intended.

@kyranet kyranet closed this as not planned Won't fix, can't repro, duplicate, stale Apr 2, 2023
@TetieWasTaken
Copy link
Contributor Author

Why doesn't SelectMenuBuilder show up then? It's not marked as internal but also doesn't show up on https://discord.js.org/docs/packages/builders/main.

/**
* Represents a select menu component
*/
export class SelectMenuBuilder extends ComponentBuilder<APISelectMenuComponent> {

@Jiralite
Copy link
Member

Jiralite commented Apr 2, 2023

That commit you are viewing is from ~7 months ago.

Why does it show up on the old website still? That's because the documentation stopped generating for them long ago before the new builders. They became only generated for the new website.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants