-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
-
-
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
Typescript issues in 10.19.4+ with @mui/material #4293
Comments
it is related to #4271, specifically only this one: Lines 175 to 179 in c3160cc
|
Thanks for finding that! Will need to figure out an altered implementation I guess. |
Issue 1 resolved for me by modifying ComponentPropsWithRef as follows (from ryanlchan/preact@8a6b642): export type ComponentPropsWithRef<
C extends ComponentType<any> | keyof JSXInternal.IntrinsicElements
> = C extends new (props: infer P) => Component<any, any>
? PropsWithoutRef<P> & RefAttributes<InstanceType<C>>
: PropsWithRef<ComponentProps<C>>; This matches the implementation in types/react: type ComponentPropsWithRef<T extends ElementType> = T extends (new(props: infer P) => Component<any, any>)
? PropsWithoutRef<P> & RefAttributes<InstanceType<T>>
: PropsWithRef<ComponentProps<T>>; I could not get issues 2 and 3 to repro - @akornatskyy could you check if this helps you? |
@ryanlchan : thanks. I rolled your change on top of version |
@ryanlchan : any update? it is still reproducable with |
It works as expected with
preact
version10.19.3
. The issues are reproducable with10.19.4
-10.19.6
.Issue 1
cause:
Issue 2
another issue is related to
Button
:cause:
Issue 3
and another one:
cause:
The text was updated successfully, but these errors were encountered: