Repository: discordjs/discord.js
File: packages/core/src/api/interactions.ts (TypeScript)

Code before:
	/**
	 * Replies to an interaction
	 *
	 * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
	 * @param interactionId - The id of the interaction
	 * @param interactionToken - The token of the interaction
	 * @param body - The callback data for replying
	 * @param options - The options for replying
	 */
	public async reply(
		interactionId: Snowflake,
		interactionToken: string,
		body: APIInteractionResponseCallbackData &
			RESTPostAPIInteractionCallbackQuery & { files?: RawFile[]; with_response?: false },
		options?: Pick<RequestData, 'signal'>,
	): Promise<void>;

	/**
	 * Replies to an interaction
	 *
	 * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
	 * @param interactionId - The id of the interaction
	 * @param interactionToken - The token of the interaction
	 * @param body - The callback data for replying
	 * @param options - The options for replying
	 */
	public async reply(
		interactionId: Snowflake,
		interactionToken: string,
		{
			files,
			with_response,
			...data
		}: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & { files?: RawFile[] },
		{ signal }: Pick<RequestData, 'signal'> = {},
	) {
		return with_response
			? this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {
					query: makeURLSearchParams({ with_response }),
					files,
					auth: false,
					body: {
						type: InteractionResponseType.ChannelMessageWithSource,
						data,
					},
					signal,
				})
			: undefined;
	}

	/**

Review comment (suggestion):
Everywhere there is an overload for a method, you can remove any documentation on its implementation signature. For example, look at https://github.com/discordjs/discord.js/blob/main/packages/formatters/src/formatters.ts. It's because IntelliSense (and the website) will not pick it up any more.

Code after:
	/**
	 * Replies to an interaction
	 *
	 * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
	 * @param interactionId - The id of the interaction
	 * @param interactionToken - The token of the interaction
	 * @param body - The callback data for replying
	 * @param options - The options for replying
	 */
	public async reply(
		interactionId: Snowflake,
		interactionToken: string,
		body: APIInteractionResponseCallbackData &
			RESTPostAPIInteractionCallbackQuery & { files?: RawFile[]; with_response?: false },
		options?: Pick<RequestData, 'signal'>,
	): Promise<undefined>;

	public async reply(
		interactionId: Snowflake,
		interactionToken: string,
		{
			files,
			with_response,
			...data
		}: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & { files?: RawFile[] },
		{ signal }: Pick<RequestData, 'signal'> = {},
	) {
		const response = await this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {
			query: makeURLSearchParams({ with_response }),
			files,
			auth: false,
			body: {
				type: InteractionResponseType.ChannelMessageWithSource,
				data,
			},
			signal,
		});

		return with_response ? response : undefined;
	}

	/**
	 * Defers the reply to an interaction and returns an interaction callback object
	 *
	 * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
	 * @param interactionId - The id of the interaction
	 * @param interactionToken - The token of the interaction
	 * @param body - The callback data for deferring the reply
	 * @param options - The options for deferring
	 */
	public async defer(