/** * Source Map Handler * Handles TypeScript to JavaScript mapping for breakpoints */ export interface SourcePosition { source: string; line: number; column: number; } export interface MappedPosition { generatedLine: number; generatedColumn: number; originalLine: number; originalColumn: number; source: string; } interface LoadError { scriptUrl: string; error: string; timestamp: number; } export declare class SourceMapHandler { private sourceMaps; private pendingSourceMaps; private loadingPromises; private lastErrors; private clearing; /** * Register a source map URL for lazy loading (does not load immediately) */ registerSourceMap(scriptUrl: string, sourceMapURL: string): void; /** * Load a source map from a file (with size limit) */ loadSourceMap(generatedFilePath: string): Promise; /** * Find a matching source in a source map using proper path comparison */ private findMatchingSource; /** * Normalize a path for comparison */ private normalizePath; /** * Map a TypeScript position to JavaScript position (for setting breakpoints) */ mapToGenerated(originalSource: string, originalLine: number, originalColumn?: number): Promise<{ generatedFile: string; line: number; column: number; } | null>; /** * Map a JavaScript position to TypeScript position (for displaying location) */ mapToOriginal(generatedFile: string, generatedLine: number, generatedColumn?: number): Promise; /** * Load source map from URL or data URI (with proper concurrency handling) */ loadSourceMapFromURL(scriptUrl: string, sourceMapURL: string): Promise; /** * Internal: Actually load the source map */ private doLoadSourceMap; /** * Parse source map JSON with error tracking */ private parseSourceMapJSON; /** * Record an error for later inspection */ private recordError; /** * Get recent source map loading errors (for debugging) */ getRecentErrors(): LoadError[]; /** * Clear error history */ clearErrors(): void; /** * Register source maps from a directory for lazy loading (does NOT eagerly load) */ registerSourceMapsFromDirectory(directory: string): Promise; /** * Force reload a source map (clear and re-register for lazy loading) */ forceReload(scriptUrl: string, sourceMapURL?: string): void; /** * Clear all loaded and pending source maps (safe for concurrent operations) */ clear(): void; /** * Clear a specific source map (loaded or pending) */ clearSourceMap(scriptUrl: string): boolean; /** * Get all loaded source map files */ getLoadedSourceMaps(): string[]; /** * Check if a source map is loaded or registered for a given file */ hasSourceMap(file: string): boolean; /** * Check if a source map is actually loaded (not just registered) */ isSourceMapLoaded(file: string): boolean; /** * Get all registered (pending) source map URLs */ getPendingSourceMaps(): string[]; } export {}; //# sourceMappingURL=sourcemap-handler.d.ts.map