53777cbf8f34cfb76c31245efd6fb60f746038031b768534324a3a0d93ad93d72c023ee33257daddc8ad2c34c193f65143c24f618aa0b84f47a46746e56cca 837 B

12345678910111213141516171819202122232425262728293031323334
  1. import {SourceLocation} from './source_location';
  2. /**
  3. * A span of text within a source file.
  4. *
  5. * @category Logger
  6. */
  7. export interface SourceSpan {
  8. /** The beginning of this span, inclusive. */
  9. start: SourceLocation;
  10. /**
  11. * The end of this span, exclusive.
  12. *
  13. * If {@link start} and {@link end} refer to the same location, the span has
  14. * zero length and refers to the point immediately after {@link start} and
  15. * before the next character.
  16. */
  17. end: SourceLocation;
  18. /** The canonical URL of the file this span refers to. */
  19. url?: URL;
  20. /** The text covered by the span. */
  21. text: string;
  22. /**
  23. * Text surrounding the span.
  24. *
  25. * If this is set, it must include only whole lines, and it must include at
  26. * least all line(s) which are partially covered by this span.
  27. */
  28. context?: string;
  29. }