fix types and docs for Buttons class (#1070)

* fix: typing of buttons class

* fix remaining types

Co-authored-by: Pedro Lopez <pedroslopez@me.com>
This commit is contained in:
Noam Zaks 2022-02-07 02:56:57 +02:00 • committed by GitHub
commit 303ea3ab6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 6 deletions

4
index.d.ts vendored
View file

@ -1211,11 +1211,11 @@ declare namespace WAWebJS {
/** Message type buttons */
export class Buttons {
body: string | MessageMedia
buttons: Array<Array<string>>
buttons: Array<{ buttonId: string; buttonText: {displayText: string}; type: number }>
title?: string | null
footer?: string | null
constructor(body: string, buttons: Array<Array<string>>, title?: string | null, footer?: string | null)
constructor(body: string, buttons: Array<{ id?: string; body: string }>, title?: string | null, footer?: string | null)
}
}