declare module "transliter" { export interface TransliterateOptions { standard?: "iso9" | "bgn-pcgn" | "gost" | "simple" | string; } export interface SlugifyOptions { separator?: string; standard?: "iso9" | "bgn-pcgn" | "gost" | "simple" | string; lowercase?: boolean; trim?: boolean; remove?: RegExp; } export interface StandardInfo { name: string; description: string; map?: Record; } /** * Transliterate cyrillic text to latin using specified standard * @param text - Text to transliterate * @param standard - Standard name: 'iso9', 'bgn-pcgn', 'gost', 'simple', or custom standard name * @returns Transliterated text */ export function transliterate(text: string, standard?: string): string; /** * Get information about available transliteration standards * @returns Object with standard names as keys and their info as values */ export function getStandards(): Record; /** * Get details about a specific standard * @param standard - Standard name * @returns Standard details or null if not found */ export function getStandard(standard: string): StandardInfo | null; /** * Add a custom transliteration standard * @param name - Standard identifier * @param standard - Standard object with {name, description, map} */ export function addStandard(name: string, standard: StandardInfo): void; /** * Generate URL slug from text * @param text - Text to convert to slug * @param options - Configuration options * @returns Generated slug */ export function slugify( text: string, options?: SlugifyOptions | string, ): string; /** * Generate slug with custom character replacement (backward compatibility) * @param text - Text to convert to slug * @param separator - Separator character * @returns Generated slug */ export function slugifySimple(text: string, separator?: string): string; /** * Generate slug using ISO 9 standard * @param text - Text to convert to slug * @param separator - Separator character * @returns Generated slug */ export function slugifyIso9(text: string, separator?: string): string; /** * Generate slug using BGN/PCGN standard * @param text - Text to convert to slug * @param separator - Separator character * @returns Generated slug */ export function slugifyBgnPcgn(text: string, separator?: string): string; /** * Generate slug using GOST standard * @param text - Text to convert to slug * @param separator - Separator character * @returns Generated slug */ export function slugifyGost(text: string, separator?: string): string; /** * Detect if text contains Cyrillic characters * @param text - Text to check * @param language - Specific language to check for: 'any', 'russian', 'ukrainian', 'bulgarian', 'macedonian', 'serbian' * @returns True if text contains Cyrillic characters */ export function isCyrillic(text: string, language?: string): boolean; /** * Detect specific Cyrillic language * @param text - Text to check * @param language - Language code: 'russian', 'ukrainian', 'bulgarian', 'bulgarian', 'macedonian', 'serbian' * @returns True if text contains characters specific to that language */ export function isCyrillicLanguage(text: string, language: string): boolean; /** * Get the percentage of Cyrillic characters in text * @param text - Text to analyze * @returns Percentage (0-100) of Cyrillic characters */ export function isCyrillicPercentage(text: string): number; /** * Detect which Cyrillic languages are present in the text * @param text - Text to analyze * @returns Array of language codes present in the text */ export function detectCyrillicLanguages(text: string): string[]; // Main export object for backward compatibility export const transliter: { (text: string, standard?: string): string; getStandards: () => Record; getStandard: (standard: string) => StandardInfo | null; addStandard: (name: string, standard: StandardInfo) => void; }; export { transliter as default }; }