( tasks: readonly TaskInfo[], propertyId: string, pathToProps: ReadonlyMap<string, Record<string, unknown>> )
| 115 | } |
| 116 | |
| 117 | export function groupTasksByTaskListSubProperty( |
| 118 | tasks: readonly TaskInfo[], |
| 119 | propertyId: string, |
| 120 | pathToProps: ReadonlyMap<string, Record<string, unknown>> |
| 121 | ): Map<string, TaskInfo[]> { |
| 122 | const subGroups = new Map<string, TaskInfo[]>(); |
| 123 | |
| 124 | for (const task of tasks) { |
| 125 | const props = pathToProps.get(task.path) || {}; |
| 126 | const subValue = getTaskListPropertyValue(props, propertyId); |
| 127 | const subKey = stringifyTaskListGroupValue(subValue); |
| 128 | const subTasks = subGroups.get(subKey) || []; |
| 129 | subTasks.push(task); |
| 130 | subGroups.set(subKey, subTasks); |
| 131 | } |
| 132 | |
| 133 | return subGroups; |
| 134 | } |
| 135 | |
| 136 | export function buildTaskListGroupedScopePaths( |
| 137 | groups: readonly TaskListGroup[], |
no test coverage detected