Hello!
I’m making a Color3 library which isn’t really important to know I suppose but I am getting this typechecking thing for my custom type, is it something I’ve overlooked?
Here’s the custom type:
type Color3Library = {
R: number;
G: number;
B: number;
__type: string
}
Here’s an example of how it’s set up:
__div = function(self, number : number | Color3 | Color3Library)
if type(number) == 'number' then
return funcs.new(
newColor.R / number,
newColor.G / number,
newColor.B / number
)
elseif typeof(number) == 'Color3' or number.__type == 'Color3Library' then
return funcs.new(
newColor.R / number.R,
newColor.G / number.G,
newColor.B / number.B
)
end
end;