Skip to content

Commit

Permalink
fix: lint?
Browse files Browse the repository at this point in the history
  • Loading branch information
jonalan7 committed Apr 6, 2023
1 parent 05df874 commit 46c6cae
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/api/layers/sender.layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ import { Message, SendFileResult, SendStickerResult } from '../model';
import { ChatState } from '../model/enum';
import { ListenerLayer } from './listener.layer';
import { Scope, checkValuesSender } from '../helpers/layers-interface';
import { Serializable } from 'puppeteer';


let obj: Scope;

Expand Down Expand Up @@ -111,7 +111,7 @@ export class SenderLayer extends ListenerLayer {
* @param to chat id: [email protected]
* @param content text message
*/
public async sendText(to: string, content: string, extra?: Serializable): Promise<Object> {
public async sendText(to: string, content: string, extra?: any): Promise<Object> {
if (!extra) extra = {};
return new Promise(async (resolve, reject) => {
const typeFunction = 'sendText';
Expand Down Expand Up @@ -1031,7 +1031,7 @@ export class SenderLayer extends ListenerLayer {
public async setChatState(chatId: string, chatState: ChatState) {
return await this.page.evaluate(
({ chatState, chatId }) => {
WAPI.sendChatstate(chatState, chatId);
return WAPI.sendChatstate(chatState, chatId);
},
{ chatState, chatId }
);
Expand Down
4 changes: 1 addition & 3 deletions src/controllers/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ export const getInterfaceStatus = async (
}
)
.then(async (element) => {
return await element.evaluate((a) => {
return a;
});

})
.catch((e) => e);
};
Expand Down
10 changes: 5 additions & 5 deletions src/types/WAPI.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ interface WAPI {
deleteConversation: (chatId: string) => boolean;
deleteMessagesAll: (
contactId: string,
messageId: string[],
messageId: string[] | string,
onlyLocal: boolean
) => Promise<object>;
deleteMessagesMe: (
contactId: string,
messageId: string[],
messageId: string[] | string,
onlyLocal: boolean
) => Promise<object>;
demoteParticipant: (groupId: string, contactId: string | string[]) => void;
Expand Down Expand Up @@ -174,10 +174,10 @@ interface WAPI {
removeParticipant: (groupId: string, contactId: string | string[]) => void;
reply: (to: string, content: string, quotedMsg: string) => Promise<object>;
restartService: () => boolean;
sendChatstate: (chatState: string, chatId: string) => void;
sendChatstate: (chatState: string | any, chatId: string) => void;
sendContactVcard: (
to: string,
contact: string,
contact: string | any,
name?: string
) => Promise<object>;
sendContactVcardList: (to: string, contacts: string[]) => Promise<object>;
Expand Down Expand Up @@ -243,7 +243,7 @@ interface WAPI {
sendButtons: (
to: string,
title: string,
buttons: [],
buttons: [] | any,
subtitle: string
) => Promise<Object>;
sendMessageWithThumb: (
Expand Down

0 comments on commit 46c6cae

Please sign in to comment.