fancybox
fancybox copied to clipboard
Using fancyapps with react / typescript
Hello!
I'm having a problem using fancyapps with react / typescript.
When I try to import { Fancybox as NativeFancybox } from '@fancyapps/ui'; I'll get the following error:
Could not find a declaration file for module'@fancyapps/ui`. 'd:/ionic/myproject/node_modules/@fancyapps/ui/dist/fancybox.umd.js' implicitly has an any type.
Try 'npm i --save-dev @types/fancyapps__ui' if it exists or add a new declaration (.d.ts) file containing 'declare module "@fancyapps/ui"';
I tried to install @types/fancyapps__ui but I'll get the error 404 not found!
Also I created a folder with the name of the module inside of the 'node_modules/@types', containing an index.d.ts file and inside of the index file I put 'declare module "@fancyapps/ui"'. After this the error went away but if I install / uninstall a new package, fancyapps_ui folder will dissapear!
You may want to ask on https://github.com/fancyapps/ui instead