#Assets vs Content Collection types out of sync

1 messages · Page 1 of 1 (latest)

tacit jay
#

Astro asset types:

interface ImageMetadata {
    src: string;
    width: number;
    height: number;
    format: InputFormat;
}
type InputFormat = "avif" | "png" | "webp" | "jpeg" | "jpg" | "svg" | "tiff" | "gif"

Astro content types:

    // This needs to be in sync with ImageMetadata
    export type ImageFunction = () => import('astro/zod').ZodObject<{
        src: import('astro/zod').ZodString;
        width: import('astro/zod').ZodNumber;
        height: import('astro/zod').ZodNumber;
        format: import('astro/zod').ZodUnion<
            [
                import('astro/zod').ZodLiteral<'png'>,
                import('astro/zod').ZodLiteral<'jpg'>,
                import('astro/zod').ZodLiteral<'jpeg'>,
                import('astro/zod').ZodLiteral<'tiff'>,
                import('astro/zod').ZodLiteral<'webp'>,
                import('astro/zod').ZodLiteral<'gif'>,
                import('astro/zod').ZodLiteral<'svg'>,
            ]
        >;
    }>;

Since I use @astrojs/check, it breaks my build. I've regenerated my content types, but the problem persists

wide berryBOT
#
Quiet in here?

It looks like no-one has responded to your question yet. People might not be available right now or don’t know how to answer your question. Want an answer while you wait? Try asking our experimental bot in #1095492539085230272.

sweet wedge
#

Hi @tacit jay! Looks like this is a bug in the new AVIF support. Can you open an issue to report this?

potent heronBOT
tacit jay
cobalt oriole
#

Thank you, this was fixed already though.. Not sure why it still happens

cobalt oriole
#

oh, because I didn't merge the PR that fixes this, ha