Don't remove parenthesis in `Rest...` generics.
howmanysmall opened this issue · 2 comments
howmanysmall commented
I don't really know how to explain this but I do have a reproduction.
-- Given this type:
type Function<T..., R...> = any
do
type ThisIsOkay = Function<(), ({[string]: number})>
type ThisIsInvalidAndWhatResultsFromFormatting = Function<(), {[string]: number}>
end
do
type ThisIsOkay2 = Function<(string), ({[string]: number})>
type ThisIsInvalidAndWhatResultsFromFormatting2 = Function<string, {[string]: number}>
end
Basically, if there's two Rest...
generics in a type, you should not format away the parenthesis for any of them.
JohnnyMorganz commented
I cannot reproduce this. This should've been fixed in #730
Are you on the latest version?
howmanysmall commented
oh good lord i was WAY out of date