summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/sour-teachers-kiss.md5
-rw-r--r--packages/astro/src/@types/astro.ts31
2 files changed, 36 insertions, 0 deletions
diff --git a/.changeset/sour-teachers-kiss.md b/.changeset/sour-teachers-kiss.md
new file mode 100644
index 000000000..3e280de08
--- /dev/null
+++ b/.changeset/sour-teachers-kiss.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Correctly type the option `server.open`
diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts
index 59594446c..a3fcdcedd 100644
--- a/packages/astro/src/@types/astro.ts
+++ b/packages/astro/src/@types/astro.ts
@@ -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 {
@@ -879,6 +895,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
* @typeraw {OutgoingHttpHeaders}