From cf0198316db91a5df6750401ea3cbd7ce5330836 Mon Sep 17 00:00:00 2001 From: Chris Swithinbank Date: Wed, 8 Mar 2023 13:04:01 +0200 Subject: [PATCH] Fix configuration reference docs (#6455) Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com> --- .changeset/cyan-readers-wonder.md | 5 +++++ packages/astro/src/@types/astro.ts | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 .changeset/cyan-readers-wonder.md diff --git a/.changeset/cyan-readers-wonder.md b/.changeset/cyan-readers-wonder.md new file mode 100644 index 000000000..c6aac0a6d --- /dev/null +++ b/.changeset/cyan-readers-wonder.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Document `image.service` configuration option diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index d4349cf72..1100cd5f8 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -706,6 +706,27 @@ export interface AstroUserConfig { * @name Image options */ image?: { + /** + * @docs + * @name image.service (Experimental) + * @type {'astro/assets/services/sharp' | 'astro/assets/services/squoosh' | string} + * @default `'astro/assets/services/squoosh'` + * @version 2.1.0 + * @description + * Set which image service is used for Astro’s experimental assets support. + * + * The value should be a module specifier for the image service to use: + * either one of Astro’s two built-in services, or a third-party implementation. + * + * ```js + * { + * image: { + * // Example: Enable the Sharp-based image service + * service: 'astro/assets/services/sharp', + * }, + * } + * ``` + */ // eslint-disable-next-line @typescript-eslint/ban-types service: 'astro/assets/services/sharp' | 'astro/assets/services/squoosh' | (string & {}); }; @@ -926,6 +947,7 @@ export interface AstroUserConfig { legacy?: object; /** + * @docs * @kind heading * @name Experimental Flags * @description