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

Code before:
			signal,
		}) as Promise<RESTGetAPIChannelMessagesResult>;
	}

	/**
	 * Shows a typing indicator in a channel
	 *
	 * @see {@link https://discord.com/developers/docs/resources/channel#trigger-typing-indicator}
	 * @param channelId - The id of the channel to show the typing indicator in
	 * @param options - The options for showing the typing indicator
	 */
	public async showTyping(channelId: Snowflake, { auth, signal }: Pick<RequestData, 'auth' | 'signal'> = {}) {
		await this.rest.post(Routes.channelTyping(channelId), { auth, signal });
	}

	/**
	 * Fetches pinned messages of a channel
	 *
	 * @see {@link https://discord.com/developers/docs/resources/message#get-channel-pins}
	 * @param channelId - The id of the channel to fetch pinned messages from
	 * @param query - The query options for fetching pinned messages
	 * @param options - The options for fetching pinned messages
	 */
	public async getPins(
		channelId: Snowflake,
		query: RESTGetAPIChannelMessagesPinsQuery,
		{ auth, signal }: Pick<RequestData, 'auth' | 'signal'> = {},
	) {
		return this.rest.get(Routes.channelMessagesPins(channelId), {
			auth,
			query: makeURLSearchParams(query),
			signal,
		}) as Promise<RESTGetAPIChannelMessagesPinsResult>;
	}

	/**
	 * Pins a message in a channel
	 *
	 * @see {@link https://discord.com/developers/docs/resources/message#pin-message}
	 * @param channelId - The id of the channel to pin the message in
	 * @param messageId - The id of the message to pin
	 * @param options - The options for pinning the message
	 */
	public async pinMessage(
		channelId: Snowflake,
		messageId: Snowflake,
		{ auth, reason, signal }: Pick<RequestData, 'auth' | 'reason' | 'signal'> = {},
	) {
		await this.rest.put(Routes.channelMessagesPin(channelId, messageId), { auth, reason, signal });
	}


Review comment (suggestion):
```suggestion
		query: RESTGetAPIChannelMessagesPinsQuery = {},
```

Code after:
			signal,
		}) as Promise<RESTGetAPIChannelMessagesResult>;
	}

	/**
	 * Shows a typing indicator in a channel
	 *
	 * @see {@link https://discord.com/developers/docs/resources/channel#trigger-typing-indicator}
	 * @param channelId - The id of the channel to show the typing indicator in
	 * @param options - The options for showing the typing indicator
	 */
	public async showTyping(channelId: Snowflake, { auth, signal }: Pick<RequestData, 'auth' | 'signal'> = {}) {
		await this.rest.post(Routes.channelTyping(channelId), { auth, signal });
	}

	/**
	 * Fetches pinned messages of a channel
	 *
	 * @see {@link https://discord.com/developers/docs/resources/message#get-channel-pins}
	 * @param channelId - The id of the channel to fetch pinned messages from
	 * @param query - The query options for fetching pinned messages
	 * @param options - The options for fetching pinned messages
	 */
	public async getPins(
		channelId: Snowflake,
		query: RESTGetAPIChannelMessagesPinsQuery = {},
		{ auth, signal }: Pick<RequestData, 'auth' | 'signal'> = {},
	) {
		return this.rest.get(Routes.channelMessagesPins(channelId), {
			auth,
			query: makeURLSearchParams(query),
			signal,
		}) as Promise<RESTGetAPIChannelMessagesPinsResult>;
	}

	/**
	 * Pins a message in a channel
	 *
	 * @see {@link https://discord.com/developers/docs/resources/message#pin-message}
	 * @param channelId - The id of the channel to pin the message in
	 * @param messageId - The id of the message to pin
	 * @param options - The options for pinning the message
	 */
	public async pinMessage(
		channelId: Snowflake,
		messageId: Snowflake,
		{ auth, reason, signal }: Pick<RequestData, 'auth' | 'reason' | 'signal'> = {},
	) {
		await this.rest.put(Routes.channelMessagesPin(channelId, messageId), { auth, reason, signal });
	}