MCPcopy Create free account
hub / github.com/esengine/esengine / updateData

Method updateData

packages/node-editor/src/domain/models/GraphNode.ts:244–248  ·  view source on GitHub ↗

* Creates a new node with updated data (immutable) * 创建具有更新数据的新节点(不可变)

(data: Record<string, unknown>)

Source from the content-addressed store, hash-verified

242 * 创建具有更新数据的新节点(不可变)
243 */
244 updateData(data: Record<string, unknown>): GraphNode {
245 const node = this.clone();
246 node._data = { ...node._data, ...data };
247 return node;
248 }
249
250 private clone(): GraphNode {
251 const cloned = Object.create(GraphNode.prototype) as GraphNode;

Callers 1

NodeEditorFunction · 0.45

Calls 1

cloneMethod · 0.95

Tested by

no test coverage detected