CodeframeFormatter.d.ts 705 B

1234567891011121314151617
  1. import { Formatter } from './Formatter';
  2. interface CodeFrameFormatterOptions {
  3. /** Syntax highlight the code as JavaScript for terminals. default: false */
  4. highlightCode?: boolean;
  5. /** The number of lines to show above the error. default: 2 */
  6. linesBelow?: number;
  7. /** The number of lines to show below the error. default: 3 */
  8. linesAbove?: number;
  9. /**
  10. * Forcibly syntax highlight the code as JavaScript (for non-terminals);
  11. * overrides highlightCode.
  12. * default: false
  13. */
  14. forceColor?: boolean;
  15. }
  16. declare function createCodeframeFormatter(options?: CodeFrameFormatterOptions): Formatter;
  17. export { createCodeframeFormatter, CodeFrameFormatterOptions };