import type { Either } from './either.ts'; /** * String representation of a locale. */ export type Locale = string | `${string}-${string}` | `${string}-${string}-${string}`; /** * @deprecated Use Locale instead */ export type LocaleString = Locale; /** * Object representation of a locale. */ export type LocaleObject = { language: string; script?: string; region?: string; }; export type LanguageDirection = 'ltr' | 'rtl'; /** * Verify that `tag` is a valid locale code and all parts of it is in our lists of supported values. */ export declare const isSupportedLocale: (tag: Locale) => boolean; /** * Determine if `tag` is part of our standard locales. */ export declare const isStandardLocale: (tag: Locale) => boolean; /** * Turn LocaleObject into LocaleString. */ export declare const stringifyLocale: (obj: LocaleObject) => Locale; /** * Parse locale string into object. * * @throws {RangeError} If locale is structurally invalid or values are not in our supported values */ export declare const parseLocale: (tag: Locale) => Either; export declare const normalizeLocale: (tag: Locale) => string | null; export declare const getLocaleDirection: (tag: Locale) => LanguageDirection | null;