index.d.ts 513 B

12345678910111213141516171819202122
  1. interface SourceLoc {
  2. line: number;
  3. col: number;
  4. }
  5. interface SourceBlock {
  6. startBody: SourceLoc;
  7. endBody: SourceLoc;
  8. startLoc: SourceLoc;
  9. endLoc: SourceLoc;
  10. }
  11. interface LocationsMap {
  12. [key: string]: SourceBlock;
  13. }
  14. /**
  15. * given a location, extract the text from the full source
  16. */
  17. declare function extractSource(location: SourceBlock, lines: string[]): string | null;
  18. declare const _default: any;
  19. export { LocationsMap, SourceBlock, SourceLoc, _default as default, extractSource };