a3f2c9906699afab068c0ceb060aecd2905c116bdee38ec9b5acedba6261b4b7c2204f64dfd5fee458cebab7ef9a1edd85102ec513133e96662890a5297fff 1.1 KB

1234567891011121314151617181920
  1. import SourceMap from './source-map';
  2. import type { SourceMapInput, SourceMapLoader, Options } from './types';
  3. export type { SourceMapSegment, EncodedSourceMap, EncodedSourceMap as RawSourceMap, DecodedSourceMap, SourceMapInput, SourceMapLoader, LoaderContext, Options, } from './types';
  4. export type { SourceMap };
  5. /**
  6. * Traces through all the mappings in the root sourcemap, through the sources
  7. * (and their sourcemaps), all the way back to the original source location.
  8. *
  9. * `loader` will be called every time we encounter a source file. If it returns
  10. * a sourcemap, we will recurse into that sourcemap to continue the trace. If
  11. * it returns a falsey value, that source file is treated as an original,
  12. * unmodified source file.
  13. *
  14. * Pass `excludeContent` to exclude any self-containing source file content
  15. * from the output sourcemap.
  16. *
  17. * Pass `decodedMappings` to receive a SourceMap with decoded (instead of
  18. * VLQ encoded) mappings.
  19. */
  20. export default function remapping(input: SourceMapInput | SourceMapInput[], loader: SourceMapLoader, options?: boolean | Options): SourceMap;