UNPKG

@backtrace/sourcemap-tools

Version:
15 lines (14 loc) 949 B
import { RawSourceMap } from 'source-map'; import { SourceProcessor } from '../SourceProcessor'; import { ZipArchive } from '../ZipArchive'; import { AssetWithContent, AssetWithDebugId } from '../models/Asset'; import { Result } from '../models/Result'; type AssetWithDebugIdAndSourceMap = AssetWithContent<RawSourceMap> & AssetWithDebugId; export interface ArchiveWithSourceMapsAndDebugIds { readonly archive: ZipArchive; readonly assets: AssetWithDebugIdAndSourceMap[]; } export declare function createArchive(sourceProcessor: SourceProcessor): (assets: AssetWithContent<RawSourceMap>[]) => Result<ArchiveWithSourceMapsAndDebugIds, string>; export declare function finalizeArchive(archive: ArchiveWithSourceMapsAndDebugIds): Promise<ArchiveWithSourceMapsAndDebugIds>; export declare function readDebugId(sourceProcessor: SourceProcessor): (asset: AssetWithContent<RawSourceMap>) => Result<AssetWithDebugIdAndSourceMap, string>; export {};