From ca91976edbfd34adbb31096516a266f31d8f6216 Mon Sep 17 00:00:00 2001 From: Renato Lacerda Date: Mon, 30 Jan 2023 17:29:03 -0300 Subject: [PATCH] Fix `GetPictureResult` interface (#5894) --- .changeset/chilly-ads-roll.md | 5 +++++ packages/integrations/image/src/lib/get-picture.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/chilly-ads-roll.md diff --git a/.changeset/chilly-ads-roll.md b/.changeset/chilly-ads-roll.md new file mode 100644 index 000000000000..8de509a18f6c --- /dev/null +++ b/.changeset/chilly-ads-roll.md @@ -0,0 +1,5 @@ +--- +'@astrojs/image': patch +--- + +`getPicture()` return object with the correct image type diff --git a/packages/integrations/image/src/lib/get-picture.ts b/packages/integrations/image/src/lib/get-picture.ts index 2ecfc0d5bb73..25bf104e8c87 100644 --- a/packages/integrations/image/src/lib/get-picture.ts +++ b/packages/integrations/image/src/lib/get-picture.ts @@ -17,7 +17,7 @@ export interface GetPictureParams { } export interface GetPictureResult { - image: astroHTML.JSX.HTMLAttributes; + image: astroHTML.JSX.ImgHTMLAttributes; sources: { type: string; srcset: string }[]; }