TofuStack/src/app.d.ts

31 lines
741 B
TypeScript
Raw Normal View History

2024-05-25 06:02:26 +00:00
import { ApiClient } from '$lib/server/api';
import type { User } from 'lucia';
2024-06-25 16:14:45 +00:00
import { parseApiResponse } from '$lib/utils/api'
import type { Security } from '$lib/utils/security';
2024-05-25 06:02:26 +00:00
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
interface Locals {
api: ApiClient['api'];
2024-06-25 02:45:00 +00:00
parseApiResponse: typeof parseApiResponse;
getAuthedUser: () => Promise<Returned<User> | null>;
getAuthedUserOrThrow: () => Promise<Returned<User>>;
2024-05-25 06:02:26 +00:00
}
2024-06-25 16:14:45 +00:00
2024-05-25 06:02:26 +00:00
// interface PageData {}
// interface PageState {}
// interface Platform {}
2024-06-25 02:45:00 +00:00
namespace Superforms {
2024-06-25 16:14:45 +00:00
type Message = {
type: 'error' | 'success',
text: string
}
}
2024-05-25 06:02:26 +00:00
}
}
2024-06-25 16:14:45 +00:00
export { };