Skip to content

Instantly share code, notes, and snippets.

@7coil
Last active July 13, 2021 03:21
Show Gist options
  • Save 7coil/b0cd2757d569a78f693a4d1c7e6fe175 to your computer and use it in GitHub Desktop.
Save 7coil/b0cd2757d569a78f693a4d1c7e6fe175 to your computer and use it in GitHub Desktop.
test
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
local ____modules = {}
local ____moduleCache = {}
local ____originalRequire = require
local function require(file)
if ____moduleCache[file] then
return ____moduleCache[file]
end
if ____modules[file] then
____moduleCache[file] = ____modules[file]()
return ____moduleCache[file]
else
if ____originalRequire then
return ____originalRequire(file)
else
error("module '" .. file .. "' not found")
end
end
end
____modules = {
["index"] = function() --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
websocket, errorMessage = http.websocket("wss://echo.websocket.org/")
if websocket then
websocket.send("Hello!")
local message = websocket.receive()
print(message)
websocket.close()
else
error(errorMessage or "Unknown error.")
end
end,
}
return require("index")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment