( structure: SpecStructure, range: ByteRange, keepPathItem: KeepPathItem | undefined, )
| 746 | * identically wherever a structure is walked more than once, so per-operation |
| 747 | * indexes stay aligned across passes. */ |
| 748 | const parseKeptPathItem = ( |
| 749 | structure: SpecStructure, |
| 750 | range: ByteRange, |
| 751 | keepPathItem: KeepPathItem | undefined, |
| 752 | ): readonly [string, PathItemObject] | null => { |
| 753 | const entry = parseEntry(structure.text, range, 2); |
| 754 | if (!entry) return null; |
| 755 | const [path, rawValue] = entry; |
| 756 | if (!isPathItemValue(rawValue)) return null; |
| 757 | if (!keepPathItem) return [path, rawValue as PathItemObject]; |
| 758 | const kept = keepPathItem(path, rawValue); |
| 759 | return kept ? [path, kept as PathItemObject] : null; |
| 760 | }; |
| 761 | |
| 762 | /** |
| 763 | * Stream invocation bindings straight from a `SpecStructure` (the structural |
no test coverage detected