Files
NapCatQQ/.pnpm-store/v3/files/f1/213e038f97817e1816d4daa4b792069ebf09be4841da55488eac1c0cee9f6efdeea3242af2503f5463d889292e3f4446a90bd8c2759874db977dff345155a5
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

27 lines
1.3 KiB
Plaintext

import { MessageFormatElement, parse, ParserOptions } from '@formatjs/icu-messageformat-parser';
import { Formats, Formatters, FormatXMLElementFn, MessageFormatPart, PrimitiveType } from './formatters';
export interface Options extends Omit<ParserOptions, 'locale'> {
formatters?: Formatters;
}
export declare class IntlMessageFormat {
private readonly ast;
private readonly locales;
private readonly resolvedLocale?;
private readonly formatters;
private readonly formats;
private readonly message;
private readonly formatterCache;
constructor(message: string | MessageFormatElement[], locales?: string | string[], overrideFormats?: Partial<Formats>, opts?: Options);
format: <T = void>(values?: Record<string, PrimitiveType | T | FormatXMLElementFn<T>>) => string | T | (string | T)[];
formatToParts: <T>(values?: Record<string, PrimitiveType | T | FormatXMLElementFn<T>>) => MessageFormatPart<T>[];
resolvedOptions: () => {
locale: string;
};
getAst: () => MessageFormatElement[];
private static memoizedDefaultLocale;
static get defaultLocale(): string;
static resolveLocale: (locales: string | string[]) => Intl.Locale | undefined;
static __parse: typeof parse | undefined;
static formats: Formats;
}