From 0fd85dd2847fba7930d0591003447cd1cf651ec4 Mon Sep 17 00:00:00 2001
From: Scott Wu <sw@scottwu.ca>
Date: Sat, 1 Feb 2025 08:45:56 +0800
Subject: [PATCH 1/2] Update 54-types.md

---
 documentation/docs/98-reference/54-types.md | 44 ++++++++++++++-------
 1 file changed, 29 insertions(+), 15 deletions(-)

diff --git a/documentation/docs/98-reference/54-types.md b/documentation/docs/98-reference/54-types.md
index eb76c2fa7ea3..be949178dd2c 100644
--- a/documentation/docs/98-reference/54-types.md
+++ b/documentation/docs/98-reference/54-types.md
@@ -127,15 +127,34 @@ The generated `.svelte-kit/tsconfig.json` file contains a mixture of options. So
 /// file: .svelte-kit/tsconfig.json
 {
 	"compilerOptions": {
-		"baseUrl": "..",
 		"paths": {
-			"$lib": "src/lib",
-			"$lib/*": "src/lib/*"
+			"$lib": ["../src/lib"],
+			"$lib/*": ["../src/lib/*"]
 		},
 		"rootDirs": ["..", "./types"]
 	},
-	"include": ["../src/**/*.js", "../src/**/*.ts", "../src/**/*.svelte"],
-	"exclude": ["../node_modules/**", "./**"]
+	"include": [
+		"ambient.d.ts",
+		"non-ambient.d.ts",
+		"./types/**/$types.d.ts",
+		"../vite.config.js",
+		"../vite.config.ts",
+		"../src/**/*.js",
+		"../src/**/*.ts",
+		"../src/**/*.svelte",
+		"../tests/**/*.js",
+		"../tests/**/*.ts",
+		"../tests/**/*.svelte"
+	],
+	"exclude": [
+		"../node_modules/**",
+		"../src/service-worker.js",
+		"../src/service-worker/**/*.js",
+		"../src/service-worker.ts",
+		"../src/service-worker/**/*.ts",
+		"../src/service-worker.d.ts",
+		"../src/service-worker/**/*.d.ts"
+	]
 }
 ```
 
@@ -145,26 +164,21 @@ Others are required for SvelteKit to work properly, and should also be left unto
 /// file: .svelte-kit/tsconfig.json
 {
 	"compilerOptions": {
-		// this ensures that types are explicitly
-		// imported with `import type`, which is
-		// necessary as svelte-preprocess cannot
-		// otherwise compile components correctly
-		"importsNotUsedAsValues": "error",
+		// ???
+		"verbatimModuleSyntax": true,
 
 		// Vite compiles one TypeScript module
 		// at a time, rather than compiling
 		// the entire module graph
 		"isolatedModules": true,
 
-		// TypeScript cannot 'see' when you
-		// use an imported value in your
-		// markup, so we need this
-		"preserveValueImports": true,
+		// ???
+		"noEmit": true,
 
 		// This ensures both `vite build`
 		// and `svelte-package` work correctly
 		"lib": ["esnext", "DOM", "DOM.Iterable"],
-		"moduleResolution": "node",
+		"moduleResolution": "bundler",
 		"module": "esnext",
 		"target": "esnext"
 	}

From 99830daf17037007fd63db2fbcbc6a245659fdda Mon Sep 17 00:00:00 2001
From: Simon H <5968653+dummdidumm@users.noreply.github.com>
Date: Mon, 3 Feb 2025 10:57:44 +0100
Subject: [PATCH 2/2] Apply suggestions from code review

---
 documentation/docs/98-reference/54-types.md | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/documentation/docs/98-reference/54-types.md b/documentation/docs/98-reference/54-types.md
index be949178dd2c..3fe236842fbc 100644
--- a/documentation/docs/98-reference/54-types.md
+++ b/documentation/docs/98-reference/54-types.md
@@ -164,7 +164,10 @@ Others are required for SvelteKit to work properly, and should also be left unto
 /// file: .svelte-kit/tsconfig.json
 {
 	"compilerOptions": {
-		// ???
+		// this ensures that types are explicitly
+		// imported with `import type`, which is
+		// necessary as Svelte/Vite cannot
+		// otherwise compile components correctly
 		"verbatimModuleSyntax": true,
 
 		// Vite compiles one TypeScript module
@@ -172,7 +175,7 @@ Others are required for SvelteKit to work properly, and should also be left unto
 		// the entire module graph
 		"isolatedModules": true,
 
-		// ???
+		// Tell TS it's used only for type-checking
 		"noEmit": true,
 
 		// This ensures both `vite build`