aboutsummaryrefslogtreecommitdiffstats
path: root/src/app.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.d.ts')
-rw-r--r--src/app.d.ts14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/app.d.ts b/src/app.d.ts
index cfeb8a5..4f96a65 100644
--- a/src/app.d.ts
+++ b/src/app.d.ts
@@ -1,11 +1,21 @@
// See https://svelte.dev/docs/kit/types#app.d.ts
+
+import type { authHandler } from './hooks.server';
+
// for information about these interfaces
-type Session = unknown;
declare global {
namespace App {
// interface Error {}
interface Locals {
- auth: () => Promise<Session | null>;
+ /**
+ * Undefined: not authorized
+ * Null: failed to validate/renew token
+ */
+ auth: () => Promise<Session | undefined | null>;
+ /**
+ * Removes Authentication Cookies
+ */
+ logout: () => void;
}
// interface PageData {}
// interface PageState {}