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

Method thisReads

ark/aot/usage.ts:170–189  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

168 }
169
170 private get thisReads(): ThisReads {
171 if (this.reads) return this.reads
172 const reached = this.program.reached?.()
173 const modules =
174 reached?.modules ??
175 [...this.program.modules.values()].map(runtime => runtime.module)
176 const resolve =
177 reached?.resolve ??
178 ((specifier: string, importer: SourceModule) => {
179 const id = this.program.resolve(specifier, importer.id)
180 return id === undefined ? undefined : (
181 this.program.modules.get(id)?.module
182 )
183 })
184 return (this.reads = thisReadsOf(modules, {
185 entries: this.program.entries,
186 exposed: this.program.exposed,
187 resolve
188 }))
189 }
190
191 analyze(): void {
192 for (const runtime of this.program.modules.values()) this.link(runtime)

Callers

nothing calls this directly

Calls 4

thisReadsOfFunction · 0.85
mapMethod · 0.65
resolveMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected