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

6232
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -56,7 +56,7 @@
"@sapphire/async-queue": "^1.5.0",
"@types/node-fetch": "^2.6.2",
"@types/ws": "^8.5.3",
"discord-api-types": "^0.33.3",
"discord-api-types": "^0.33.5",
"form-data": "^4.0.0",
"node-fetch": "^2.6.7",
"ws": "^8.8.1"
@@ -79,9 +79,9 @@
"jest": "^28.1.3",
"lint-staged": "^13.0.3",
"prettier": "^2.7.1",
"tsd": "^0.22.0",
"tsd": "^0.23.0",
"tslint": "^6.1.3",
"typescript": "^4.7.4"
"typescript": "^4.8.2"
},
"engines": {
"node": ">=16.6.0",

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[];