mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-20 20:49:14 +00:00
add typings
This commit is contained in:
2
index.d.ts
vendored
2
index.d.ts
vendored
@@ -465,6 +465,8 @@ declare namespace WAWebJS {
|
|||||||
isForwarded: boolean,
|
isForwarded: boolean,
|
||||||
/** Location information contained in the message, if the message is type "location" */
|
/** Location information contained in the message, if the message is type "location" */
|
||||||
location: Location,
|
location: Location,
|
||||||
|
/** List of vCards contained in the message */
|
||||||
|
vCards: string[],
|
||||||
/** MediaKey that represents the sticker 'ID' */
|
/** MediaKey that represents the sticker 'ID' */
|
||||||
mediaKey?: string,
|
mediaKey?: string,
|
||||||
/** Indicates the mentions in the message body. */
|
/** Indicates the mentions in the message body. */
|
||||||
|
|||||||
@@ -118,10 +118,10 @@ class Message extends Base {
|
|||||||
this.location = data.type === MessageTypes.LOCATION ? new Location(data.lat, data.lng, data.loc) : undefined;
|
this.location = data.type === MessageTypes.LOCATION ? new Location(data.lat, data.lng, data.loc) : undefined;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of vcards contained in the message, if the message is a vcard or multiple vcards.
|
* List of vCards contained in the message.
|
||||||
* @type {Array<string>}
|
* @type {Array<string>}
|
||||||
*/
|
*/
|
||||||
this.vcards = data.type === MessageTypes.CONTACT_CARD_MULTI ? data.vcardList.map((c) => c.vcard) : data.type === MessageTypes.CONTACT_CARD ? [data.body] : [];
|
this.vCards = data.type === MessageTypes.CONTACT_CARD_MULTI ? data.vcardList.map((c) => c.vcard) : data.type === MessageTypes.CONTACT_CARD ? [data.body] : [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates the mentions in the message body.
|
* Indicates the mentions in the message body.
|
||||||
|
|||||||
Reference in New Issue
Block a user