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
'EXPRESSION PRODUCES A UNION TYPE THAT IS TOO COMPLEX TO REPRESENT' #611
Comments
I receive this error while using Typescript (
Additionally, I receive the following error in SMUI: node_modules/@smui/menu/src/SelectionGroupIcon.ts:8:3
Error: Types of construct signatures are incompatible.
Type 'new (options: ComponentConstructorOptions<{ getElement?: (() => HTMLSpanElement) | undefined; use?: ActionArray | undefined; class?: string | undefined; contextmenu?: string | null | undefined; ... 202 more ...; 'sveltekit:reload'?: true | ... 1 more ... | undefined; }>) => Graphic__SvelteComponent_' is not assignable to type 'new <Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any>(options: ComponentConstructorOptions<Props>) => SvelteComponent<...>'.
Construct signature return types 'Graphic__SvelteComponent_' and 'SvelteComponent<Props, Events, Slots>' are incompatible.
The types of '$$prop_def' are incompatible between these types.
Type '{ getElement?: (() => HTMLSpanElement) | undefined; use?: ActionArray | undefined; class?: string | undefined; contextmenu?: string | null | undefined; ... 202 more ...; 'sveltekit:reload'?: true | ... 1 more ... | undefined; }' is not assignable to type 'Props'.
'{ getElement?: (() => HTMLSpanElement) | undefined; use?: ActionArray | undefined; class?: string | undefined; contextmenu?: string | null | undefined; ... 202 more ...; 'sveltekit:reload'?: true | ... 1 more ... | undefined; }' is assignable to the constraint of type 'Props', but 'Props' could be instantiated with a different subtype of constraint 'Record<string, any>'.
class: 'mdc-menu__selection-group-icon',
component: Graphic,
}); |
I have a fix for this, but it requires using |
Ok, this is fixed in d1610c8. |
It seems it's still having this issue... jfc. |
Or maybe not, idk. Svelte's type system seems so fragile. Is anyone seeing this issue still in 7 beta 13? |
I figured it out! It took seven hours of trial and error, but I finally fixed it! But now I'm having a Manhattan with my dad, so I'll push the fix tomorrow. |
hello, actually i always have the error, why you do not try svelte 4 ? |
I think, there is two dinstincts eerors in this thread. with svelte 3.x.x, I do not have the union type error, mentioned in the title of this issue. But yes, I always have with svelte 3 and your latest bump, the svg error. |
Ok, this is now fixed in b26b1d4 |
And if I push a new version and have to reopen this, you guys will hear me sighing from wherever you are in the world. |
I am also hard fighting with SMUI :) I am using turborepo with PNPM, the cd is also mandatory or I have kind of import not found...
|
@hperrin during svelte-check, I still receive:
|
Ok. I'll look into that one soon. Thankfully it's something small. |
hello But, I have not seen in the SMUI repo, a package.json using svelte 4, but svelte 3.50.x tks |
I also do not understant ho to manage the imports of @material/xxxx How should import all this list at once ? |
@nzaero Let's try and keep this issue focused. The other problem you're running into with style compilation isn't related. |
@hperrin has there been any movement on the remaining Svelte 4 |
@hperrin will Svelte 4 support in SMUI be finalized, or should SMUI be considered abandoned/no longer maintained? |
i have the same problem with version 7.0.0-beta.15 when i run svelte check on my project 1694074059405 START "/app" |
hello, I have many errors saying:
'EXPRESSION PRODUCES A UNION TYPE THAT IS TOO COMPLEX TO REPRESENT'
I also mention, that I do not have a tsconfig.json because, I have understood that Rich Harris recomendation was to use type system with JSDOC inside libs, si I do not know if I can use SMUI without TS ? And also, I am using VitePreprocessor, and not SveltePreprocessor because I am using vitest.
Do you know why ?
"@smui/button": "7.0.0-beta.12",
import Button, { Label } from '@smui/button';
<Button href={menu.url} ......
also no updated sample there, so I don t know if it is becoz I am using smui 7 with ts 5
https://github.com/hperrin/smui-example-sveltekit/blob/master/package.json
I think you did not have realized the migration to svelte 4 :(
Is that planned soonly ?
Tks
The text was updated successfully, but these errors were encountered: