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

Code before:
		interactionToken: string,
		callbackData: CreateModalResponseOptions & { with_response?: false },
		options?: Pick<RequestData, 'signal'>,
	): Promise<undefined>;

	public async createModal(
		interactionId: Snowflake,
		interactionToken: string,
		{ with_response, ...data }: CreateModalResponseOptions,
		{ signal }: Pick<RequestData, 'signal'> = {},
	) {
		const response = await this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {
			query: makeURLSearchParams({ with_response }),
			auth: false,
			body: {
				type: InteractionResponseType.Modal,
				data,
			},
			signal,
		});

		return with_response ? response : undefined;
	}

	/**
	 * Launches activity 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 launching the activity
	 * @param options - The options for launching the activity
	 */
	public async launchActivity(
		interactionId: Snowflake,
		interactionToken: string,
		body?: RESTPostAPIInteractionCallbackQuery & { with_response: true },
		options?: Pick<RequestData, 'signal'>,
	): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;

	/**
	 * Launches activity
	 *
	 * @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 launching the activity
	 * @param options - The options for launching the activity
	 */
	public async launchActivity(
		interactionId: Snowflake,

Review comment (suggestion):
```suggestion
	 * Launches an activity and returns an interaction callback object
```

Code after:
	): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;

	/**
	 * Sends an autocomplete response 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 callbackData - The callback data for the autocomplete response
	 * @param options - The options for sending the autocomplete response
	 */
	public async createAutocompleteResponse(
		interactionId: Snowflake,
		interactionToken: string,
		callbackData: CreateAutocompleteResponseOptions & { with_response?: false },
		options?: Pick<RequestData, 'signal'>,
	): Promise<undefined>;

	/**
	 * Sends an autocomplete response 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 callbackData - The callback data for the autocomplete response
	 * @param options - The options for sending the autocomplete response
	 */
	public async createAutocompleteResponse(
		interactionId: Snowflake,
		interactionToken: string,
		callbackData: CreateAutocompleteResponseOptions,
		options?: Pick<RequestData, 'signal'>,
	): Promise<RESTPostAPIInteractionCallbackWithResponseResult | undefined>;

	public async createAutocompleteResponse(
		interactionId: Snowflake,
		interactionToken: string,
		{ with_response, ...data }: CreateAutocompleteResponseOptions,
		{ signal }: Pick<RequestData, 'signal'> = {},
	) {
		const response = await this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {
			query: makeURLSearchParams({ with_response }),
			auth: false,
			body: {
				type: InteractionResponseType.ApplicationCommandAutocompleteResult,
				data,
			},
			signal,
		});

		return with_response ? response : undefined;