Skip to content

Commit

Permalink
Fix typing of integrations array in user config (withastro#2907)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
delucis committed Mar 28, 2022
1 parent 9b7e419 commit 22b1432
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/real-starfishes-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fix typing of `integrations` array in user config
2 changes: 1 addition & 1 deletion packages/astro/src/@types/astro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export interface AstroUserConfig {
* }
* ```
*/
integrations?: AstroIntegration[];
integrations?: Array<AstroIntegration | AstroIntegration[]>;

/**
* @docs
Expand Down

0 comments on commit 22b1432

Please sign in to comment.