(
source: GraphSource<any>,
input: Iterable<unknown>,
_context?: QueryContext,
)
| 3860 | } |
| 3861 | |
| 3862 | public *traverse( |
| 3863 | source: GraphSource<any>, |
| 3864 | input: Iterable<unknown>, |
| 3865 | _context?: QueryContext, |
| 3866 | ): IterableIterator<unknown> { |
| 3867 | const seen = new Set<unknown>(); |
| 3868 | for (const item of input) { |
| 3869 | this.traversed++; |
| 3870 | // Handle both TraversalPath and raw values |
| 3871 | const value = item instanceof TraversalPath ? item.value : item; |
| 3872 | const key = this.#getDeduplicationKey(value); |
| 3873 | if (!seen.has(key)) { |
| 3874 | seen.add(key); |
| 3875 | this.emitted++; |
| 3876 | yield item; |
| 3877 | } |
| 3878 | } |
| 3879 | } |
| 3880 | |
| 3881 | /** |
| 3882 | * Generate a deduplication key for a value. |
nothing calls this directly
no test coverage detected