frontend/.pnpm-store/v3/files/3f/43681c436fd16ca75c459b72b63ce94e60a1a548e282a8294d2ed955caa1893386ad4d0c84a5492e22a5b0afc32270dea80e4561bcad12d07650d3b1891aa2

40 lines
1.6 KiB
Plaintext

import type { FormatXMLElementFn, Formats } from 'intl-messageformat';
export interface LocaleDictionary {
[key: string]: LocaleDictionary | string | Array<string | LocaleDictionary>;
}
export declare type LocalesDictionary = {
[key: string]: LocaleDictionary;
};
export declare type InterpolationValues = Record<string, string | number | boolean | Date | FormatXMLElementFn<unknown> | null | undefined> | undefined;
export interface MessageObject {
id?: string;
locale?: string;
format?: string;
default?: string;
values?: InterpolationValues;
}
export declare type MessageFormatter = (id: string | MessageObject, options?: MessageObject) => string;
export declare type TimeFormatter = (d: Date | number, options?: IntlFormatterOptions<Intl.DateTimeFormatOptions>) => string;
export declare type DateFormatter = (d: Date | number, options?: IntlFormatterOptions<Intl.DateTimeFormatOptions>) => string;
export declare type NumberFormatter = (d: number, options?: IntlFormatterOptions<Intl.NumberFormatOptions>) => string;
export declare type JSONGetter = <T>(id: string, locale?: string) => T;
declare type IntlFormatterOptions<T> = T & {
format?: string;
locale?: string;
};
export interface MemoizedIntlFormatter<T, U> {
(options?: IntlFormatterOptions<U>): T;
}
export interface MessagesLoader {
(): Promise<any>;
}
export interface ConfigureOptions {
fallbackLocale: string;
formats?: Partial<Formats>;
initialLocale?: string;
loadingDelay?: number;
warnOnMissingMessages?: boolean;
ignoreTag?: boolean;
}
export {};