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

Function getMainJsCodeChunk

test/util.ts:299–308  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

297
298 @memoize
299 public getMainJsCodeChunk(): string {
300 const { transpiledFiles } = this.getJsResult();
301 const code = transpiledFiles.find(({ sourceFiles }) =>
302 sourceFiles.some(f => f.fileName === this.mainFileName)
303 )?.js;
304 assert(code !== undefined);
305
306 const header = this.jsHeader ? `${this.jsHeader.trimRight()}\n` : "";
307 return header + code;
308 }
309
310 protected abstract getJsCodeWithWrapper(): string;
311

Callers

nothing calls this directly

Calls 1

assertFunction · 0.70

Tested by

no test coverage detected