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

Method clone

packages/graph/src/Steps.ts:5352–5363  ·  view source on GitHub ↗
(partial?: Partial<ShortestPathStepConfig>)

Source from the content-addressed store, hash-verified

5350 }
5351
5352 public override clone(partial?: Partial<ShortestPathStepConfig>) {
5353 const { config } = this;
5354 return new ShortestPathStep({
5355 targetId: partial?.targetId ?? config.targetId,
5356 targetCondition: partial?.targetCondition ?? config.targetCondition,
5357 direction: partial?.direction ?? config.direction,
5358 edgeLabels: partial?.edgeLabels ?? config.edgeLabels,
5359 maxDepth: partial?.maxDepth ?? config.maxDepth,
5360 weightProperty: partial?.weightProperty ?? config.weightProperty,
5361 stepLabels: partial?.stepLabels ?? (config.stepLabels ? [...config.stepLabels] : undefined),
5362 });
5363 }
5364
5365 public override toStringTokens(): readonly StepStringToken[] {
5366 const { targetId, targetCondition, stepLabels, ...config } = this.config;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected