Skip to content

Commit

Permalink
feat: update integration documentation
Browse files Browse the repository at this point in the history
Updates integration reference document with new `updateConfig` method types.

Related to (Astro PR 9013)[withastro/astro#9013]
  • Loading branch information
nerdoza committed Nov 7, 2023
1 parent 32152cb commit f2bab84
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/content/docs/en/reference/integrations-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ interface AstroIntegration {
config: AstroConfig;
command: 'dev' | 'build';
isRestart: boolean;
updateConfig: (newConfig: Record<string, any>) => void;
updateConfig: (newConfig: DeepPartial<AstroConfig>) => AstroConfig;
addRenderer: (renderer: AstroRenderer) => void;
addWatchFile: (path: URL | string) => void;
addClientDirective: (directive: ClientDirectiveConfig) => void;
Expand Down Expand Up @@ -72,7 +72,7 @@ interface AstroIntegration {
config: AstroConfig;
command: 'dev' | 'build';
isRestart: boolean;
updateConfig: (newConfig: Record<string, any>) => void;
updateConfig: (newConfig: DeepPartial<AstroConfig>) => AstroConfig;
addRenderer: (renderer: AstroRenderer) => void;
addClientDirective: (directive: ClientDirectiveConfig) => void;
addDevOverlayPlugin: (pluginEntrypoint: string) => void;
Expand Down Expand Up @@ -104,7 +104,7 @@ A read-only copy of the user-supplied [Astro config](/en/reference/configuration

#### `updateConfig` option

**Type:** `(newConfig: Record<string, any>) => void;`
**Type:** `(newConfig: DeepPartial<AstroConfig>) => AstroConfig;`

A callback function to update the user-supplied [Astro config](/en/reference/configuration-reference/). Any config you provide **will be merged with the user config + other integration config updates,** so you are free to omit keys!

Expand Down

0 comments on commit f2bab84

Please sign in to comment.