-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CloseButton: Expression produces a union type that is too complex to represent #4331
Comments
The issue might be in your ts configuration, I cannot reproduce it in default template – https://codesandbox.io/s/currying-wind-xre35g?file=/src/App.tsx |
After a lot of investigation I have narrowed this down to an issue with Typescript itself. The warning disappears when I downgrade to This may more likely be related to microsoft/TypeScript#53234. Closed as clearly not issue with Mantine per se. |
Also seeing this with |
Looks like this is the result of the types just being too large? |
Same issue here with |
Potentially related: #6970 |
What package has an issue
@mantine/core
Describe the bug
Duplicate of #3332 - but I have been able to reproduce in a sandbox.
I'm encountering this issue when using Mantine inside an NX workspace (using PNPM to install).
I setup a brand new NX repo and cloned across all package.json dependencies and dev dependencies.
This adds a single React app built with Vite.
In
/apps/mantine-test/src/app/app.tsx
I'm importing CloseButton which is also giving same error.SRC GitHub repo: https://github.com/josiahayres/test-mantine-type-error
Codesandbox: https://codesandbox.io/p/sandbox/github/josiahayres/test-mantine-type-error/tree/main?file=/apps/mantine-test/src/app/app.tsx:16,1
Workaround
My current workaround is to disable typescript for next line 🥲
What version of @mantine/hooks page do you have in package.json?
6.0.13
If possible, please include a link to a codesandbox with the reproduced problem
https://codesandbox.io/p/sandbox/github/josiahayres/test-mantine-type-error/tree/main?file=/apps/mantine-test/src/app/app.tsx:16,1
Do you know how to fix the issue
No
Are you willing to participate in fixing this issue and create a pull request with the fix
Yes
Possible fix
No response
The text was updated successfully, but these errors were encountered: