/** * Format detection utilities for module loaders */ import type { ModuleFormat, ModuleFormatDetector } from "../types"; /** * Default format detector based on URL patterns and environment capabilities */ export declare class DefaultFormatDetector implements ModuleFormatDetector { /** * Detect module format from URL or content analysis */ detectFormat(urlOrContent: string): Promise; /** * Detect format from URL patterns */ private detectFromUrl; /** * Detect optimal format based on environment capabilities */ private detectFromEnvironment; /** * Check if a specific format is supported in the current environment */ isFormatSupported(format: ModuleFormat): boolean; /** * Get optimal format from a list of available formats */ getOptimalFormat(availableFormats: ModuleFormat[]): ModuleFormat; /** * Check if ESM is supported in the current environment */ private supportsESM; } /** * Content-based format detector that analyzes module content */ export declare class ContentBasedFormatDetector implements ModuleFormatDetector { /** * Detect format by analyzing the actual module content */ detectFormat(content: string): Promise; /** * Check if format is supported */ isFormatSupported(format: ModuleFormat): boolean; /** * Get optimal format from available formats */ getOptimalFormat(availableFormats: ModuleFormat[]): ModuleFormat; /** * Detect ESM patterns in content */ private hasESMPatterns; /** * Detect UMD patterns in content */ private hasUMDPatterns; /** * Detect CommonJS patterns in content */ private hasCJSPatterns; /** * Detect AMD patterns in content */ private hasAMDPatterns; /** * Detect IIFE patterns in content */ private hasIIFEPatterns; } //# sourceMappingURL=format-detector.d.ts.map