Files
familienarchiv/frontend/src/app.d.ts
2026-05-17 09:40:12 +02:00

38 lines
635 B
TypeScript

// src/app.d.ts
declare global {
namespace App {
// Define the User structure matching your Java Entity
interface User {
id: string;
firstName?: string;
lastName?: string;
birthDate?: string;
email: string;
contact?: string;
groups: {
id: string;
name: string;
permissions: string[];
}[];
enabled: boolean;
createdAt: string;
}
interface Locals {
user?: User; // locals.user is optional (undefined if not logged in)
}
interface PageData {
user?: User; // Available in $page.data.user
}
interface Error {
message: string;
errorId?: string;
}
}
}
export {};