You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is unrelated to Material UI. Per my testing, TS is working correctly. It rightfully complains about the required bar prop not being present in <Foo />.
I suggest you to download the sandbox and run it locally. Sometimes online sandboxes misbehave and are quite slow at type checking, so always good to double-check locally e.g. type-checking in the Stackblitz sandbox you shared looks like this for a few seconds until all things load:
I can reproduce this locally and provided the Stackblitz as a minimal reproduction example. You are right mentioning that it initially takes some seconds to get the typechecking running. Nevertheless - once it runs - it produces the problems I've mentioned above.
After some more research it seems that this is a known issues that originates from @react-three/fiber, not @mui/material. #34068 (comment) #34068 (comment)
So, I guess I just duplicated an existing Github issue. Closing this one. Thanks anyway!
Steps to reproduce
Link to live example: (required)
https://stackblitz.com/edit/vitejs-vite-n9k61v?file=src%2Fmain.tsx,src%2FApp.tsx&terminal=dev
Steps:
import { Canvas } from '@react-three/fiber';
) and see that type issue on MUI Button component is not detectedCurrent behavior
Type checks on MUI components stop working when having imports from @react-three/fiber
Expected behavior
Type checks on MUI components should continue to work when having imports from @react-three/fiber
Context
No response
Your environment
npx @mui/envinfo
Search keywords: type, three, fiber
The text was updated successfully, but these errors were encountered: