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

Method addFile

ark/aot/declare.ts:150–160  ·  view source on GitHub ↗
(fileName: string, content: string)

Source from the content-addressed store, hash-verified

148 }
149
150 addFile(fileName: string, content: string): void {
151 const key = canonicalConfigPath(fileName, this.cwd)
152 this.files.set(key, content)
153 let dir = dirname(key)
154 while (dir && !this.dirs.has(dir)) {
155 this.dirs.add(dir)
156 const parent = dirname(dir)
157 if (parent === dir) break
158 dir = parent
159 }
160 }
161
162 add(emittedFiles: Record<string, string>): void {
163 for (const fileName in emittedFiles)

Callers 2

addMethod · 0.95
addOverlayForProjectFunction · 0.80

Calls 4

canonicalConfigPathFunction · 0.85
setMethod · 0.45
hasMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected