2022-04-19 02:43:54 +00:00
|
|
|
// See https://kit.svelte.dev/docs/types#app
|
|
|
|
|
// for information about these interfaces
|
2022-07-07 19:30:14 +00:00
|
|
|
// and what to do when importing types
|
2023-05-21 05:18:04 +00:00
|
|
|
// src/app.d.ts
|
|
|
|
|
declare global {
|
|
|
|
|
namespace App {
|
2023-05-29 06:34:39 +00:00
|
|
|
interface PageData {
|
|
|
|
|
flash?: { type: 'success' | 'error'; message: string };
|
|
|
|
|
}
|
2023-05-21 05:18:04 +00:00
|
|
|
interface Locals {
|
|
|
|
|
auth: import('lucia-auth').AuthRequest;
|
2023-06-16 06:28:49 +00:00
|
|
|
prisma: PrismaClient;
|
2023-05-21 05:18:04 +00:00
|
|
|
user: Lucia.UserAttributes;
|
2023-05-29 06:34:39 +00:00
|
|
|
startTimer: number;
|
|
|
|
|
error: string;
|
|
|
|
|
errorId: string;
|
|
|
|
|
errorStackTrace: string;
|
|
|
|
|
message: unknown;
|
|
|
|
|
track: unknown;
|
|
|
|
|
}
|
|
|
|
|
interface Error {
|
|
|
|
|
code?: string;
|
|
|
|
|
errorId?: string;
|
2023-05-21 05:18:04 +00:00
|
|
|
}
|
2022-09-29 22:22:01 +00:00
|
|
|
}
|
2023-05-21 05:18:04 +00:00
|
|
|
}
|
2022-09-29 22:22:01 +00:00
|
|
|
|
2023-05-21 05:18:04 +00:00
|
|
|
// interface PageData {}
|
|
|
|
|
// interface Error {}
|
|
|
|
|
// interface Platform {}
|
2022-09-29 22:22:01 +00:00
|
|
|
|
2023-05-21 05:18:04 +00:00
|
|
|
/// <reference types="lucia-auth" />
|
|
|
|
|
declare global {
|
|
|
|
|
namespace Lucia {
|
|
|
|
|
type Auth = import('$lib/lucia').Auth;
|
|
|
|
|
type UserAttributes = {
|
|
|
|
|
email: string;
|
|
|
|
|
username: string;
|
|
|
|
|
firstName: string;
|
|
|
|
|
lastName: string;
|
|
|
|
|
role: string;
|
|
|
|
|
verified: boolean;
|
|
|
|
|
receiveEmail: boolean;
|
|
|
|
|
token: string;
|
|
|
|
|
};
|
|
|
|
|
}
|
2022-04-19 02:43:54 +00:00
|
|
|
}
|
2023-05-21 05:18:04 +00:00
|
|
|
|
|
|
|
|
// THIS IS IMPORTANT!!!
|
|
|
|
|
export {};
|