import { Output } from './output.js'; import { Value } from './value.js'; export interface CommentValueOptions { leading?: boolean; newline?: boolean; } export declare class CommentValue extends Value { #private; constructor(comment: Comment, value: Value, options?: CommentValueOptions); render(output: Output): void; } /** * A value carrying a line comment that belongs after it, past the comma that * separates it from the next element: `AlertChannel.fromId(7), // Ops email`. * * Only an object property or an array element has such a place, so only * `ObjectValue` and `ArrayValue` render the comment. Anywhere else (a call * argument, say) the value renders alone, since a line comment there would * swallow the rest of the line. */ export declare class TrailingCommentValue extends Value { readonly value: Value; readonly comment: Comment; constructor(value: Value, comment: Comment); render(output: Output): void; } /** * Text made safe for a single line comment: a line break (any of the ones * JavaScript recognizes) would end the comment and turn the rest of the text * into code, so each run of line breaks and the whitespace around it becomes * one space. */ export declare function singleLineCommentText(text: string): string; export interface CommentOptions { stylized?: boolean; } export declare abstract class Comment { comment: string; options: CommentOptions; constructor(comment: string, options?: CommentOptions); abstract render(output: Output): void; } export declare class BlockComment extends Comment { render(output: Output): void; } export declare function blockComment(comment: string, options?: CommentOptions): Comment; export declare class LineComment extends Comment { render(output: Output): void; } export declare function lineComment(comment: string, options?: CommentOptions): Comment; export declare class DocComment extends Comment { render(output: Output): void; } export declare function docComment(comment: string, options?: CommentOptions): Comment;