MCPcopy Create free account
hub / github.com/arktypeio/arktype / snapshot

Method snapshot

ark/aot/cache.ts:209–212  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

207 private snapshots: Record<string, Snapshot | undefined> = {}
208
209 snapshot(id: string): Snapshot | undefined {
210 if (!isHash(id)) return
211 return (this.snapshots[id] ??= this.read(`s-${id}`) as Snapshot | undefined)
212 }
213
214 // named by its content, so a build writing it again writes the same file
215 addSnapshot(snapshot: Snapshot): string {

Callers 1

holdsFromFunction · 0.80

Calls 2

readMethod · 0.95
isHashFunction · 0.85

Tested by

no test coverage detected