MCPcopy Create free account
hub / github.com/backnotprop/plannotator / record

Function record

packages/editor/sourceDocumentReconciliation.test.ts:24–39  ·  view source on GitHub ↗
(source = sourceSave('sha256:after'), text = 'after\n')

Source from the content-addressed store, hash-verified

22}
23
24function record(source = sourceSave('sha256:after'), text = 'after\n'): OpenSourceDocumentRecord {
25 return {
26 key: 'file:/repo/docs/a.md',
27 path: source.path,
28 basename: source.basename,
29 sourceSave: source,
30 sessionOpenText: text,
31 sessionOpenHash: source.hash,
32 diskBaseline: text,
33 currentText: text,
34 editMountText: text,
35 saveStatus: 'clean',
36 lastKnownHash: source.hash,
37 lastKnownMtimeMs: source.mtimeMs,
38 };
39}
40
41function deferred<T>(): { promise: Promise<T>; resolve: (value: T) => void } {
42 let resolve!: (value: T) => void;

Calls 1

sourceSaveFunction · 0.70

Tested by

no test coverage detected