| 752 | } |
| 753 | |
| 754 | const configPathToString = (path: ReadonlyArray<KeyComponent>): ReadonlyArray<string> => { |
| 755 | const output: Array<string> = [] |
| 756 | let i = 0 |
| 757 | while (i < path.length) { |
| 758 | const component = path[i] |
| 759 | if (component._tag === "KeyName") { |
| 760 | if (i + 1 < path.length) { |
| 761 | const nextComponent = path[i + 1] |
| 762 | if (nextComponent._tag === "KeyIndex") { |
| 763 | output.push(`${component.name}[${nextComponent.index}]`) |
| 764 | i += 2 |
| 765 | } else { |
| 766 | output.push(component.name) |
| 767 | i += 1 |
| 768 | } |
| 769 | } else { |
| 770 | output.push(component.name) |
| 771 | i += 1 |
| 772 | } |
| 773 | } |
| 774 | } |
| 775 | return output |
| 776 | } |
| 777 | |
| 778 | const getIndexedEntries = ( |
| 779 | config: JsonMap |