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

Function getEmitHost

test/util.ts:230–239  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

228 }
229
230 private getEmitHost(): EmitHost {
231 return {
232 fileExists: (path: string) => normalizeSlashes(path) in this.extraFiles,
233 directoryExists: (path: string) =>
234 Object.keys(this.extraFiles).some(f => f.startsWith(normalizeSlashes(path))),
235 getCurrentDirectory: () => ".",
236 readFile: (path: string) => this.extraFiles[normalizeSlashes(path)] ?? ts.sys.readFile(path),
237 writeFile() {},
238 };
239 }
240
241 @memoize
242 public getLuaResult(): tstl.TranspileVirtualProjectResult {

Callers

nothing calls this directly

Calls 3

normalizeSlashesFunction · 0.90
readFileMethod · 0.80
keysMethod · 0.65

Tested by

no test coverage detected