(path: string)
| 1857 | } |
| 1858 | |
| 1859 | async getSubtasks(path: string): Promise<TaskInfo[]> { |
| 1860 | const task = await this.requireTask(path); |
| 1861 | const allTasks = await this.plugin.cacheManager.getAllTasks(); |
| 1862 | const subtasks: TaskInfo[] = []; |
| 1863 | |
| 1864 | for (const candidate of allTasks) { |
| 1865 | if (candidate.path === task.path) continue; |
| 1866 | for (const project of candidate.projects ?? []) { |
| 1867 | if (await this.taskReferenceMatches(project, candidate.path, task.path)) { |
| 1868 | subtasks.push(candidate); |
| 1869 | break; |
| 1870 | } |
| 1871 | } |
| 1872 | } |
| 1873 | |
| 1874 | return uniqueTasks(subtasks).map(copyTaskInfo); |
| 1875 | } |
| 1876 | |
| 1877 | async getTaskDependencies(path: string): Promise<ResolvedTaskDependency[]> { |
| 1878 | const task = await this.requireTask(path); |
no test coverage detected