Comments (7)
I'm still experiencing this issue with version 0.379.0
. Can somebody else confirm?
from lucide.
Happening for me as well!
from lucide.
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 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.
Me as well, at ^0.383.0
from lucide.
Related Issues (20)
- Moto HOT 1
- Fork and knife icon HOT 2
- Package that only includes icons postfixed with "Icon" HOT 1
- React icon names wrong HOT 1
- GPU - graphics card HOT 3
- Sticker icon doesn't have eyes HOT 1
- radio button HOT 2
- Text logs icon HOT 9
- Install error in react 19 (next 15)
- Raindrop Percentage Icon HOT 2
- Moon Phase Icons HOT 1
- whatsapp and X
- Missing icon "contact-round" HOT 2
- In JavaScript, `Infinity` is a reserved word. HOT 2
- save-off HOT 9
- Philippine Peso Icon HOT 1
- X Icon (formerly twitter) request
- Scan QR Code HOT 9
- Gender icons: female, male, transgender, fluid HOT 2
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.