svelte-feather-icons icon indicating copy to clipboard operation
svelte-feather-icons copied to clipboard

Svelte-check fails on Github Actions

Open Paultje52 opened this issue 11 months ago • 1 comments

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

Paultje52 avatar Mar 19 '24 12:03 Paultje52

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: https://github.com/dylanblokhuis/svelte-feather-icons/pull/27

calasanmarko avatar Apr 07 '24 14:04 calasanmarko