I'm trying to use the module react-image-gallery. However there are no types found for this package using npm.
npm install @types/react-image-gallery
returs 404.
Following this answer I tried to declare ImageGallery like this: const ImageGallery = require('react-image-gallery');
This gives no compiler warning but the application fails at runtime.
I can make everything work by setting "noImplicitAny": false
in tsconfig.json
but I do not wan't to disable this globally.
How can I mark my import as any?
I have tried the following but it does not work:
import ImageGallery: any from 'react-image-gallery';
import (ImageGallery as any) from 'react-image-gallery';
import { ImageGallery as any } from 'react-image-gallery';