MCPcopy Create free account
hub / github.com/Marus/cortex-debug / pvtSerialize

Method pvtSerialize

src/frontend/views/live-watch.ts:308–324  ·  view source on GitHub ↗
(state: NodeState | undefined)

Source from the content-addressed store, hash-verified

306 }
307
308 private pvtSerialize(state: NodeState | undefined): NodeState {
309 const item: NodeState = {
310 name: this.name,
311 expr: this.expr,
312 expanded: this.expanded || !this.parent,
313 children: []
314 };
315 if (!state) {
316 state = item;
317 } else {
318 state.children.push(item);
319 }
320 for (const child of this.children ?? []) {
321 child.pvtSerialize(item);
322 }
323 return item;
324 }
325
326 public serialize(): NodeState {
327 return this.pvtSerialize(undefined);

Callers 1

serializeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected