From e1fb0fa27097566c8fa5e792f965c29fc050b837 Mon Sep 17 00:00:00 2001 From: Kevin Brey Date: Tue, 16 Jul 2024 07:38:30 -0500 Subject: [PATCH] docs: show usage with `satisfies` operator (#17643) --- docs/config/index.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/config/index.md b/docs/config/index.md index e599295b3bd80b..a70cb03e255de6 100644 --- a/docs/config/index.md +++ b/docs/config/index.md @@ -44,7 +44,15 @@ export default defineConfig({ }) ``` -Vite also directly supports TS config files. You can use `vite.config.ts` with the `defineConfig` helper as well. +Vite also supports TypeScript config files. You can use `vite.config.ts` with the `defineConfig` helper function above, or with the `satisfies` operator: + +```ts +import type { UserConfig } from 'vite' + +export default { + // ... +} satisfies UserConfig +``` ## Conditional Config