Comments (6)
Same here at ^0.377.0
from lucide.
I'm facing with same problem, hope there will be a PR to fix this soon.
from lucide.
I'm still experiencing this issue with version 0.379.0
. Can somebody else confirm?
from lucide.
I'm still having the issue with 0.379.0
as well
from lucide.
I can confirm this still happens in 0.379.0 as well. The error message from svelte-check is now different, however:
Error: Type 'typeof Home' is not assignable to type 'ComponentType<Icon>'.
Types of construct signatures are incompatible.
Type 'new (options: ComponentConstructorOptions<IconProps>) => Home' is not assignable to type 'new (options: ComponentConstructorOptions<{ [x: string]: any; name?: string | undefined; color?: string | undefined; size?: string | number | undefined; strokeWidth?: string | number | undefined; absoluteStrokeWidth?: boolean | undefined; iconNode: IconNode; }>) => Icon'.
Construct signature return types 'Home' and 'Icon' are incompatible.
The types of '$$prop_def' are incompatible between these types.
Type 'IconProps' is not assignable to type '{ [x: string]: any; name?: string | undefined; color?: string | undefined; size?: string | number | undefined; strokeWidth?: string | number | undefined; absoluteStrokeWidth?: boolean | undefined; iconNode: IconNode; }'. (ts)
href: '/',
icon: Home,
},
The full output from my original test project (updated to 0.379.0) is as follows:
npm run check
> [email protected] check
> svelte-kit sync && svelte-check --tsconfig ./tsconfig.json
====================================
Loading svelte-check in workspace: s:\code\lucide-typescript-bug
Getting Svelte diagnostics...
s:\code\lucide-typescript-bug\src\routes\+page.svelte:18:4
Error: Type 'typeof Home' is not assignable to type 'ComponentType<Icon>'.
Types of construct signatures are incompatible.
Type 'new (options: ComponentConstructorOptions<IconProps>) => Home' is not assignable to type 'new (options: ComponentConstructorOptions<{ [x: string]: any; name?: string | undefined; color?: string | undefined; size?: string | number | undefined; strokeWidth?: string | number | undefined; absoluteStrokeWidth?: boolean | undefined; iconNode: IconNode; }>) => Icon'.
Construct signature return types 'Home' and 'Icon' are incompatible.
The types of '$$prop_def' are incompatible between these types.
Type 'IconProps' is not assignable to type '{ [x: string]: any; name?: string | undefined; color?: string | undefined; size?: string | number | undefined; strokeWidth?: string | number | undefined; absoluteStrokeWidth?: boolean | undefined; iconNode: IconNode; }'. (ts)
href: '/',
icon: Home,
},
s:\code\lucide-typescript-bug\src\routes\+page.svelte:23:4
Error: Type 'typeof Library' is not assignable to type 'ComponentType<Icon>'.
Types of construct signatures are incompatible.
Type 'new (options: ComponentConstructorOptions<IconProps>) => Library' is not assignable to type 'new (options: ComponentConstructorOptions<{ [x: string]: any; name?: string | undefined; color?: string | undefined; size?: string | number | undefined; strokeWidth?: string | number | undefined; absoluteStrokeWidth?: boolean | undefined; iconNode: IconNode; }>) => Icon'.
Construct signature return types 'Library' and 'Icon' are incompatible.
The types of '$$prop_def' are incompatible between these types.
Type 'IconProps' is not assignable to type '{ [x: string]: any; name?: string | undefined; color?: string | undefined; size?: string | number | undefined; strokeWidth?: string | number | undefined; absoluteStrokeWidth?: boolean | undefined; iconNode: IconNode; }'. (ts)
href: '/blog',
icon: Library,
},
s:\code\lucide-typescript-bug\src\routes\+page.svelte:28:4
Error: Type 'typeof Cog' is not assignable to type 'ComponentType<Icon>'.
Types of construct signatures are incompatible.
Type 'new (options: ComponentConstructorOptions<IconProps>) => Cog' is not assignable to type 'new (options: ComponentConstructorOptions<{ [x: string]: any; name?: string | undefined; color?: string | undefined; size?: string | number | undefined; strokeWidth?: string | number | undefined; absoluteStrokeWidth?: boolean | undefined; iconNode: IconNode; }>) => Icon'.
Construct signature return types 'Cog' and 'Icon' are incompatible.
The types of '$$prop_def' are incompatible between these types.
Type 'IconProps' is not assignable to type '{ [x: string]: any; name?: string | undefined; color?: string | undefined; size?: string | number | undefined; strokeWidth?: string | number | undefined; absoluteStrokeWidth?: boolean | undefined; iconNode: IconNode; }'. (ts)
href: '/projects',
icon: Cog,
}
s:\code\lucide-typescript-bug\src\routes\+page.svelte:35:4
Error: Property 'iconNode' is missing in type '{}' but required in type '{ [x: string]: any; name?: string | undefined; color?: string | undefined; size?: string | number | undefined; strokeWidth?: string | number | undefined; absoluteStrokeWidth?: boolean | undefined; iconNode: IconNode; }'. (ts)
<a href={item.href}>
<svelte:component this={item.icon} />
<span>{item.name}</span>
====================================
svelte-check found 4 errors and 0 warnings in 1 file
from lucide.
Happening for me as well!
from lucide.
Related Issues (20)
- Parallelogram HOT 3
- Documentation for icon font does not respect case sensitive systems
- icon request: `index-card` HOT 1
- React 19 support HOT 3
- transparent icons show overlapping internal shapes HOT 2
- 0.378.0 introduced a hydration bug that can be seen when using nextjs or remix
- Module '"lucide-react"' has no exported member 'Notebook'.ts(2305) HOT 3
- Breaking changes between `lucide-static@307` and `lucide-static@308+` (package moved to ESM)
- Git icon HOT 8
- Map Pin Plus
- Creating new icons triggers 'unique "key" prop' error HOT 3
- Drone icon HOT 2
- List Check Icon HOT 2
- Figma plugin keeps loading and won't run HOT 6
- X-(Twiiter) New Logo HOT 1
- Icon Request: Cloud Checked Icon HOT 3
- Time Picker
- Find renamed icons HOT 1
- `Angular 18` peer dependency
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lucide.