1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-04 02:46:47 +01:00
immich/web/src/app.d.ts
Ben e98acc976e
chore: move weblate translations to root directory (#13604)
* chore: move translations to root directory

* chore: update build processes to work with new i18n location
2024-10-22 15:39:28 +00:00

57 lines
1.4 KiB
TypeScript

/// <reference types="@sveltejs/kit" />
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
declare namespace App {
interface PageData {
meta: {
title: string;
description?: string;
imageUrl?: string;
};
}
interface Error {
message: string;
stack?: string;
code?: string | number;
}
}
declare module '$env/static/public' {
export const PUBLIC_IMMICH_PAY_HOST: string;
export const PUBLIC_IMMICH_BUY_HOST: string;
}
interface Element {
// Make optional, because it's unavailable on iPhones.
requestFullscreen?(options?: FullscreenOptions): Promise<void>;
}
import type en from '$lib/en.json';
import 'svelte-i18n';
type NestedKeys<T, K = keyof T> = K extends keyof T & string
? `${K}` | (T[K] extends object ? `${K}.${NestedKeys<T[K]>}` : never)
: never;
declare module 'svelte-i18n' {
import type { InterpolationValues } from '$lib/components/i18n/format-message.svelte';
import type { Readable } from 'svelte/store';
type Translations = NestedKeys<typeof en>;
interface MessageObject {
id: Translations;
locale?: string;
format?: string;
default?: string;
values?: InterpolationValues;
}
type MessageFormatter = (id: Translations | MessageObject, options?: Omit<MessageObject, 'id'>) => string;
const format: Readable<MessageFormatter>;
const t: Readable<MessageFormatter>;
const _: Readable<MessageFormatter>;
}