refactor(init): export cache and update intervals

BREAKING CHANGE: lib will store cached export functions and no longer uses the : syntax to call functions.

Allow SetInterval to return arguments to the callback function.
This commit is contained in:
Linden
2021-12-27 11:10:05 +11:00
parent 6b3af6f0d9
commit d0c5f722db
4 changed files with 65 additions and 45 deletions

View File

@@ -1,9 +1,9 @@
-- Creates exports from values assigned to lib
-- Hacky workaround for Lua Language Server support
--- Alias for `exports['pe-lualib']`
lib = setmetatable({}, {
__newindex = function(self, name, fn)
__newindex = function(_, name, fn)
exports(name, fn)
end
})