Currently, the SubtractAsync method returns an
Instance when it’s expected to return an
UnionOperation (as it can only return that or nil).
I tend to use typechecking with
--!strict on almost everything, with proper typecheckings for everything. When I typecheck the returned item as an
UnionOperation, it is considered incorrect giving me a ugly warning line. This is very annoying as I would like for the script editor to treat the returned item as a Union. Which if I try to do, gives me a warning line. As a developer that wants to have things looking clean, a glaring warning line is not clean.
This makes me have to either:
- typecheck it as
UnionOperationand have the warning line permanently sitting in my script
- use the “correct” but actually incorrect typecheck (
- not use typechecking at all for anything regarding SubtractAsync
I personally chose the first option and now have a warning just sitting in the script.
If this were changed I could just simply typecheck the item appropriately as a UnionOperation without having to worry about false-warnings. For perfectionists/people with OCD this change would also help, as said above, they would most likely want their scripts clean and readable which false-warnings do not help with.