MCPcopy Create free account
hub / github.com/codemix/graph / toStringTokens

Method toStringTokens

packages/graph/src/Steps.ts:4191–4214  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4189 }
4190
4191 public override toStringTokens(): StepStringToken[] {
4192 const tokens: StepStringToken[] = [
4193 { kind: "start" },
4194 { kind: "name", value: this.name },
4195 { kind: "config", value: { all: this.config.all } },
4196 ];
4197
4198 // Add tokens for each branch
4199 for (let i = 0; i < this.#branches.length; i++) {
4200 const branch = this.#branches[i]!;
4201 const branchTokens: StepStringToken[] = [];
4202 for (const step of branch) {
4203 branchTokens.push(...step.toStringTokens());
4204 }
4205 tokens.push({ kind: "steps", value: branchTokens });
4206 }
4207
4208 tokens.push(
4209 { kind: "stat", key: "traversed", value: this.traversed },
4210 { kind: "stat", key: "emitted", value: this.emitted },
4211 { kind: "end" },
4212 );
4213 return tokens;
4214 }
4215
4216 public override clone(partial?: Partial<QueryUnionStepConfig>) {
4217 const { config } = this;

Callers

nothing calls this directly

Calls 2

pushMethod · 0.45
toStringTokensMethod · 0.45

Tested by

no test coverage detected