You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
589 B

4 years ago
  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 {};