I'm trying to use some SVGs in a page in appDir, but I get a TS error for my SVGs
32:18 Error: Unsafe assignment of an any value. @typescript-eslint/no-unsafe-assignment
The SVGs are just pure SVG files that I export from a index.ts file. I use them with Next Image like this
import { ArrowRight } from "@/icons/index";
...
<Image
src={ArrowRight}
height={25}
width={25}
alt=""
/>
...
I know the SVG exists, but I have no idea how to type them. Do I have to write type definitions everywhere I use these SVGs? And what would those definitions be?
I've enabled SVGs for <Image>, from my next.config.js
dangerouslyAllowSVG: true,
contentDispositionType: 'attachment',
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
Using NextJS 13.4.9