(webpack5) Function type notation must be parenthesized when used in a union type.(1385) #10573
Closed
3 tasks done
Labels
bug-pending-triage
Reported bug, pending triage to confirm.
Issue Description
When I try to pass an object to
mergeWebpack
TypeScript complains that the type is not correct.The type definition for
mergeWebpack
:If I try to call
mergeWebpack
with an object that satisfiesPartial<webpack.Configuration>
TypeScript complains.I feel this is a weird TypeScript bug because the type reported in the error message does not match the union type.
It's also weird that to find this bug I had to play with the ordering of the union types to get TypeScript to complain.
Playground
Place the function definition on the left side of the union type and TS will complain that the right side does not exist but it will not complain that
Function type notation must be parenthesized when used in a union type.(1385)
Reproduction
No response
Relevant log output (if applicable)
No response
Environment
No response
Please accept these terms
The text was updated successfully, but these errors were encountered: