hperrin / svelte-material-ui

Svelte Material UI Components
https://sveltematerialui.com/
Apache License 2.0
3.28k stars 288 forks source link

`svelte-check` fails on the menu component #580

Closed bystrano closed 1 year ago

bystrano commented 1 year ago

Describe the bug

I get an svelte-check error when I use the menu component :

> svelte-check --tsconfig ./tsconfig.json

====================================
Loading svelte-check in workspace: /path/to/source
Getting Svelte diagnostics...

 /path/to/source/node_modules/@smui/menu/src/SelectionGroupIcon.ts:5:56
Error: Type 'Graphic__SvelteComponent_' does not satisfy the constraint 'ComponentType<SvelteComponentDev>'.
  Type 'Graphic__SvelteComponent_' provides no match for the signature 'new (options: ComponentConstructorOptions<Props>): SvelteComponentDev'.

export default classAdderBuilder<keyof SmuiElementMap, Graphic>({
        class: 'mdc-menu__selection-group-icon',

====================================
svelte-check found 1 error and 0 warnings in 1 file

This pull request provides a workaround to silence the error : #579

hperrin commented 1 year ago

This is fixed in 7.0.0-beta.1. :)