fancybox icon indicating copy to clipboard operation
fancybox copied to clipboard

Using fancyapps with react / typescript

Open aminmousavi5147 opened this issue 3 years ago • 1 comments
trafficstars

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!

aminmousavi5147 avatar Nov 24 '21 08:11 aminmousavi5147

You may want to ask on https://github.com/fancyapps/ui instead

machour avatar May 13 '22 12:05 machour