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

Function createSiteState

ark/aot/interpreter.ts:320–343  ·  view source on GitHub ↗
(
	node: Node,
	module: SourceModule,
	{ readsLiterals = false }: { readsLiterals?: boolean } = {}
)

Source from the content-addressed store, hash-verified

318}
319
320export const createSiteState = (
321 node: Node,
322 module: SourceModule,
323 { readsLiterals = false }: { readsLiterals?: boolean } = {}
324): SiteState => ({
325 node,
326 module,
327 trace: emptyTrace(),
328 readsByValue: new Map(),
329 calls: [],
330 unavailableReads: [],
331 holes: [],
332 interpreted: new Set(),
333 requests: [],
334 arktypeArguments: [],
335 reached: [],
336 roots: [],
337 droppedNarrows: [],
338 introspection: undefined,
339 value: undefined,
340 error: undefined,
341 isEvaluated: false,
342 readsLiterals
343})
344
345export interface Context {
346 module: SourceModule

Callers 7

settleMethod · 0.90
typeEndOfMethod · 0.90
evaluateConfigurationMethod · 0.90
writeIntoMethod · 0.90
findSitesFunction · 0.90
filterSitesFunction · 0.90
interpretFunction · 0.90

Calls 1

emptyTraceFunction · 0.85

Tested by 1

interpretFunction · 0.72