fix: document open
option (#7418)
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
This commit is contained in:
parent
89a4835202
commit
2b34fc4928
2 changed files with 36 additions and 0 deletions
5
.changeset/sour-teachers-kiss.md
Normal file
5
.changeset/sour-teachers-kiss.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Correctly type the option `server.open`
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue