Skip to content

Commit 5c55169

Browse files
committed
docs(TaskRegistry): push method
1 parent 4e14b19 commit 5c55169

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/core/task/TaskRegistry.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ export class TaskRegistry {
1414
private stack: string[] = []
1515
private _currentTaskId: string | undefined
1616

17+
/**
18+
* Add a task and focus it. If the task ID already exists, remove the
19+
* existing entry first so this behaves as "move to top" instead of creating
20+
* duplicate stack entries.
21+
*/
1722
push(task: Task): void {
1823
if (this.tasks.has(task.taskId)) {
1924
this.remove(task.taskId)

0 commit comments

Comments
 (0)