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

Function getProgram

test/util.ts:219–228  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

217 protected hasProgram = false;
218 @memoize
219 public getProgram(): ts.Program {
220 this.hasProgram = true;
221
222 // Exclude lua files from TS program, but keep them in extraFiles so module resolution can find them
223 const nonLuaExtraFiles = Object.fromEntries(
224 Object.entries(this.extraFiles).filter(([fileName]) => !fileName.endsWith(".lua"))
225 );
226
227 return tstl.createVirtualProgram({ ...nonLuaExtraFiles, [this.mainFileName]: this.getTsCode() }, this.options);
228 }
229
230 private getEmitHost(): EmitHost {
231 return {

Callers

nothing calls this directly

Calls 2

entriesMethod · 0.65
getTsCodeMethod · 0.45

Tested by

no test coverage detected