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 EachRule}. * * @category Statement */ export interface EachRuleRaws extends Omit { /** * The whitespace and commas after each variable in * {@link EachRule.variables}. * * The element at index `i` is included after the variable at index `i`. Any * elements beyond `variables.length` are ignored. */ afterVariables?: string[]; /** The whitespace between `in` and {@link EachRule.eachExpression}. */ afterIn?: string; } /** * The initializer properties for {@link EachRule}. * * @category Statement */ export type EachRuleProps = ContainerProps & { raws?: EachRuleRaws; variables: string[]; eachExpression: AnyExpression | ExpressionProps; }; /** * An `@each` rule. Extends [`postcss.AtRule`]. * * [`postcss.AtRule`]: https://postcss.org/api/#atrule * * @category Statement */ export declare class EachRule extends _AtRule> implements Statement { readonly sassType: "each-rule"; parent: StatementWithChildren | undefined; raws: EachRuleRaws; nodes: ChildNode[]; /** The variable names assigned for each iteration, without `"$"`. */ variables: string[]; get name(): string; set name(value: string); get params(): string; set params(value: string | number | undefined); /** The expression whose value is iterated over. */ get eachExpression(): AnyExpression; set eachExpression(eachExpression: AnyExpression | ExpressionProps); private _eachExpression?; constructor(defaults: EachRuleProps); /** @hidden */ constructor(_: undefined, inner: sassInternal.EachRule); 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[]; }