Issue Type: Other
Impact: Moderate
Frequency: Constantly
Date First Experienced: 2021-05-07 17:05:00 (-07:00)
Date Last Experienced: 2021-05-10 11:05:00 (-07:00)
Reproduction Steps:
- Try to write a function and type it so that it should return a RBXScriptSignal and then try to return an instance of RBXScriptSignal.
- Try to write a table of type
x
where said type requires a field of RBXScriptSignal. - Try to bind a RBXScriptSignal to a variable of type
RBXScriptSignal.
The source is here:
--!strict
type foo = {
mySignal: RBXScriptSignal
}
function createNewFoo(): foo
local newFoo = {};
local fooEvent = Instance.new("BindableEvent");
newFoo.mySignal = fooEvent.Event;
return newFoo;
end
local foobar: {RBXScriptSignal} = {
Instance.new("BindableEvent").Event;
}
local x: RBXScriptSignal = Instance.new("BindableEvent").Event;
Expected Behavior:
I expect the checker to not throw a fit and say that it can’t convert RBXScriptSignal to a RBXScriptSignal.
Actual Behavior:
This happens.
Workaround:
The solution is actually do this:
type RBXScriptSignal = typeof(Instance.new("BindableEvent").Event);
and tag it somewhere at the top of your script. Doing so gives you a beautiful, underline-less environment like so: