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

Function usedMembersOf

ark/aot/usage.ts:117–126  ·  view source on GitHub ↗
(program: UsageProgram)

Source from the content-addressed store, hash-verified

115
116// the members some read needs, or why the program may read anything
117export const usedMembersOf = (program: UsageProgram): ProgramUse | string => {
118 const analysis = new UsageAnalysis(program)
119 try {
120 analysis.analyze()
121 } catch (e) {
122 if (e instanceof Escape) return e.reason
123 throw e
124 }
125 return { used: analysis.used, handedOff: analysis.handedOff }
126}
127
128class Escape {
129 reason: string

Callers 1

usedInMethod · 0.90

Calls 1

analyzeMethod · 0.95

Tested by

no test coverage detected