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.
I don't really know how to explain this but I do have a reproduction.
Basically, if there's two
Rest...
generics in a type, you should not format away the parenthesis for any of them.