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

Function getLuaResult

test/util.ts:242–255  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

240
241 @memoize
242 public getLuaResult(): tstl.TranspileVirtualProjectResult {
243 const program = this.getProgram();
244 const preEmitDiagnostics = ts.getPreEmitDiagnostics(program);
245 const collector = createEmitOutputCollector(this.options.extension);
246 const { diagnostics: transpileDiagnostics } = new tstl.Transpiler({ emitHost: this.getEmitHost() }).emit({
247 program,
248 customTransformers: this.customTransformers,
249 writeFile: collector.writeFile,
250 });
251
252 const diagnostics = ts.sortAndDeduplicateDiagnostics([...preEmitDiagnostics, ...transpileDiagnostics]);
253
254 return { diagnostics: [...diagnostics], transpiledFiles: collector.files };
255 }
256
257 @memoize
258 public getMainLuaFileResult(): ExecutableTranspiledFile {

Callers

nothing calls this directly

Calls 2

emitMethod · 0.80

Tested by

no test coverage detected