import { type FormattedPart, type CompiledFormat } from './format.js'; import { type TemporalLike, type FormatOptions } from './tokens.js'; export type TokenHandler = (t: TemporalLike, locale: string) => string; export type TokenField = keyof TemporalLike; export interface CustomToken { name: string; handler: TokenHandler; field: TokenField; } export interface FormatterOptions { tokens?: CustomToken[]; defaultLocale?: string; } export interface Formatter { format(temporal: TemporalLike, formatStr: string, options?: FormatOptions): string; formatToParts(temporal: TemporalLike, formatStr: string, options?: FormatOptions): FormattedPart[]; compileFormat(formatStr: string): CompiledFormat; } export declare function createFormatter(options?: FormatterOptions): Formatter;