import * as postcss from 'postcss'; import type { AtRuleRaws } from 'postcss/lib/at-rule'; import { AnyExpression, ExpressionProps } from '../expression'; import type * as sassInternal from '../sass-internal'; import { ChildNode, ContainerProps, NewNode, Statement, StatementWithChildren } from '.'; import { _AtRule } from './at-rule-internal'; /** * The set of raws supported by {@link ElseRule}. * * @category Statement */ export interface ElseRuleRaws extends Omit { /** * The whitespace between `if` and {@link ElseRule.elseExpression}. Ignored if * `elseExpression` is undefined. */ afterIf?: string; } /** * The initializer properties for {@link ElseRule}. * * @category Statement */ export type ElseRuleProps = ContainerProps & { raws?: ElseRuleRaws; elseCondition?: AnyExpression | ExpressionProps; }; /** * A `@else` or `@else if` rule. Extends [`postcss.AtRule`]. * * [`postcss.AtRule`]: https://postcss.org/api/#atrule * * @category Statement */ export declare class ElseRule extends _AtRule> implements Statement { readonly sassType: "else-rule"; parent: StatementWithChildren | undefined; raws: ElseRuleRaws; nodes: ChildNode[]; get name(): string; set name(value: string); get params(): string; set params(value: string | number | undefined); /** * The expression whose value determines whether to evaluate the block. If * this isn't set, the block is evaluated unconditionally. */ get elseCondition(): AnyExpression | undefined; set elseCondition(elseCondition: AnyExpression | ExpressionProps | undefined); private _elseCondition?; constructor(defaults?: ElseRuleProps); /** @hidden */ constructor(_: undefined, inner: sassInternal.IfRule, clause: sassInternal.IfClause | sassInternal.ElseClause | null); clone(overrides?: Partial): this; toJSON(): object; /** @hidden */ toJSON(_: string, inputs: Map): object; /** @hidden */ toString(stringifier?: postcss.Stringifier | postcss.Syntax): string; /** @hidden */ get nonStatementChildren(): ReadonlyArray; /** @hidden */ normalize(node: NewNode, sample?: postcss.Node): ChildNode[]; }