(
_source: GraphSource<any>,
input: Iterable<TraversalPath<any, any, any>>,
_context?: QueryContext,
)
| 557 | } |
| 558 | |
| 559 | public *traverse( |
| 560 | _source: GraphSource<any>, |
| 561 | input: Iterable<TraversalPath<any, any, any>>, |
| 562 | _context?: QueryContext, |
| 563 | ): IterableIterator<TraversalPath<any, any, any>> { |
| 564 | // Check if there's already valid TraversalPath input - if so, pass it through |
| 565 | let hasValidInput = false; |
| 566 | for (const path of input) { |
| 567 | // Only yield actual TraversalPath instances, not undefined or other values |
| 568 | if (path instanceof TraversalPath) { |
| 569 | hasValidInput = true; |
| 570 | this.traversed++; |
| 571 | this.emitted++; |
| 572 | yield path; |
| 573 | } |
| 574 | } |
| 575 | |
| 576 | // If no valid input was provided, yield a single empty path to start the traversal |
| 577 | if (!hasValidInput) { |
| 578 | this.traversed++; |
| 579 | this.emitted++; |
| 580 | yield new TraversalPath(undefined, undefined, []); |
| 581 | } |
| 582 | } |
| 583 | |
| 584 | public override clone(partial?: Partial<StartStepConfig>) { |
| 585 | return new StartStep({ |
nothing calls this directly
no outgoing calls
no test coverage detected