This commit is contained in:
Eleanor Mao 2024-04-10 16:36:52 +08:00
parent 683f45d187
commit cd269b82b3

View File

@ -80,14 +80,14 @@ function drawState(eventState: Map<any, any>, state: State): string {
return sb;
}
function append(from, to, description) {
function append(from:any, to:any, description:any) {
if (isNotBlank(description)) {
description = ": " + description;
}
return `${from} ---> ${to}${description}\n`;
}
function wrapCond(cond) {
function wrapCond(cond:any) {
if (isNotBlank(cond)) {
return "(" + cond + ")";
} else {
@ -95,7 +95,7 @@ function wrapCond(cond) {
}
}
function drawTransitionCondition(eventCondition, transition) {
function drawTransitionCondition(eventCondition:any, transition:any) {
const list = [];
if (eventCondition !== undefined && eventCondition !== null) {
list.push(eventCondition);
@ -111,7 +111,7 @@ function drawTransitionCondition(eventCondition, transition) {
return list.join(" && ");
}
function drawExitCondition(eventCondition, exit) {
function drawExitCondition(eventCondition:any, exit:any) {
const list = [];
if (eventCondition !== undefined && eventCondition !== null) {
list.push(eventCondition);
@ -122,7 +122,7 @@ function drawExitCondition(eventCondition, exit) {
return list.join(" && ");
}
function drawStateLine(eventState, state) {
function drawStateLine(eventState:any, state:any) {
const handlers = state.eventHandlers;
if (isEmpty(handlers)) {
return;