import { Marker } from "./markers"; import { Cursor, SourceFile, Tree } from "./tree"; import { TreeVisitor } from "./visitor"; type CommentWrapper = (input: string) => string; export interface MarkerPrinter { beforeSyntax(marker: Marker, cursor: Cursor, commentWrapper: CommentWrapper): string; beforePrefix(marker: Marker, cursor: Cursor, commentWrapper: CommentWrapper): string; afterSyntax(marker: Marker, cursor: Cursor, commentWrapper: CommentWrapper): string; } export declare namespace MarkerPrinter { const DEFAULT: MarkerPrinter; const SEARCH_MARKERS_ONLY: MarkerPrinter; const FENCED: MarkerPrinter; const SANITIZED: MarkerPrinter; } export declare class PrintOutputCapture { readonly markerPrinter: MarkerPrinter; private _out; constructor(markerPrinter?: MarkerPrinter); get out(): string; append(text: string | undefined): PrintOutputCapture; } interface TreePrinter { /** * Add a dependency on `ts-dedent` and use `dedent` to normalize indentation if you * wish to print subtrees without indentation. * * @param tree Helps to determine what kind of language we are dealing with when * printing a subtree whose LST type is shared between multiple languages in a language family. * @param out Accumulates printing output. */ print(tree: Tree, out?: PrintOutputCapture): Promise; } export declare class TreePrinters { private static _registry; static register(kind: string, printer: () => TreeVisitor): void; /** * Retrieve the printer for a given tree kind. * * @param target Helps to determine what kind of language we are dealing with when * printing a subtree whose LST type is shared between multiple languages in a language family. */ static printer(target: Cursor | SourceFile | string): TreePrinter; static print(sourceFile: SourceFile): Promise; static printTrimmed(sourceFile: SourceFile): Promise; } export declare function printer(target: Cursor | SourceFile | string): TreePrinter; export {}; //# sourceMappingURL=print.d.ts.map