import { ComponentHost } from '../core'; import type { FC, JNode } from '../jsx'; export type TFn = (params: Record) => string; export type Dict = Record; export type DictStore = Record; export type DictLoaderFn = (locale: string) => Promise; type OnChangeFn = (locale: string) => void; export declare function intlWatchLocale(onChange: OnChangeFn, immediate?: boolean): () => boolean; export declare function intlGetLocale(): string; export declare function intlSetLocale(locale: string): Promise; export declare function intlInit(options: { defaultLocale: string; dicts?: DictStore; dictLoader?: DictLoaderFn; }): Promise; export interface TOptions { key: string; } export declare function t(defaultText: string, params?: Record JNode)>, options?: TOptions): string; /** * 给模板编译器生成的代码使用的渲染函数。 */ export declare function renderIntlText(host: ComponentHost, pushRoot: boolean, key: string, defaultText?: string): Text; /** * 给模板编译器生成的代码使用的渲染函数。 */ export declare function renderIntlTextWithParams(host: ComponentHost, pushRoot: boolean, key: string, params: Record, defaultText?: string): Text; export declare function renderIntlRichText(host: ComponentHost, pushRoot: boolean, key: string, params?: Record, defaultText?: string): (Node | ComponentHost)[]; export {};