## API Report File for "metro-source-map"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts

import type {Node as Node_2} from '@babel/types';
import type {PluginObj} from '@babel/core';

export type BabelDecodedMap = {
  readonly mappings: ReadonlyArray<ReadonlyArray<BabelDecodedMapSegment>>;
  readonly names: ReadonlyArray<string>;
};

export type BabelSourceMapSegment = Readonly<{
  generated: Readonly<{column: number; line: number}>;
  original?: Readonly<{column: number; line: number}> | undefined;
  source?: null | undefined | string;
  name?: null | undefined | string;
}>;

export type BasicSourceMap = {
  readonly file?: string | undefined;
  readonly mappings: string;
  readonly names: Array<string>;
  readonly sourceRoot?: string | undefined;
  readonly sources: Array<string>;
  readonly sourcesContent?: Array<null | undefined | string> | undefined;
  readonly version: number;
  readonly x_facebook_offsets?: Array<number> | undefined;
  readonly x_metro_module_paths?: Array<string> | undefined;
  readonly x_facebook_sources?: FBSourcesArray | undefined;
  readonly x_facebook_segments?: FBSegmentMap | undefined;
  readonly x_hermes_function_offsets?: HermesFunctionOffsets | undefined;
  readonly x_google_ignoreList?: Array<number> | undefined;
};

export class BundleBuilder {
  constructor(file: string);
  append(code: string, map: null | undefined | MixedSourceMap): this;
  getCode(): string;
  getMap(): MixedSourceMap;
}

export function composeSourceMaps(maps: ReadonlyArray<MixedSourceMap>): MixedSourceMap;

export const Consumer: typeof DelegatingConsumer;

export type Consumer = typeof Consumer;

export function createIndexMap(file: null | undefined | string, sections: Array<IndexMapSection>): IndexMap;

export type FBSegmentMap = {[id: string]: MixedSourceMap};

export type FBSourceFunctionMap = {
  readonly names: ReadonlyArray<string>;
  readonly mappings: string;
};

export type FBSourceMetadata = [null | undefined | FBSourceFunctionMap];

export type FBSourcesArray = ReadonlyArray<null | undefined | FBSourceMetadata>;

export function fromRawMappings(modules: ReadonlyArray<RawMappingsModule>, offsetLines?: number): Generator_2;

export function fromRawMappingsIndexed(modules: ReadonlyArray<RawMappingsModule>, offsetLines?: number): IndexedSourceMapResult;

export function fromRawMappingsNonBlocking(modules: ReadonlyArray<RawMappingsModule>, offsetLines?: number): Promise<Generator_2>;

export function functionMapBabelPlugin(): PluginObj;

export function generateFunctionMap(ast: Node_2, context?: Context): FBSourceFunctionMap;

export type HermesFunctionOffsets = {
  [functionId: number]: ReadonlyArray<number>;
};

export interface IConsumer {
  eachMapping(callback: (mapping: Mapping) => unknown, context?: unknown, order?: IterationOrder): void;
  get file(): null | undefined | string;
  generatedMappings(): Iterable<Mapping>;
  originalPositionFor(generatedPosition: GeneratedPositionLookup): SourcePosition;
  sourceContentFor(source: string, nullOnMissing: true): null | undefined | string;
}

export type IndexMap = {
  readonly file?: string | undefined;
  readonly mappings?: void | undefined;
  readonly sourcesContent?: void | undefined;
  readonly sections: Array<IndexMapSection>;
  readonly version: number;
  readonly x_facebook_offsets?: Array<number> | undefined;
  readonly x_metro_module_paths?: Array<string> | undefined;
  readonly x_facebook_sources?: void | undefined;
  readonly x_facebook_segments?: FBSegmentMap | undefined;
  readonly x_hermes_function_offsets?: HermesFunctionOffsets | undefined;
  readonly x_google_ignoreList?: void | undefined;
};

export type IndexMapSection = {
  map: IndexMap | BasicSourceMap;
  offset: {line: number; column: number};
};

export function isVlqMap(map: (null | undefined | ReadonlyArray<MetroSourceMapSegmentTuple>) | VlqMap): map is VlqMap;

export type MetroSourceMapSegmentTuple = SourceMappingWithName | SourceMapping | GeneratedCodeMapping;

export type MixedSourceMap = IndexMap | BasicSourceMap;

export function normalizeSourcePath(sourceInput: string, map: {readonly sourceRoot?: null | undefined | string}): string;

export type RawMappingsModule = {
  readonly map: (null | undefined | ReadonlyArray<MetroSourceMapSegmentTuple>) | VlqMap;
  readonly functionMap: null | undefined | FBSourceFunctionMap;
  readonly path: string;
  readonly source: string;
  readonly code: string;
  readonly isIgnored: boolean;
  readonly lineCount?: number | undefined;
};

export interface SourceMapGenerator {
  toMap(file?: string, options?: {excludeSource?: boolean | undefined}): MixedSourceMap;
  toString(file?: string, options?: {excludeSource?: boolean | undefined}): string;
}

export function toBabelSegments(sourceMap: BasicSourceMap): Array<BabelSourceMapSegment>;

export function toSegmentTuple(mapping: BabelSourceMapSegment): MetroSourceMapSegmentTuple;

export function tuplesFromBabelDecodedMap(decodedMap: BabelDecodedMap): Array<MetroSourceMapSegmentTuple>;

export type VlqMap = {
  readonly mappings: string;
  readonly names: ReadonlyArray<string>;
};

export function vlqMapFromBabelDecodedMap(decodedMap: BabelDecodedMap, terminatingMapping: [number, number]): VlqMap;

export function vlqMapFromTuples(mappings: ReadonlyArray<MetroSourceMapSegmentTuple>): VlqMap;

```
