83 lines
2.2 KiB
Lua
83 lines
2.2 KiB
Lua
--[[ 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].value
|
|
end
|
|
if ____modules[file] then
|
|
local module = ____modules[file]
|
|
local value = nil
|
|
if (select("#", ...) > 0) then value = module(...) else value = module(file) end
|
|
____moduleCache[file] = { value = value }
|
|
return value
|
|
else
|
|
if ____originalRequire then
|
|
return ____originalRequire(file)
|
|
else
|
|
error("module '" .. file .. "' not found")
|
|
end
|
|
end
|
|
end
|
|
____modules = {
|
|
["lualib_bundle"] = function(...)
|
|
local function __TS__Class(self)
|
|
local c = {prototype = {}}
|
|
c.prototype.__index = c.prototype
|
|
c.prototype.constructor = c
|
|
return c
|
|
end
|
|
|
|
return {
|
|
__TS__Class = __TS__Class
|
|
}
|
|
end,
|
|
["src.computercraft"] = function(...)
|
|
local ____lualib = require("lualib_bundle")
|
|
local __TS__Class = ____lualib.__TS__Class
|
|
local ____exports = {}
|
|
____exports.Peripheral = __TS__Class()
|
|
local Peripheral = ____exports.Peripheral
|
|
Peripheral.name = "Peripheral"
|
|
function Peripheral.prototype.____constructor(self)
|
|
end
|
|
function Peripheral.find(self, ty, filter)
|
|
return peripheral.find(ty, filter)
|
|
end
|
|
function Peripheral.findOne(self, ty, filter)
|
|
local p, _a, _b, _c = table.unpack(____exports.Peripheral:find(ty, filter))
|
|
return p
|
|
end
|
|
return ____exports
|
|
end,
|
|
["src.index"] = function(...)
|
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
local ____exports = {}
|
|
local ____basalt = require("src.basalt")
|
|
local basalt = ____basalt.default
|
|
local ____computercraft = require("src.computercraft")
|
|
local Peripheral = ____computercraft.Peripheral
|
|
local function main(self)
|
|
local d = table.unpack(Peripheral:findOne("monitor"))
|
|
local main = basalt.addMonitor()
|
|
main:setMonitor(d)
|
|
main:addLabel():setText("uwu")
|
|
main:addButton():setText("meow")
|
|
basalt.autoUpdate()
|
|
end
|
|
main(nil)
|
|
return ____exports
|
|
end,
|
|
["src.basalt"] = function(...)
|
|
|
|
local basalt = ____originalRequire("basalt");
|
|
|
|
return {
|
|
default = basalt;
|
|
}
|
|
end,
|
|
}
|
|
return require("src.index", ...)
|