* Creates a new node with updated comment (immutable) * 创建具有更新注释的新节点(不可变)
(comment: string | undefined)
| 232 | * 创建具有更新注释的新节点(不可变) |
| 233 | */ |
| 234 | setComment(comment: string | undefined): GraphNode { |
| 235 | const node = this.clone(); |
| 236 | node._comment = comment; |
| 237 | return node; |
| 238 | } |
| 239 | |
| 240 | /** |
| 241 | * Creates a new node with updated data (immutable) |