mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 02:53:31 +01:00
build: Upgrade dependencies and pnpm (#11420)
* build: upgrade dependencies * build: upgrade pnpm * test: fix voice * build: regenerate file * fix: reports by ESLint * fix: docs errors * build: downgrades * build: no upstream bump * build: discord-api-types 0.38.40 * build: pnpm 10.30.1 * fix: ignore @typescript-eslint/no-duplicate-type-constituents * fix: jsdoc lint in api-extractor * build: update template for ESLint Co-authored-by: Almeida <github@almeidx.dev> * chore: explicit TODO Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com> * chore: revert typings lint change --------- Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com> Co-authored-by: Almeida <github@almeidx.dev>
This commit is contained in:
@@ -201,6 +201,7 @@ export function createComponentBuilder(
|
||||
return data;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
|
||||
switch (data.type) {
|
||||
case ComponentType.ActionRow:
|
||||
return new ActionRowBuilder(data);
|
||||
@@ -237,7 +238,7 @@ export function createComponentBuilder(
|
||||
case ComponentType.FileUpload:
|
||||
return new FileUploadBuilder(data);
|
||||
default:
|
||||
// @ts-expect-error This case can still occur if we get a newer unsupported component type
|
||||
// TODO: add back @ts-expect-error This case can still occur if we get a newer unsupported component type
|
||||
throw new Error(`Cannot properly serialize component type: ${data.type}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,6 +70,7 @@ export class LabelBuilder extends ComponentBuilder<APILabelComponent> {
|
||||
|
||||
this.data = {
|
||||
...structuredClone(rest),
|
||||
// @ts-expect-error Upcoming components update.
|
||||
component: component ? createComponentBuilder(component) : undefined,
|
||||
type: ComponentType.Label,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user