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

Function store

ark/aot/driver.ts:856–866  ·  view source on GitHub ↗
(
	tracked: TrackedPrecompiler,
	cache: AnswerCache,
	key: string,
	answer: unknown
)

Source from the content-addressed store, hash-verified

854// an answer outlives the build where nothing but what it read and resolved
855// decided it
856const store = (
857 tracked: TrackedPrecompiler,
858 cache: AnswerCache,
859 key: string,
860 answer: unknown
861): boolean => {
862 const snapshot = snapshotOf(tracked, cache)
863 if (snapshot === undefined) return false
864 cache.set(key, answer, snapshot)
865 return true
866}
867
868// what an answer stored now names as what it read, if it can outlive the build
869const snapshotOf = (

Callers 3

answerFunction · 0.85
precompileFunction · 0.85
jsDeleteTransformMethod · 0.85

Calls 2

snapshotOfFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected