Last active
July 13, 2021 03:21
-
-
Save 7coil/b0cd2757d569a78f693a4d1c7e6fe175 to your computer and use it in GitHub Desktop.
test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ 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