From 22b1432e3eed6ff40a0ab383c8f1f06f0df10d62 Mon Sep 17 00:00:00 2001 From: Chris Swithinbank Date: Tue, 29 Mar 2022 00:07:07 +0200 Subject: [PATCH] Fix typing of `integrations` array in user config (#2907) * Fix type of `integrations` in config As per [docs](https://docs.astro.build/en/reference/integrations-reference/#combining-plugins), an integration can return an array of `AstroIntegration` objects to support bundling a collection of integrations as a preset. This change reflects that usages in the typing for the user config object. * Add changeset --- .changeset/real-starfishes-turn.md | 5 +++++ packages/astro/src/@types/astro.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/real-starfishes-turn.md diff --git a/.changeset/real-starfishes-turn.md b/.changeset/real-starfishes-turn.md new file mode 100644 index 000000000..bccddb3fe --- /dev/null +++ b/.changeset/real-starfishes-turn.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix typing of `integrations` array in user config diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index 70969f7ec..6e3638e52 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -161,7 +161,7 @@ export interface AstroUserConfig { * } * ``` */ - integrations?: AstroIntegration[]; + integrations?: Array; /** * @docs