Skip to content
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

Svelte-check fails on Github Actions #26

Open
Paultje52 opened this issue Mar 19, 2024 · 1 comment
Open

Svelte-check fails on Github Actions #26

Paultje52 opened this issue Mar 19, 2024 · 1 comment

Comments

@Paultje52
Copy link

Since today, svelte-check fails when using svelte-feather-icons.
I created a minimal repository here to reproduce the bug. You can also download the code here.

/home/runner/work/abc/abc/src/routes/+page.svelte:10:2
Error: Argument of type 'typeof HomeIcon' is not assignable to parameter of type 'ConstructorOfATypedSvelteComponent'.
  Type 'HomeIcon' is missing the following properties from type 'ATypedSvelteComponent': $$prop_def, $$events_def, $$slot_def, $on

Possible causes:
- You use the instance type of a component where you should use the constructor type
- Type definitions are missing for this Svelte Component. If you are using Svelte 3.31+, use SvelteComponentTyped to add a definition:
  import type { SvelteComponentTyped } from "svelte";
  class ComponentName extends SvelteComponentTyped<{propertyName: string;}> {} (ts)

<HomeIcon />

Here's the strange part: Even rerunning the same workflow (that worked before) don't seem to work now (see images below). Because of this, I don't know if this is an issue with svelte-feather-icons or something else (for example github actions).
image
image

@calasanmarko
Copy link
Contributor

I was running into the same issue, and what I ended up doing is forking the repository and changing the build script to generate types using SvelteComponent instead of SvelteComponentTyped. This is probably related to SvelteComponentTyped being deprecated - see the v4 migration guide.

I've opened a PR to resolve this: #27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants