mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 04:53:30 +01:00
fix: fixed TS 4.8 compatibility (#8601)
This commit is contained in:
6232
package-lock.json
generated
6232
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -56,7 +56,7 @@
|
|||||||
"@sapphire/async-queue": "^1.5.0",
|
"@sapphire/async-queue": "^1.5.0",
|
||||||
"@types/node-fetch": "^2.6.2",
|
"@types/node-fetch": "^2.6.2",
|
||||||
"@types/ws": "^8.5.3",
|
"@types/ws": "^8.5.3",
|
||||||
"discord-api-types": "^0.33.3",
|
"discord-api-types": "^0.33.5",
|
||||||
"form-data": "^4.0.0",
|
"form-data": "^4.0.0",
|
||||||
"node-fetch": "^2.6.7",
|
"node-fetch": "^2.6.7",
|
||||||
"ws": "^8.8.1"
|
"ws": "^8.8.1"
|
||||||
@@ -79,9 +79,9 @@
|
|||||||
"jest": "^28.1.3",
|
"jest": "^28.1.3",
|
||||||
"lint-staged": "^13.0.3",
|
"lint-staged": "^13.0.3",
|
||||||
"prettier": "^2.7.1",
|
"prettier": "^2.7.1",
|
||||||
"tsd": "^0.22.0",
|
"tsd": "^0.23.0",
|
||||||
"tslint": "^6.1.3",
|
"tslint": "^6.1.3",
|
||||||
"typescript": "^4.7.4"
|
"typescript": "^4.8.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16.6.0",
|
"node": ">=16.6.0",
|
||||||
|
|||||||
7
typings/index.d.ts
vendored
7
typings/index.d.ts
vendored
@@ -9,7 +9,6 @@ import {
|
|||||||
hyperlink,
|
hyperlink,
|
||||||
inlineCode,
|
inlineCode,
|
||||||
italic,
|
italic,
|
||||||
JSONEncodable,
|
|
||||||
quote,
|
quote,
|
||||||
roleMention,
|
roleMention,
|
||||||
SlashCommandBuilder,
|
SlashCommandBuilder,
|
||||||
@@ -24,14 +23,11 @@ import {
|
|||||||
import { Collection } from '@discordjs/collection';
|
import { Collection } from '@discordjs/collection';
|
||||||
import {
|
import {
|
||||||
APIActionRowComponent,
|
APIActionRowComponent,
|
||||||
APIActionRowComponentTypes,
|
|
||||||
APIApplicationCommand,
|
|
||||||
APIApplicationCommandInteractionData,
|
APIApplicationCommandInteractionData,
|
||||||
APIApplicationCommandOption,
|
APIApplicationCommandOption,
|
||||||
APIApplicationCommandPermission,
|
APIApplicationCommandPermission,
|
||||||
APIAuditLogChange,
|
APIAuditLogChange,
|
||||||
APIButtonComponent,
|
APIButtonComponent,
|
||||||
APIChannel,
|
|
||||||
APIEmbed,
|
APIEmbed,
|
||||||
APIEmoji,
|
APIEmoji,
|
||||||
APIInteractionDataResolvedChannel,
|
APIInteractionDataResolvedChannel,
|
||||||
@@ -48,7 +44,6 @@ import {
|
|||||||
APIRole,
|
APIRole,
|
||||||
APISelectMenuComponent,
|
APISelectMenuComponent,
|
||||||
APITemplateSerializedSourceGuild,
|
APITemplateSerializedSourceGuild,
|
||||||
APITextInputComponent,
|
|
||||||
APIUser,
|
APIUser,
|
||||||
GatewayVoiceServerUpdateDispatchData,
|
GatewayVoiceServerUpdateDispatchData,
|
||||||
GatewayVoiceStateUpdateDispatchData,
|
GatewayVoiceStateUpdateDispatchData,
|
||||||
@@ -1632,6 +1627,8 @@ export class MessageActionRow<
|
|||||||
? APIActionRowComponent<APIModalActionRowComponent>
|
? APIActionRowComponent<APIModalActionRowComponent>
|
||||||
: APIActionRowComponent<APIMessageActionRowComponent>,
|
: APIActionRowComponent<APIMessageActionRowComponent>,
|
||||||
> extends BaseMessageComponent {
|
> 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 constructor(data?: MessageActionRow<T> | MessageActionRowOptions<U> | V);
|
||||||
public type: 'ACTION_ROW';
|
public type: 'ACTION_ROW';
|
||||||
public components: T[];
|
public components: T[];
|
||||||
|
|||||||
Reference in New Issue
Block a user