fix: fixed TS 4.8 compatibility (#8601)

This commit is contained in:
Jeroen Claassens
2022-09-08 15:02:25 +02:00
committed by GitHub
parent 56177998c5
commit e6ee7d8374
3 changed files with 3112 additions and 3133 deletions

7
typings/index.d.ts vendored
View File

@@ -9,7 +9,6 @@ import {
hyperlink,
inlineCode,
italic,
JSONEncodable,
quote,
roleMention,
SlashCommandBuilder,
@@ -24,14 +23,11 @@ import {
import { Collection } from '@discordjs/collection';
import {
APIActionRowComponent,
APIActionRowComponentTypes,
APIApplicationCommand,
APIApplicationCommandInteractionData,
APIApplicationCommandOption,
APIApplicationCommandPermission,
APIAuditLogChange,
APIButtonComponent,
APIChannel,
APIEmbed,
APIEmoji,
APIInteractionDataResolvedChannel,
@@ -48,7 +44,6 @@ import {
APIRole,
APISelectMenuComponent,
APITemplateSerializedSourceGuild,
APITextInputComponent,
APIUser,
GatewayVoiceServerUpdateDispatchData,
GatewayVoiceStateUpdateDispatchData,
@@ -1632,6 +1627,8 @@ export class MessageActionRow<
? APIActionRowComponent<APIModalActionRowComponent>
: APIActionRowComponent<APIMessageActionRowComponent>,
> extends BaseMessageComponent {
// @ts-ignore (TS:2344, Caused by TypeScript 4.8)
// Fixed in DiscordJS >= 14.x / DiscordApiTypes >= 0.37.x, ignoring the type error here.
public constructor(data?: MessageActionRow<T> | MessageActionRowOptions<U> | V);
public type: 'ACTION_ROW';
public components: T[];