Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find a declaration file for module 'fslightbox-react' #239

Open
yamilelias opened this issue Jan 16, 2024 · 1 comment
Open

Could not find a declaration file for module 'fslightbox-react' #239

yamilelias opened this issue Jan 16, 2024 · 1 comment

Comments

@yamilelias
Copy link

The package is missing a Typescript module declaration.

error TS7016: Could not find a declaration file for module 'fslightbox-react'. '/Users/yamilelias/Development/platsage/node_modules/fslightbox-react/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/fslightbox-react` if it exists or add a new declaration (.d.ts) file containing `declare module 'fslightbox-react';`

11 import FsLightbox from 'fslightbox-react'

It is something easy to solve but it is missing in the documentation and the README file of the project.

@PeterTucker
Copy link

Create a file named fslightbox-react.d.ts in your project's src or typings directory (or any directory included in your TypeScript configuration) and add the following line to the file:

declare module 'fslightbox-react';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants