Do you know how Instance.new(“RandomClassName”) returns Object and…
Probably wondering how the object autocompletes regardless of where you put the object.
Types for vaild entries
Return Object Types
I found a method while learning type checking,
A lot of my scripter friends say you would to manually type out a types module library, require that everywhere you code, and assign the types like:
local VarName : VarType = ObjectCreationFunctionName("ClassName")
This method works but is annoying
(Remember this isn’t done in --!strict)
The Object are sorted by what conditions is needed to be insert for the function, to give what corresponding result
Because the value function type Barrack given argument matches with “Barrack” it returns it’s function type return type, to object the function returned!
and if you want that class types autocomplete make sure you assign the given arguments a type like 43