mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
refactor(imports): assign modules directly to lib namespace
Mostly a change for improved intellisense with sumneko lua. Includes some type fixes and deprecation notices.
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
--[[
|
||||
This module was experimental and won't be worked on or used further.
|
||||
May be removed in the future.
|
||||
]]
|
||||
|
||||
local Core = {
|
||||
Ox = 'ox_core',
|
||||
QB = 'qb-core',
|
||||
ESX = 'es_extended',
|
||||
}
|
||||
|
||||
return function()
|
||||
---@deprecated
|
||||
function lib.getCore()
|
||||
local result
|
||||
|
||||
Citizen.CreateThreadNow(function()
|
||||
@@ -53,6 +59,7 @@ return function()
|
||||
if not success then error(result) end
|
||||
|
||||
if framework == Core.Ox then
|
||||
---@diagnostic disable-next-line: undefined-global
|
||||
result = Ox
|
||||
end
|
||||
|
||||
@@ -67,3 +74,5 @@ return function()
|
||||
|
||||
return result
|
||||
end
|
||||
|
||||
return lib.getCore
|
||||
|
||||
Reference in New Issue
Block a user