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:
parent
4aae8b0f32
commit
303ea3ab6b
2 changed files with 20 additions and 6 deletions
4
index.d.ts
vendored
4
index.d.ts
vendored
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue