aboutsummaryrefslogtreecommitdiff
path: root/doc/modules/App.md
blob: f622f15e48be6854abd4866b596ad096b70edabc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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)