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

Function getSourceDir

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

Source from the content-addressed store, hash-verified

213}
214
215export function getSourceDir(program: ts.Program): string {
216 const rootDir = program.getCompilerOptions().rootDir;
217 if (rootDir && rootDir.length > 0) {
218 return path.isAbsolute(rootDir) ? rootDir : path.resolve(getProjectRoot(program), rootDir);
219 }
220
221 // If no rootDir is given, source is relative to the project root
222 return getProjectRoot(program);
223}
224
225export function getEmitOutDir(program: ts.Program): string {
226 const outDir = program.getCompilerOptions().outDir;

Callers 4

paths.spec.tsFile · 0.90
couldNotResolveImportMethod · 0.90
getEmitPlanMethod · 0.85

Calls 2

getProjectRootFunction · 0.85
resolveMethod · 0.80

Tested by

no test coverage detected