5uphi
(5uphi)
November 23, 2025, 12:19pm
358
while the new type engine is no longer in beta its still very buggy
if i export a type that uses typeof
export type myType = typeof(workspace.SpawnLocation)
and then try to clone that instance it gives the error:
Type Error: Type 'SpawnLocation' from 'DataModel' could not be converted into 'SpawnLocation' from 'DataModel'
how to reproduce:
enable the new type solver
[{3B511926-FC77-407F-9C80-610074197D5B}]
create a modulescript
export type myType = typeof(workspace.SpawnLocation)
return {}
create a script
local module = require(game.ServerStora…
if i use typeof then make a clone and try to set the parent to any type other then the type of the original parent a error is given
local sl: typeof(workspace.SpawnLocation) = workspace.SpawnLocation:Clone()
sl.Parent = game.ServerStorage
[{B85CEAC3-CE85-4D44-A8E9-6BFC615A60BE}]
Expected behavior
when using typeof it should use the type of the property in this case Instance
[{5FBF035F-4D40-436F-8B0E-97D9311FB0F4}]
not the type of the current set value
if i set a variable to type any then if i use a if check then try to set a index of that variable i get a error
[{AE77F4F4-6F65-4479-8ACE-3EA9339CE203}]
local myTable: any = nil
myTable[1] = true -- works fine without the if check
if myTable then
myTable[1] = true -- error if i use a if check
end
Expected behavior
if i do a if check the type should not change to *error-type* | ~(false?)
it should stay as any or any | ~(false?)
unable to have a table of functions that accepts any type as its parameter
[{009F122E-6351-40F2-8AC9-605F5E8E38BE}]
local functions: {[any]: (any) -> ()} = {}
functions.func1 = function(value: string) end
functions.func2 = function(value: boolean) end
functions.func3 = function(value: number) end
functions.func4 = function(value: any) end
Expected behavior
(string) -> () should be able to convert into (any) -> ()
or any other type like numbers booleans etc..
but ill look into it and see if I’m able to resolve the problems but i don’t want to make changes just to bypass type engine bugs i think we might need to wait a bit more for the new type engine to mature a bit more
5 Likes