mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 17:55:37 +02:00
Consistently use square brackets for optional parameters in JSDoc comments
Square brackets are recommended to indicate optional parameters. Using them helps for automatically generating correct documentation.
This commit is contained in:
parent
efd331daa1
commit
f4daafc077
21 changed files with 136 additions and 138 deletions
|
@ -134,7 +134,7 @@ MessageHandler.prototype = {
|
|||
* Sends a message to the comObj to invoke the action with the supplied data.
|
||||
* @param {string} actionName - Action to call.
|
||||
* @param {JSON} data - JSON data to send.
|
||||
* @param {Array} [transfers] - Optional list of transfers/ArrayBuffers
|
||||
* @param {Array} [transfers] - List of transfers/ArrayBuffers.
|
||||
*/
|
||||
send(actionName, data, transfers) {
|
||||
this.postMessage({
|
||||
|
@ -149,7 +149,7 @@ MessageHandler.prototype = {
|
|||
* Expects that the other side will callback with the response.
|
||||
* @param {string} actionName - Action to call.
|
||||
* @param {JSON} data - JSON data to send.
|
||||
* @param {Array} [transfers] - Optional list of transfers/ArrayBuffers.
|
||||
* @param {Array} [transfers] - List of transfers/ArrayBuffers.
|
||||
* @returns {Promise} Promise to be resolved with response data.
|
||||
*/
|
||||
sendWithPromise(actionName, data, transfers) {
|
||||
|
@ -174,9 +174,9 @@ MessageHandler.prototype = {
|
|||
* Expect that the other side will callback to signal 'start_complete'.
|
||||
* @param {string} actionName - Action to call.
|
||||
* @param {JSON} data - JSON data to send.
|
||||
* @param {Object} queueingStrategy - strategy to signal backpressure based on
|
||||
* @param {Object} queueingStrategy - Strategy to signal backpressure based on
|
||||
* internal queue.
|
||||
* @param {Array} [transfers] - Optional list of transfers/ArrayBuffers.
|
||||
* @param {Array} [transfers] - List of transfers/ArrayBuffers.
|
||||
* @return {ReadableStream} ReadableStream to read data in chunks.
|
||||
*/
|
||||
sendWithStream(actionName, data, queueingStrategy, transfers) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue