From c13510e9070e21f8264b2c531ac09ea27aba2456 Mon Sep 17 00:00:00 2001 From: Pedro S Lopez Date: Mon, 5 Jan 2026 01:40:06 -0400 Subject: [PATCH] chore: fix jsdoc invalid types --- src/Client.js | 4 ++-- src/structures/Channel.js | 2 +- src/structures/Chat.js | 2 +- src/structures/Message.js | 2 +- src/util/Puppeteer.js | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Client.js b/src/Client.js index 6a67629..3a7b7cb 100644 --- a/src/Client.js +++ b/src/Client.js @@ -1258,7 +1258,7 @@ class Client extends EventEmitter { /** * Gets instances of all pinned messages in a chat * @param {string} chatId The chat ID - * @returns {Promise<[Message]|[]>} + * @returns {Promise>} */ async getPinnedMessages(chatId) { const pinnedMsgs = await this.pupPage.evaluate(async (chatId) => { @@ -1936,7 +1936,7 @@ class Client extends EventEmitter { * 2 for POPULAR channels * 3 for NEW channels * @param {number} [searchOptions.limit = 50] The limit of found channels to be appear in the returnig result - * @returns {Promise|[]>} Returns an array of Channel objects or an empty array if no channels were found + * @returns {Promise>} Returns an array of Channel objects or an empty array if no channels were found */ async searchChannels(searchOptions = {}) { return await this.pupPage.evaluate(async ({ diff --git a/src/structures/Channel.js b/src/structures/Channel.js index 6814c4a..f7ed110 100644 --- a/src/structures/Channel.js +++ b/src/structures/Channel.js @@ -97,7 +97,7 @@ class Channel extends Base { /** * Gets the subscribers of the channel (only those who are in your contact list) * @param {?number} limit Optional parameter to specify the limit of subscribers to retrieve - * @returns {Promise<{contact: Contact, role: string}[]>} Returns an array of objects that handle the subscribed contacts and their roles in the channel + * @returns {Promise>} Returns an array of objects that handle the subscribed contacts and their roles in the channel */ async getSubscribers(limit) { return await this.client.pupPage.evaluate(async (channelId, limit) => { diff --git a/src/structures/Chat.js b/src/structures/Chat.js index 7277e21..5769ff1 100644 --- a/src/structures/Chat.js +++ b/src/structures/Chat.js @@ -281,7 +281,7 @@ class Chat extends Base { /** * Gets instances of all pinned messages in a chat - * @returns {Promise<[Message]|[]>} + * @returns {Promise>} */ async getPinnedMessages() { return this.client.getPinnedMessages(this.id._serialized); diff --git a/src/structures/Message.js b/src/structures/Message.js index 0c57775..f563c1a 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -356,7 +356,7 @@ class Message extends Base { /** * Returns groups mentioned in this message - * @returns {Promise} + * @returns {Promise>} */ async getGroupMentions() { return await Promise.all(this.groupMentions.map(async (m) => await this.client.getChatById(m.groupJid._serialized))); diff --git a/src/util/Puppeteer.js b/src/util/Puppeteer.js index f6f2e43..fcb8448 100644 --- a/src/util/Puppeteer.js +++ b/src/util/Puppeteer.js @@ -4,9 +4,9 @@ * NOTE: * Rewrite it to 'upsertFunction' after updating Puppeteer to 20.6 or higher * using page.removeExposedFunction - * https://pptr.dev/api/puppeteer.page.removeExposedFunction + * https://pptr.dev/api/puppeteer.page.removeexposedfunction * - * @param {import(puppeteer).Page} page + * @param {object} page - Puppeteer Page instance * @param {string} name * @param {Function} fn */