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

Function findConfig

ark/aot/declareNative.ts:143–149  ·  view source on GitHub ↗
(cwd: string)

Source from the content-addressed store, hash-verified

141 process.platform !== "win32" && process.platform !== "darwin"
142
143const findConfig = (cwd: string): string | undefined => {
144 for (let dir = cwd; ; dir = dirname(dir)) {
145 const path = join(dir, "tsconfig.json")
146 if (existsSync(path)) return path
147 if (dirname(dir) === dir) return
148 }
149}
150
151type Node = tsgoAst.Node
152type SourceFile = tsgoAst.SourceFile

Callers 1

openNativeFunction · 0.85

Calls 1

joinFunction · 0.85

Tested by

no test coverage detected