blob: d9d7e4499b1b4ec57940d0470f633671a2fb8546 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
import type { defaultLocale } from '$i18n/locales';
import type Locale from './Locale';
export type Translation<Params> = (params: { [key in keyof Params]: string }) => string;
export type TranslationsDictionary<Raw> = {
[key in keyof Raw]: {
[locale in Locale]?: Translation<Parameters<Raw[key][typeof defaultLocale]>[0]>;
} & {
[locale in typeof defaultLocale]: Translation<Parameters<Raw[key][typeof defaultLocale]>[0]>;
};
};
|