chore: fix jsdoc invalid types

This commit is contained in:
Pedro S Lopez 2026-01-05 01:40:06 -04:00
commit c13510e907
5 changed files with 7 additions and 7 deletions

View file

@ -1258,7 +1258,7 @@ class Client extends EventEmitter {
/** /**
* Gets instances of all pinned messages in a chat * Gets instances of all pinned messages in a chat
* @param {string} chatId The chat ID * @param {string} chatId The chat ID
* @returns {Promise<[Message]|[]>} * @returns {Promise<Array<Message>>}
*/ */
async getPinnedMessages(chatId) { async getPinnedMessages(chatId) {
const pinnedMsgs = await this.pupPage.evaluate(async (chatId) => { const pinnedMsgs = await this.pupPage.evaluate(async (chatId) => {
@ -1936,7 +1936,7 @@ class Client extends EventEmitter {
* 2 for POPULAR channels * 2 for POPULAR channels
* 3 for NEW channels * 3 for NEW channels
* @param {number} [searchOptions.limit = 50] The limit of found channels to be appear in the returnig result * @param {number} [searchOptions.limit = 50] The limit of found channels to be appear in the returnig result
* @returns {Promise<Array<Channel>|[]>} Returns an array of Channel objects or an empty array if no channels were found * @returns {Promise<Array<Channel>>} Returns an array of Channel objects or an empty array if no channels were found
*/ */
async searchChannels(searchOptions = {}) { async searchChannels(searchOptions = {}) {
return await this.pupPage.evaluate(async ({ return await this.pupPage.evaluate(async ({

View file

@ -97,7 +97,7 @@ class Channel extends Base {
/** /**
* Gets the subscribers of the channel (only those who are in your contact list) * 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 * @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<Array<{contact: Contact, role: string}>>} Returns an array of objects that handle the subscribed contacts and their roles in the channel
*/ */
async getSubscribers(limit) { async getSubscribers(limit) {
return await this.client.pupPage.evaluate(async (channelId, limit) => { return await this.client.pupPage.evaluate(async (channelId, limit) => {

View file

@ -281,7 +281,7 @@ class Chat extends Base {
/** /**
* Gets instances of all pinned messages in a chat * Gets instances of all pinned messages in a chat
* @returns {Promise<[Message]|[]>} * @returns {Promise<Array<Message>>}
*/ */
async getPinnedMessages() { async getPinnedMessages() {
return this.client.getPinnedMessages(this.id._serialized); return this.client.getPinnedMessages(this.id._serialized);

View file

@ -356,7 +356,7 @@ class Message extends Base {
/** /**
* Returns groups mentioned in this message * Returns groups mentioned in this message
* @returns {Promise<GroupChat[]|[]>} * @returns {Promise<Array<GroupChat>>}
*/ */
async getGroupMentions() { async getGroupMentions() {
return await Promise.all(this.groupMentions.map(async (m) => await this.client.getChatById(m.groupJid._serialized))); return await Promise.all(this.groupMentions.map(async (m) => await this.client.getChatById(m.groupJid._serialized)));

View file

@ -4,9 +4,9 @@
* NOTE: * NOTE:
* Rewrite it to 'upsertFunction' after updating Puppeteer to 20.6 or higher * Rewrite it to 'upsertFunction' after updating Puppeteer to 20.6 or higher
* using page.removeExposedFunction * 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 {string} name
* @param {Function} fn * @param {Function} fn
*/ */