@pierre/diffs
Version:
1 lines • 1.55 kB
Source Map (JSON)
{"version":3,"file":"parsePatchFiles.d.ts","names":["FileContents","FileDiffMetadata","ParsedPatch","processPatch","ProcessFileOptions","processFile","parsePatchFiles"],"sources":["../../src/utils/parsePatchFiles.d.ts"],"sourcesContent":["import type { FileContents, FileDiffMetadata, ParsedPatch } from '../types';\nexport declare function processPatch(data: string, cacheKeyPrefix?: string, throwOnError?: boolean): ParsedPatch;\ninterface ProcessFileOptions {\n cacheKey?: string;\n isGitDiff?: boolean;\n oldFile?: FileContents;\n newFile?: FileContents;\n throwOnError?: boolean;\n}\nexport declare function processFile(fileDiffString: string, options?: ProcessFileOptions): FileDiffMetadata | undefined;\n/**\n * Parses a patch file string into an array of parsed patches.\n *\n * @param data - The raw patch file content (supports multi-commit patches)\n * @param cacheKeyPrefix - Optional prefix for generating cache keys. When provided,\n * each file in the patch will get a cache key in the format `prefix-patchIndex-fileIndex`.\n * This enables caching of rendered diff results in the worker pool.\n */\nexport declare function parsePatchFiles(data: string, cacheKeyPrefix?: string, throwOnError?: boolean): ParsedPatch[];\nexport {};\n//# sourceMappingURL=parsePatchFiles.d.ts.map"],"mappings":";;;iBACwBG,YAAAA,iEAA6ED;UAC3FE,kBAAAA;EADcD,QAAAA,CAAAA,EAAAA,MAAY;EAC1BC,SAAAA,CAAAA,EAAAA,OAAAA;EAOcC,OAAAA,CAAAA,EAJVL,YAIqB;EASXM,OAAAA,CAAAA,EAZVN,YAYyB;;;iBATfK,WAAAA,mCAA8CD,qBAAqBH;;;;;;;;;iBASnEK,eAAAA,iEAAgFJ"}