Skip to content

Types are not recognized when using TypeScript #8

@RBFraphael

Description

@RBFraphael

Describe the bug
When using TypeScript, importing @fortawesome/svelte-fontawesome triggers an IDE-error saying "Cannot find module '@fortawesome/svelte-fontawesome' or its corresponding type declarations."

Image

Reproducible test case

  • Create (or open) a SvelteKit project
  • Try to import { FontAwesomeIcon } from "@fortawesome/svelte-fontawesome";
  • IDE will show you an error about type declarations

Expected behavior

  • No errors when importing FontAwesomeIcon, as well as valid auto-complete and suggestions based on types

Desktop (please complete the following information):

  • Browser: Chrome 120.0.6099.224
  • IDE: Visual Studio Code 1.85.2
  • OS: Linux Mint 21.3
  • Svelte: 4.2.7
  • SvelteKit: 2.0.0
  • TypeScript: 5.0.0

Additional comments
Even with this errors, the app works correctly, so, there's no errors when running and/or building. So, this error is only for fixing the development process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions