MCPcopy Index your code
hub / github.com/TypeScriptToLua/TypeScriptToLua / getProjectRoot

Function getProjectRoot

src/transpilation/transpiler.ts:235–240  ·  view source on GitHub ↗
(program: ts.Program)

Source from the content-addressed store, hash-verified

233}
234
235export function getProjectRoot(program: ts.Program): string {
236 // Try to get the directory the tsconfig is in
237 const tsConfigPath = program.getCompilerOptions().configFilePath;
238 // If no tsconfig is known, use common source directory
239 return tsConfigPath ? path.dirname(tsConfigPath) : program.getCommonSourceDirectory();
240}

Callers 4

couldNotResolveImportMethod · 0.90
getBundleResultFunction · 0.90
getSourceDirFunction · 0.85
getEmitOutDirFunction · 0.85

Calls 1

Tested by

no test coverage detected