summaryrefslogtreecommitdiff
path: root/app/src/app.d.ts
diff options
context:
space:
mode:
authorLinnnus <[email protected]>2025-02-17 20:28:59 +0100
committerLinnnus <[email protected]>2025-02-17 20:28:59 +0100
commit2b309097ca145651618234476160fb30405eabe7 (patch)
tree20321cf83d18c0c3c3a0a745626565074ea69a41 /app/src/app.d.ts
Initial commit
Diffstat (limited to 'app/src/app.d.ts')
-rw-r--r--app/src/app.d.ts27
1 files changed, 27 insertions, 0 deletions
diff --git a/app/src/app.d.ts b/app/src/app.d.ts
new file mode 100644
index 0000000..7844a85
--- /dev/null
+++ b/app/src/app.d.ts
@@ -0,0 +1,27 @@
+import type { User } from "$lib/server/users";
+import type { PoolClient } from "pg";
+
+// See https://svelte.dev/docs/kit/types#app.d.ts
+// for information about these interfaces
+declare global {
+ namespace App {
+ // interface Error {}
+ interface Locals {
+ dbConn: PoolClient;
+
+ /**
+ * The user, if they are logged in.
+ *
+ * Each page (or group) must have a `load` handler (in `+page.server.ts`) which
+ * ensures that `user` is defined, optionally redirecting to `/login?redirectTo`
+ * if they need to ensure this is defined.
+ */
+ user?: User;
+ }
+ // interface PageData {}
+ // interface PageState {}
+ // interface Platform {}
+ }
+}
+
+export {};