File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 154154 end
155155 }
156156
157+ local type = type
158+ local getmetatable = getmetatable
159+ local function enhancedType (object )
160+ local typ = type (object )
161+
162+ if typ == " table" then
163+ local objectType = object .__type
164+ if objectType == " EnumValue" then
165+ local declaringClass = object ._declaringClass
166+ if declaringClass then
167+ typ = declaringClass .__name or typ
168+ end
169+ elseif objectType == " Enum" then
170+ typ = object .__name .. " #Template"
171+ elseif getmetatable (object ) == nil then -- This is an uninitialised class.
172+ typ = object .__name and (object .__name .. " #Template" ) or typ
173+ else
174+ typ = object .__name or typ
175+ end
176+ end
177+
178+ return typ
179+ end
180+
157181 baseEnvironment .__index = baseEnvironment
158182 setmetatable (baseEnvironment , {__index = _G })
159183
169193 __type = " Package" ,
170194 __isPackage = true ,
171195 _G = _G ,
196+ type = enhancedType ,
172197 pairs = pairs ,
173198 ipairs = ipairs
174199 }
You can’t perform that action at this time.
0 commit comments