import { immutable } from '../../decorators'; import { ExpressionNode, LOGIC_TYPE } from '../LogicItem'; /** * 打印日志 * @TODO: 当前类目前主要用于生成文档 */ export class CallConsoleLog extends ExpressionNode { /** * 逻辑节点类型 */ @immutable() public readonly type: LOGIC_TYPE = LOGIC_TYPE.CallConsoleLog; /** * 参数 */ @immutable() public readonly arguments: Array = []; /** * 生成 JS 脚本 */ toScript() { return `JSON.stringify(${this.arguments[0].toScript()})`; } }