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-06-20 18:54:47 +00:00
|
|
|
|
2023-07-30 05:00:51 +00:00
|
|
|
import type { User } from '@prisma/client';
|
2023-06-20 18:54:47 +00:00
|
|
|
|
2023-07-30 05:00:51 +00:00
|
|
|
type User = Omit<User, 'created_at' | 'updated_at'>;
|
2023-06-20 18:54:47 +00:00
|
|
|
|
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 {
|
2023-07-30 23:31:39 +00:00
|
|
|
flash?: { type: 'success' | 'error' | 'info'; message: string };
|
2023-05-29 06:34:39 +00:00
|
|
|
}
|
2023-05-21 05:18:04 +00:00
|
|
|
interface Locals {
|
2023-07-30 05:00:51 +00:00
|
|
|
auth: import('lucia').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-07-30 05:00:51 +00:00
|
|
|
/// <reference types="lucia" />
|
2023-05-21 05:18:04 +00:00
|
|
|
declare global {
|
|
|
|
|
namespace Lucia {
|
2023-07-30 05:00:51 +00:00
|
|
|
type Auth = import('$lib/server/lucia').Auth;
|
|
|
|
|
type DatabaseUserAttributes = User;
|
|
|
|
|
type DatabaseSessionAttributes = {};
|
2023-05-21 05:18:04 +00:00
|
|
|
}
|
2022-04-19 02:43:54 +00:00
|
|
|
}
|
2023-05-21 05:18:04 +00:00
|
|
|
|
|
|
|
|
// THIS IS IMPORTANT!!!
|
|
|
|
|
export {};
|