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

Method constructor

src/LuaPrinter.ts:167–172  ·  view source on GitHub ↗
(private emitHost: EmitHost, private program: ts.Program, private sourceFile: string)

Source from the content-addressed store, hash-verified

165 public static readonly sourceMapTracebackPlaceholder = "{#SourceMapTraceback}";
166
167 constructor(private emitHost: EmitHost, private program: ts.Program, private sourceFile: string) {
168 this.options = program.getCompilerOptions();
169 this.luaFile = normalizeSlashes(getEmitPath(this.sourceFile, this.program));
170 // Source nodes contain relative path from mapped lua file to original TS source file
171 this.relativeSourcePath = normalizeSlashes(path.relative(path.dirname(this.luaFile), this.sourceFile));
172 }
173
174 public print(file: lua.File): PrintResult {
175 // Add traceback lualib if sourcemap traceback option is enabled

Callers

nothing calls this directly

Calls 2

normalizeSlashesFunction · 0.90
getEmitPathFunction · 0.90

Tested by

no test coverage detected