mapping.d.ts 589 B

123456789101112131415
  1. import { namedTypes } from "ast-types";
  2. import { Lines } from "./lines";
  3. declare type Pos = namedTypes.Position;
  4. declare type Loc = namedTypes.SourceLocation;
  5. export default class Mapping {
  6. sourceLines: Lines;
  7. sourceLoc: Loc;
  8. targetLoc: Loc;
  9. constructor(sourceLines: Lines, sourceLoc: Loc, targetLoc?: Loc);
  10. slice(lines: Lines, start: Pos, end?: Pos): Mapping | null;
  11. add(line: number, column: number): Mapping;
  12. subtract(line: number, column: number): Mapping;
  13. indent(by: number, skipFirstLine?: boolean, noNegativeColumns?: boolean): Mapping;
  14. }
  15. export {};