From ebb40f5cb093e9be5f856a98bf5ffd65a814218b Mon Sep 17 00:00:00 2001 From: Caleb Jasik Date: Thu, 11 May 2023 07:40:53 -0500 Subject: [PATCH] `@astrojs/image`: Add `fetchpriority` to `Picture` types (#7059) * Add `fetchpriority` to `Picture` types * Add changeset --- .changeset/purple-zebras-allow.md | 5 +++++ packages/integrations/image/components/index.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/purple-zebras-allow.md diff --git a/.changeset/purple-zebras-allow.md b/.changeset/purple-zebras-allow.md new file mode 100644 index 0000000000..64649ca643 --- /dev/null +++ b/.changeset/purple-zebras-allow.md @@ -0,0 +1,5 @@ +--- +'@astrojs/image': patch +--- + +Add `fetchpriority` to allowed `Picture` attributes in `@astrojs/image` diff --git a/packages/integrations/image/components/index.ts b/packages/integrations/image/components/index.ts index 3135e0e215..6c6d6910aa 100644 --- a/packages/integrations/image/components/index.ts +++ b/packages/integrations/image/components/index.ts @@ -27,7 +27,7 @@ export interface ImageComponentRemoteImageProps extends TransformOptions, ImgHTM export interface PictureComponentLocalImageProps extends GlobalHTMLAttributes, Omit, - Pick { + Pick { src: ImageMetadata | Promise<{ default: ImageMetadata }>; /** Defines an alternative text description of the image. Set to an empty string (alt="") if the image is not a key part of the content (it's decoration or a tracking pixel). */ alt: string; @@ -39,7 +39,7 @@ export interface PictureComponentLocalImageProps export interface PictureComponentRemoteImageProps extends GlobalHTMLAttributes, TransformOptions, - Pick { + Pick { src: string; /** Defines an alternative text description of the image. Set to an empty string (alt="") if the image is not a key part of the content (it's decoration or a tracking pixel). */ alt: string;