Skip to content

Commit

Permalink
chore: Add JSDoc to apply in sequenceDB
Browse files Browse the repository at this point in the history
Co-authored-by: Alois Klink <[email protected]>
  • Loading branch information
sidharthv96 and aloisklink committed Sep 3, 2023
1 parent 20fd6d3 commit be38292
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/mermaid/src/diagrams/sequence/sequenceDb.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit be38292

Please sign in to comment.