diff --git a/imports/class/shared.lua b/imports/class/shared.lua index ec4f5fbb4..87816731b 100644 --- a/imports/class/shared.lua +++ b/imports/class/shared.lua @@ -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 @@ -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?