From 9fdecb5606f14d277f56b58f3d06d7ad6c0c515c Mon Sep 17 00:00:00 2001 From: wulinsheng123 <409187100@qq.com> Date: Tue, 7 Feb 2023 03:28:08 +0800 Subject: [PATCH] fix: #5979 (#6142) * fix: #5979 * Update lazy-plums-sit.md --------- Co-authored-by: Nate Moore --- .changeset/lazy-plums-sit.md | 5 +++++ packages/integrations/image/components/index.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/lazy-plums-sit.md diff --git a/.changeset/lazy-plums-sit.md b/.changeset/lazy-plums-sit.md new file mode 100644 index 000000000000..363021312da8 --- /dev/null +++ b/.changeset/lazy-plums-sit.md @@ -0,0 +1,5 @@ +--- +'@astrojs/image': patch +--- + +Improve type definitions (`background` should be optional) diff --git a/packages/integrations/image/components/index.ts b/packages/integrations/image/components/index.ts index c4f41123f7f5..2ca557656a09 100644 --- a/packages/integrations/image/components/index.ts +++ b/packages/integrations/image/components/index.ts @@ -47,7 +47,7 @@ export interface PictureComponentRemoteImageProps widths: number[]; aspectRatio: TransformOptions['aspectRatio']; formats?: OutputFormat[]; - background: TransformOptions['background']; + background?: TransformOptions['background']; } export type ImgHTMLAttributes = HTMLAttributes<'img'>;