/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import { SourceMapConsumer } from 'source-map'; /** * A wrapped instance of a {@link https://github.com/mozilla/source-map SourceMapConsumer}. * * This exposes methods which will be indifferent to changes made in {@link https://github.com/mozilla/source-map source-map}. */ export declare class SourceMap { __source_map: SourceMapConsumer; constructor(sourceMap: SourceMapConsumer); /** * Returns the original code position for a generated code position. * @param {number} line The line of the generated code position. * @param {number} column The column of the generated code position. */ getOriginalPosition(line: number, column: number): { source: string | null; line: number | null; column: number | null; }; /** * Returns the generated code position for an original position. * @param {string} source The source file of the original code position. * @param {number} line The line of the original code position. * @param {number} column The column of the original code position. */ getGeneratedPosition(source: string, line: number, column: number): { line: number | null; column: number | null; }; /** * Returns the code for a given source file name. * @param {string} sourceName The name of the source file. */ getSource(sourceName: string): string | null; getSources(): string[]; } export declare function extractSourceMapUrl(fileUri: string, fileContents: string): Promise; /** * Returns an instance of {@link SourceMap} for a given fileUri and fileContents. * @param {string} fileUri The URI of the source file. * @param {string} fileContents The contents of the source file. */ export declare function getSourceMap(fileUri: string, fileContents: string): Promise; export default getSourceMap;