Skip to content

Commit

Permalink
fix: document open option (#7418)
Browse files Browse the repository at this point in the history
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
  • Loading branch information
ematipico and yanthomasdev committed Jun 20, 2023
1 parent 89a4835 commit 2b34fc4
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/sour-teachers-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Correctly type the option `server.open`
31 changes: 31 additions & 0 deletions packages/astro/src/@types/astro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,22 @@ type ServerConfig = {
* Set custom HTTP response headers to be sent in `astro dev` and `astro preview`.
*/
headers?: OutgoingHttpHeaders;

/**
* @name server.open
* @type {boolean}
* @default `false`
* @version 2.1.8
* @description
* Control whether the dev server should open in your browser window on startup.
*
* ```js
* {
* server: { open: true }
* }
* ```
*/
open?: boolean;
};

export interface ViteUserConfig extends vite.UserConfig {
Expand Down Expand Up @@ -878,6 +894,21 @@ export interface AstroUserConfig {
* ```
*/

/**
* @name server.open
* @type {boolean}
* @default `false`
* @version 2.1.8
* @description
* Control whether the dev server should open in your browser window on startup.
*
* ```js
* {
* server: { open: true }
* }
* ```
*/

/**
* @docs
* @name server.headers
Expand Down

0 comments on commit 2b34fc4

Please sign in to comment.