How do I define Astro Images in typescript without build errors?
---
import Vertice from "../svg/brand-vertice.astro";
import { Image } from 'astro:assets';
interface Props {
url: string;
title: string;
teaserText: string;
image?: Image;
}
const {
url,
title,
teaserText,
image
} = Astro.props;
---
this throws the error:
error ts(2322): Type '{ height: number; width: number; src: string; format: "avif" | "png" | "webp" | "jpeg" | "jpg" | "svg" | "tiff" | "gif"; }' is not assignable to type '(_props: Props) => any'.
Type '{ height: number; width: number; src: string; format: "avif" | "png" | "webp" | "jpeg" | "jpg" | "svg" | "tiff" | "gif"; }' provides no match for the signature '(_props: Props): any'.
The bot gave me a suggestion, but that also throws up a different error....
Any ideas?