Skip to content

Commit

Permalink
refactor(init): move global declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
thelindat committed Oct 14, 2024
1 parent 24b2d62 commit 4596e43
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,6 @@ local lib = setmetatable({
__call = call,
})

_ENV.lib = lib

-- Override standard Lua require with our own.
require = lib.require

local intervals = {}
--- Dream of a world where this PR gets accepted.
---@param callback function | number
Expand Down Expand Up @@ -215,7 +210,9 @@ function lib.onCache(key, cb)
table.insert(cacheEvents[key], cb)
end

_ENV.lib = lib
_ENV.cache = cache
_ENV.require = lib.require

local notifyEvent = ('__ox_notify_%s'):format(cache.resource)

Expand Down

0 comments on commit 4596e43

Please sign in to comment.