mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
chore: Add JSDoc to apply in sequenceDB
Co-authored-by: Alois Klink <alois@aloisklink.com>
This commit is contained in:
parent
20fd6d35f0
commit
be3829232c
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user