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-11-07 00:36:51 +00:00
|
|
|
import type { PrismaClient, 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-12-15 01:53:15 +00:00
|
|
|
user: import('lucia').User | null;
|
2023-11-07 00:36:51 +00:00
|
|
|
prisma: PrismaClient;
|
2023-05-29 06:34:39 +00:00
|
|
|
startTimer: number;
|
|
|
|
|
error: string;
|
|
|
|
|
errorId: string;
|
|
|
|
|
errorStackTrace: string;
|
|
|
|
|
message: unknown;
|
|
|
|
|
track: unknown;
|
2023-10-17 09:28:53 +00:00
|
|
|
session: {
|
|
|
|
|
ip: string,
|
|
|
|
|
country: string
|
|
|
|
|
}
|
2023-05-29 06:34:39 +00:00
|
|
|
}
|
|
|
|
|
interface Error {
|
|
|
|
|
code?: string;
|
|
|
|
|
errorId?: string;
|
2023-05-21 05:18:04 +00:00
|
|
|
}
|
2022-09-29 22:22:01 +00:00
|
|
|
}
|
2023-11-05 06:20:34 +00:00
|
|
|
|
|
|
|
|
interface Document {
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
|
|
|
startViewTransition: (callback: any) => void; // Add your custom property/method here
|
|
|
|
|
}
|
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-12-15 01:53:15 +00:00
|
|
|
// /// <reference types="lucia" />
|
|
|
|
|
// declare global {
|
|
|
|
|
// namespace Lucia {
|
|
|
|
|
// type Auth = import('$lib/server/lucia').Auth;
|
|
|
|
|
// type DatabaseUserAttributes = User;
|
|
|
|
|
// type DatabaseSessionAttributes = {};
|
|
|
|
|
// }
|
|
|
|
|
// }
|
2023-05-21 05:18:04 +00:00
|
|
|
|
|
|
|
|
// THIS IS IMPORTANT!!!
|
|
|
|
|
export {};
|