import { TaskID , TaskIDPath } from "./taskCache" ; export interface Task { } export interface TaskCollection { } export type TaskRecord < T extends Task , TC extends TaskCollection > = { type : "task" ; value : T ; } | TaskCollectionRecord < TC > ; export type TaskCollectionRecord < TC extends TaskCollection > = { type : "collection" ; value : TC ; childIDs : Set < TaskID > ; } ; export interface TaskSourceSession < T extends Task , TC extends TaskCollection > { getTaskNodes < Paths extends TaskIDPath [ ] > ( paths ) : Promise < Map < Paths [ number ] , TaskRecord < T , TC > | null > > ; isCacheHit ( cacheRecord , testRecord ) : boolean ; } export interface TaskSource < T extends Task , TC extends TaskCollection > { performOperations ( continuation ) : Promise < unknown > ; }