/** * A custom error type to be used when the * documentation comments are incorrect * * @export * @class ParserSyntaxError * @extends {Error} */ declare class ParserSyntaxError extends Error { /** * Creates an instance of ParserSyntaxError. * * @param {string} [message=''] * @memberof ParserSyntaxError */ constructor(message?: string); } /** * Remove empty strings at both start and end * in an array of lines * * @export * @param {Array} lines * @returns */ declare function trimEmptyLines(lines: Array): string[]; /** * Checks if whitespaces and tabs of a given prefix length are equal for all provided lines * * @export * @param {Array} lines * @param {number} prefixLen * @returns */ declare function spaceSectionIsEqual(lines: Array, prefixLen: number): boolean; /** * Finds a minimum padding length * * @export * @param {Array} lines * @returns */ declare function getCommonStartPadding(lines: Array): number; /** * A stack machine that collects the examples * by the special comments, telling about the start and end * of a fragment and an escape section. * * @export * @class ExampleParser */ declare class ExampleParser { lines: Array; constructor(content: string); detectLineType(line: string): Array | null; retrieveTextSection(start: number, end: number, ignore: Array): string | null; mapLines(): Record; } export { ExampleParser, ParserSyntaxError, getCommonStartPadding, spaceSectionIsEqual, trimEmptyLines };