Document parameters of Message.fromText/fromBinary

This commit is contained in:
Daniel Huigens 2021-02-28 00:35:47 +01:00
parent 174086a011
commit 2ba04d9f0a

View File

@ -628,10 +628,10 @@ export class Message {
/** /**
* Creates new message object from text. * Creates new message object from text.
* @param {String | ReadableStream<String>} text * @param {String | ReadableStream<String>} text - The message contents
* @param {String} [filename=""] * @param {String} [filename=""] - Name of the file (if any)
* @param {Date} [date=current date] * @param {Date} [date=current date] - Date of the message, or modification date of the file
* @param {utf8|binary|text|mime} [type] - Data packet type * @param {'utf8'|'binary'|'text'|'mime'} [type='utf8'] - Data packet type
* @returns {Message} New message object. * @returns {Message} New message object.
* @static * @static
*/ */
@ -655,10 +655,10 @@ export class Message {
/** /**
* Creates new message object from binary data. * Creates new message object from binary data.
* @param {Uint8Array | ReadableStream<Uint8Array>} bytes * @param {Uint8Array | ReadableStream<Uint8Array>} bytes - The message contents
* @param {String} [filename=""] * @param {String} [filename=""] - Name of the file (if any)
* @param {Date} [date=current date] * @param {Date} [date=current date] - Date of the message, or modification date of the file
* @param {utf8|binary|text|mime} [type] - Data packet type * @param {'utf8'|'binary'|'text'|'mime'} [type='binary'] - Data packet type
* @returns {Message} New message object. * @returns {Message} New message object.
* @static * @static
*/ */