MCPcopy Create free account
hub / github.com/ceifa/wasmoon / doFileSync

Method doFileSync

src/engine.ts:93–97  ·  view source on GitHub ↗

* Executes Lua code from a file synchronously. * @param filename - Path to the Lua script file. * @returns - The result returned by the Lua script.

(filename: string)

Source from the content-addressed store, hash-verified

91 * @returns - The result returned by the Lua script.
92 */
93 public doFileSync(filename: string): any {
94 this.global.loadFile(filename)
95 const result = this.global.runSync()
96 return result[0]
97 }
98
99 // WARNING: It will not wait for open handles and can potentially cause bugs if JS code tries to reference Lua after executed
100 private async callByteCode(loader: (thread: Thread) => void): Promise<any> {

Callers 1

luatests.jsFile · 0.80

Calls 2

loadFileMethod · 0.80
runSyncMethod · 0.80

Tested by

no test coverage detected