mirror of
https://github.com/BradNut/boredgame
synced 2025-09-08 17:40:22 +00:00
44 lines
1.3 KiB
TypeScript
44 lines
1.3 KiB
TypeScript
import type { ApiClient } from '$lib/server/api';
|
|
import type { Users } from '$lib/server/api/databases/postgres/tables';
|
|
import type { parseApiResponse } from '$lib/utils/api';
|
|
|
|
// See https://svelte.dev/docs/kit/types#app.d.ts
|
|
// for information about these interfaces
|
|
declare global {
|
|
namespace App {
|
|
interface PageData {
|
|
flash?: {
|
|
type: 'success' | 'error' | 'info';
|
|
message: string;
|
|
data?: Record<string, unknown>;
|
|
};
|
|
}
|
|
interface Locals {
|
|
api: ApiClient['api'];
|
|
parseApiResponse: typeof parseApiResponse;
|
|
getAuthedUser: () => Promise<Returned<Users> | null>;
|
|
getAuthedUserOrThrow: () => Promise<Returned<User>>;
|
|
}
|
|
namespace Superforms {
|
|
type Message = {
|
|
type: 'error' | 'success' | 'info';
|
|
text: string;
|
|
};
|
|
}
|
|
interface Error {
|
|
code?: string;
|
|
errorId?: string;
|
|
}
|
|
}
|
|
|
|
interface Document {
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
startViewTransition: (callback: never) => void; // Add your custom property/method here
|
|
}
|
|
}
|
|
|
|
// THIS IS IMPORTANT!!!
|
|
// biome-ignore lint/complexity/noUselessEmptyExport: <explanation>
|
|
// biome-ignore lint/style/useExportType: <explanation>
|
|
export {};
|