aboutsummaryrefslogtreecommitdiff
path: root/doc/modules
diff options
context:
space:
mode:
Diffstat (limited to 'doc/modules')
-rw-r--r--doc/modules/App.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/modules/App.md b/doc/modules/App.md
new file mode 100644
index 0000000..f622f15
--- /dev/null
+++ b/doc/modules/App.md
@@ -0,0 +1,30 @@
+[forum](../README.md) / [Exports](../modules.md) / App
+
+# Namespace: App
+
+It's possible to tell SvelteKit how to type objects inside your app by declaring the `App` namespace. By default, a new project will have a file called `src/app.d.ts` containing the following:
+
+```ts
+/// <reference types="@sveltejs/kit" />
+
+declare namespace App {
+ interface Locals {}
+
+ interface Platform {}
+
+ interface Session {}
+
+ interface Stuff {}
+}
+```
+
+By populating these interfaces, you will gain type safety when using `event.locals`, `event.platform`, `session` and `stuff`:
+
+## Table of contents
+
+### Interfaces
+
+- [Locals](../interfaces/App.Locals.md)
+- [Platform](../interfaces/App.Platform.md)
+- [Session](../interfaces/App.Session.md)
+- [Stuff](../interfaces/App.Stuff.md)