fix: document open option (#7418)

Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
This commit is contained in:
Emanuele Stoppa 2023-06-20 15:24:29 +01:00 committed by GitHub
parent 89a4835202
commit 2b34fc4928
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Correctly type the option `server.open`

View file

@ -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 {
@ -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