| 729 | } |
| 730 | |
| 731 | const configPathToString = (path: ReadonlyArray<KeyComponent>): ReadonlyArray<string> => { |
| 732 | const output: Array<string> = [] |
| 733 | let i = 0 |
| 734 | while (i < path.length) { |
| 735 | const component = path[i] |
| 736 | if (component._tag === "KeyName") { |
| 737 | if (i + 1 < path.length) { |
| 738 | const nextComponent = path[i + 1] |
| 739 | if (nextComponent._tag === "KeyIndex") { |
| 740 | output.push(`${component.name}[${nextComponent.index}]`) |
| 741 | i += 2 |
| 742 | } else { |
| 743 | output.push(component.name) |
| 744 | i += 1 |
| 745 | } |
| 746 | } else { |
| 747 | output.push(component.name) |
| 748 | i += 1 |
| 749 | } |
| 750 | } |
| 751 | } |
| 752 | return output |
| 753 | } |
| 754 | |
| 755 | const getIndexedEntries = ( |
| 756 | config: JsonMap |