(s: string)
| 781 | } |
| 782 | |
| 783 | function parseRouteObjects(s: string): RouteItem[] { |
| 784 | const items: RouteItem[] = []; |
| 785 | for (const obj of splitTopLevelObjects(s)) { |
| 786 | const path = parseStringField(obj, 'path'); |
| 787 | const moduleName = parseIdentField(obj, 'module'); |
| 788 | const childrenStr = parseArrayField(obj, 'children'); |
| 789 | const children = childrenStr ? parseRouteObjects(childrenStr) : []; |
| 790 | items.push({ path, moduleName, children }); |
| 791 | } |
| 792 | return items; |
| 793 | } |
| 794 | |
| 795 | function walkRoutesTree( |
| 796 | items: RouteItem[], |
no test coverage detected