import * as postcss from 'postcss'; import type { CommentRaws } from 'postcss/lib/comment'; import type * as sassInternal from '../sass-internal'; import { Interpolation } from '../interpolation'; import { ContainerProps, Statement, StatementWithChildren } from '.'; import { _Comment } from './comment-internal'; /** * The set of raws supported by {@link SassComment}. * * @category Statement */ export interface SassCommentRaws extends Omit { /** * Unlike PostCSS's, `CommentRaws.before`, this is added before `//` for * _every_ line of this comment. If any lines have more indentation than this, * it appears in {@link beforeLines} instead. */ before?: string; /** * For each line in the comment, this is the whitespace that appears before * the `//` _in addition to_ {@link before}. */ beforeLines?: string[]; /** * Unlike PostCSS's `CommentRaws.left`, this is added after `//` for _every_ * line in the comment that's not only whitespace. If any lines have more * initial whitespace than this, it appears in {@link SassComment.text} * instead. * * Lines that are only whitespace do not have `left` added to them, and * instead have all their whitespace directly in {@link SassComment.text}. */ left?: string; } /** * The subset of {@link SassCommentProps} that can be used to construct it * implicitly without calling `new SassComment()`. * * @category Statement */ export type SassCommentChildProps = ContainerProps & { raws?: SassCommentRaws; silentText: string; }; /** * The initializer properties for {@link SassComment}. * * @category Statement */ export type SassCommentProps = ContainerProps & { raws?: SassCommentRaws; } & ({ silentText: string; } | { text: string; }); /** * A Sass-style "silent" comment. Extends [`postcss.Comment`]. * * [`postcss.Comment`]: https://postcss.org/api/#comment * * @category Statement */ export declare class SassComment extends _Comment> implements Statement { readonly sassType: "sass-comment"; parent: StatementWithChildren | undefined; raws: SassCommentRaws; /** * The text of this comment, potentially spanning multiple lines. * * This is always the same as {@link text}, it just has a different name to * distinguish {@link SassCommentProps} from {@link CssCommentProps}. */ silentText: string; get text(): string; set text(value: string); constructor(defaults: SassCommentProps); /** @hidden */ constructor(_: undefined, inner: sassInternal.SilentComment); clone(overrides?: Partial): this; toJSON(): object; /** @hidden */ toJSON(_: string, inputs: Map): object; /** @hidden */ toString(stringifier?: postcss.Stringifier | postcss.Syntax): string; /** @hidden */ get nonStatementChildren(): ReadonlyArray; }