From be3829232c061864767df8716dcbf61623c97951 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Sun, 3 Sep 2023 10:54:18 +0530 Subject: [PATCH] chore: Add JSDoc to apply in sequenceDB Co-authored-by: Alois Klink --- .../mermaid/src/diagrams/sequence/sequenceDb.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/mermaid/src/diagrams/sequence/sequenceDb.js b/packages/mermaid/src/diagrams/sequence/sequenceDb.js index 69a764a98e..5e593e8a50 100644 --- a/packages/mermaid/src/diagrams/sequence/sequenceDb.js +++ b/packages/mermaid/src/diagrams/sequence/sequenceDb.js @@ -452,6 +452,19 @@ export const getActorProperty = function (actor, key) { return undefined; }; +/** + * @typedef {object} AddMessageParams A message from one actor to another. + * @property {string} from - The id of the actor sending the message. + * @property {string} to - The id of the actor receiving the message. + * @property {string} msg - The message text. + * @property {number} signalType - The type of signal. + * @property {"addMessage"} type - Set to `"addMessage"` if this is an `AddMessageParams`. + * @property {boolean} [activate] - If `true`, this signal starts an activation. + */ + +/** + * @param {object | object[] | AddMessageParams} param - Object of parameters. + */ export const apply = function (param) { if (Array.isArray(param)) { param.forEach(function (item) {