react-intl-phraseapp
Version:
The In-Context-Editor for react using react-intl
33 lines (32 loc) • 3.47 kB
TypeScript
export declare function useSSRIntl({ locale, messages }: {
locale: any;
messages: any;
}): {
formatMessage: (...args: any[]) => string;
formatters: import("@formatjs/intl").Formatters;
locale: string;
timeZone?: string;
fallbackOnEmptyString?: boolean;
formats: import("@formatjs/intl").CustomFormats;
messages: Record<string, string> | Record<string, import("react-intl").MessageFormatElement[]>;
defaultLocale: string;
defaultFormats: import("@formatjs/intl").CustomFormats;
defaultRichTextElements?: Record<string, import("intl-messageformat").FormatXMLElementFn<string>>;
onError: import("@formatjs/intl").OnErrorFn;
onWarn?: import("@formatjs/intl").OnWarnFn;
formatDateTimeRange(this: void, from: Parameters<Intl.DateTimeFormat["formatRange"]>[0] | string, to: Parameters<Intl.DateTimeFormat["formatRange"]>[1] | string, opts?: import("@formatjs/intl").FormatDateTimeRangeOptions): string;
formatDate(this: void, value: Parameters<Intl.DateTimeFormat["format"]>[0] | string, opts?: import("@formatjs/intl").FormatDateOptions): string;
formatTime(this: void, value: Parameters<Intl.DateTimeFormat["format"]>[0] | string, opts?: import("@formatjs/intl").FormatDateOptions): string;
formatDateToParts(this: void, value: Parameters<Intl.DateTimeFormat["format"]>[0] | string, opts?: import("@formatjs/intl").FormatDateOptions): Intl.DateTimeFormatPart[];
formatTimeToParts(this: void, value: Parameters<Intl.DateTimeFormat["format"]>[0] | string, opts?: import("@formatjs/intl").FormatDateOptions): Intl.DateTimeFormatPart[];
formatRelativeTime(this: void, value: Parameters<Intl.RelativeTimeFormat["format"]>[0], unit?: Parameters<Intl.RelativeTimeFormat["format"]>[1], opts?: import("@formatjs/intl").FormatRelativeTimeOptions): string;
formatNumber(this: void, value: Parameters<Intl.NumberFormat["format"]>[0], opts?: import("@formatjs/intl").FormatNumberOptions): string;
formatNumberToParts(this: void, value: Parameters<Intl.NumberFormat["format"]>[0], opts?: import("@formatjs/intl").FormatNumberOptions): Intl.NumberFormatPart[];
formatPlural(this: void, value: Parameters<Intl.PluralRules["select"]>[0], opts?: import("@formatjs/intl").FormatPluralOptions): ReturnType<Intl.PluralRules["select"]>;
$t(this: void, descriptor: import("@formatjs/intl").MessageDescriptor, values?: Record<string, import("intl-messageformat").PrimitiveType | import("intl-messageformat").FormatXMLElementFn<string, string>>, opts?: import("intl-messageformat").Options): string;
$t<T extends string>(this: void, descriptor: import("@formatjs/intl").MessageDescriptor, values?: Record<string, import("intl-messageformat").PrimitiveType | T | import("intl-messageformat").FormatXMLElementFn<T>>, opts?: import("intl-messageformat").Options): string | T | (string | T)[];
formatList(this: void, values: ReadonlyArray<string>, opts?: import("@formatjs/intl").FormatListOptions): string;
formatList<T extends string>(this: void, values: readonly (string | T)[], opts?: import("@formatjs/intl").FormatListOptions): string | T | (string | T)[];
formatListToParts<T extends string>(this: void, values: readonly (string | T)[], opts?: import("@formatjs/intl").FormatListOptions): import("@formatjs/intl").Part[];
formatDisplayName(this: void, value: Parameters<Intl.DisplayNames["of"]>[0], opts: import("@formatjs/intl").FormatDisplayNameOptions): string | undefined;
};