Skip to content

Commit

Permalink
refactor(class): disable experimental warning for internal modules
Browse files Browse the repository at this point in the history
This warning is only important for 3rd party users.
  • Loading branch information
thelindat committed Jun 1, 2024
1 parent 09ba323 commit 54b7701
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions imports/class/shared.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
---@diagnostic disable: invisible
lib.print.warn('ox_lib\'s class module is experimental and may break without warning.')
local getinfo = debug.getinfo

if not getinfo(1, 'S').source:match('^@@ox_lib') then
lib.print.warn('ox_lib\'s class module is experimental and may break without warning.')
end

---Ensure the given argument or property has a valid type, otherwise throwing an error.
---@param id number | string
Expand Down Expand Up @@ -31,7 +35,6 @@ end
---@field protected constructor? OxClassConstructor
local mixins = {}
local constructors = {}
local getinfo = debug.getinfo

---Somewhat hacky way to remove the constructor from the class.__index.
---Maybe add static fields in the future?
Expand Down

0 comments on commit 54b7701

Please sign in to comment.