Vide 0.4.0 from Wally
Trying to get a source with a nullable value results in a type error, like this:
local someText = Vide.source(nil :: string?)
print(someText()) -- TypeError: Calling function (() -> string?) & ((string?) -> string?) with argument pack () is ambiguous.
someText("afjwirinefirwiuwefui")
if someText() then -- TypeError: Calling function (() -> string?) & ((string?) -> string?) with argument pack () is ambiguous.
print(someText()) -- TypeError: Calling function (() -> string?) & ((string?) -> string?) with argument pack () is ambiguous.
end
This requires explicit casting to silent out the error:
print((someText :: () -> string?)())
someText("afjwirinefirwiuwefui")
if (someText :: () -> string?)() then
print((someText :: () -> string)())
end
Vide 0.4.0 from Wally
Trying to get a
sourcewith a nullable value results in a type error, like this:This requires explicit casting to silent out the error: