From b1a77045f1c4a7ef2a6150e740737c795bfc79c6 Mon Sep 17 00:00:00 2001 From: Almeida Date: Sat, 8 Aug 2026 22:25:38 +0100 Subject: [PATCH] types: fix `Client#pings` visibility and stale private declarations (#11597) - `Client#pings` is documented as public in the JSDoc, shows up on the documentation site, but was typed as `private` for some reason - rename `Client#packetQueue` to `incomingPacketQueue` since `packetQueue` doesn't exist - remove `ApplicationCommand.isAPICommandData`, which seemingly never actually existed at runtime --- packages/discord.js/typings/index.d.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 0472b2180..8847caa38 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -490,7 +490,6 @@ export class ApplicationCommand extends Base { ): boolean; private static transformOption(option: ApplicationCommandOptionData, received?: boolean): unknown; private static transformCommand(command: ApplicationCommandData): RESTPostAPIApplicationCommandsJSONBody; - private static isAPICommandData(command: object): command is RESTPostAPIApplicationCommandsJSONBody; } export class ApplicationRoleConnectionMetadata { @@ -941,9 +940,8 @@ export class Client public constructor(options: ClientOptions); private readonly actions: unknown; private readonly expectedGuilds: Set; - private readonly packetQueue: unknown[]; + private readonly incomingPacketQueue: unknown[]; private readonly presence: ClientPresence; - private readonly pings: Collection; private readonly readyTimeout: NodeJS.Timeout | null; private _broadcast(packet: GatewaySendPayload): void; private _eval(script: string): unknown; @@ -963,6 +961,7 @@ export class Client public lastPingTimestamps: ReadonlyCollection; public options: ClientOptions & { intents: IntentsBitField }; public get ping(): number | null; + public pings: ReadonlyCollection; public get readyAt(): If; public readyTimestamp: If; public rest: REST;