( structure: SpecStructure, range: ByteRange, keepPathItem: KeepPathItem | undefined, )
| 822 | * identically wherever a structure is walked more than once, so per-operation |
| 823 | * indexes stay aligned across passes. */ |
| 824 | const parseKeptPathItem = ( |
| 825 | structure: SpecStructure, |
| 826 | range: ByteRange, |
| 827 | keepPathItem: KeepPathItem | undefined, |
| 828 | ): readonly [string, PathItemObject] | null => { |
| 829 | const entry = parseEntry(structure.text, range, 2); |
| 830 | if (!entry) return null; |
| 831 | const [path, rawValue] = entry; |
| 832 | if (!isPathItemValue(rawValue)) return null; |
| 833 | if (!keepPathItem) return [path, rawValue as PathItemObject]; |
| 834 | const kept = keepPathItem(path, rawValue); |
| 835 | return kept ? [path, kept as PathItemObject] : null; |
| 836 | }; |
| 837 | |
| 838 | /** |
| 839 | * Stream invocation bindings straight from a `SpecStructure` (the structural |
no test coverage detected