Giter VIP home page Giter VIP logo

Comments (6)

Wizzel1 avatar Wizzel1 commented on May 27, 2024

Same here at ^0.377.0

from lucide.

ngowuys avatar ngowuys commented on May 27, 2024

I'm facing with same problem, hope there will be a PR to fix this soon.

from lucide.

jprinaldi avatar jprinaldi commented on May 27, 2024

I'm still experiencing this issue with version 0.379.0. Can somebody else confirm?

from lucide.

gafagarion avatar gafagarion commented on May 27, 2024

I'm still having the issue with 0.379.0 as well

from lucide.

garrettpauls avatar garrettpauls commented on May 27, 2024

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.

dadebue avatar dadebue commented on May 27, 2024

Happening for me as well!

from lucide.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.