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

Function sourceRootOf

ark/aot/declare.ts:285–296  ·  view source on GitHub ↗
(
	configPath: string,
	emitted: readonly { fileName: string }[],
	options: SourceRootOptions
)

Source from the content-addressed store, hash-verified

283}
284
285export const sourceRootOf = (
286 configPath: string,
287 emitted: readonly { fileName: string }[],
288 options: SourceRootOptions
289): string =>
290 options.rootDir ??
291 (options.composite ?
292 dirname(tsPath(configPath))
293 : commonDirOf(
294 emitted.map(file => dirname(tsPath(file.fileName))),
295 dirname(tsPath(configPath))
296 ))
297
298const emitDeclarationsJs = (
299 cwd: string,

Callers 2

openNativeFunction · 0.90
emitDeclarationsJsFunction · 0.85

Calls 3

commonDirOfFunction · 0.85
tsPathFunction · 0.70
mapMethod · 0.65

Tested by

no test coverage detected