WatchStep
WatchStep = {
kind:"start";lastSeen:string;seen:Seen; } | {kind:"none"; } | {changed:Change[];kind:"wait";quietLeftMs:number; } | {changed:Change[];kind:"run";newest:string;seen:Seen; }
Defined in: ../src/watch.ts:32
What a watcher should do on this check.
Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ kind: "start"; lastSeen: string; seen: Seen; }
First check ever: start watching from now, so an old backlog isn’t replayed.
Type Literal
Section titled “Type Literal”{ kind: "none"; }
Nothing new since the last change handled.
Type Literal
Section titled “Type Literal”{ changed: Change[]; kind: "wait"; quietLeftMs: number; }
Something changed, but the newest change is too recent: check again later.
Type Literal
Section titled “Type Literal”{ changed: Change[]; kind: "run"; newest: string; seen: Seen; }
Act now; once the action is accepted, remember newest as lastSeen and seen with it.