/** * Human-friendly error reporting for Quint errors. From the read text and an error * message containing localization errors, fetch offending lines and highlights * offending sections with ^^^ strings. * * @author Gabriela Moreira * * @module */ import { Maybe } from '@sweet-monads/maybe'; import { ErrorMessage } from './ErrorMessage'; /** * Generate a string with formatted error reporting for a given error message. * Displays the error with source location, code snippet, and optional call stack trace. * * @param code a map from all possible loc sources to their file contents * @param finders a map of from all possible loc sources to a line-column lib * finder object created from the text for that source, used as cached maps of indexes * @param message the error message to be reported * @param lineOffset a maybe number to add to line numbers in error messages, * the default value is `just(1)`. * No source info is printed if `lineOffset == none()`. * * @returns a formatted string with error information */ export declare function formatError(code: Map, finders: Map, message: ErrorMessage, lineOffset?: Maybe): string; /** * Create line column finders (from the line-column lib) for each file in a map. * * @param sourceCode - a map of file names to their contents * * @returns a map of file names to their finders */ export declare function createFinders(sourceCode: Map): Map;