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 ForRule}. * * @category Statement */ export interface ForRuleRaws extends Omit { /** The whitespace after {@link ForRule.variable}. */ afterVariable?: string; /** The whitespace after a {@link ForRule}'s `from` keyword. */ afterFrom?: string; /** The whitespace after {@link ForRule.fromExpression}. */ afterFromExpression?: string; /** The whitespace after a {@link ForRule}'s `to` or `through` keyword. */ afterTo?: string; } /** * The initializer properties for {@link ForRule}. * * @category Statement */ export type ForRuleProps = ContainerProps & { raws?: ForRuleRaws; variable: string; fromExpression: AnyExpression | ExpressionProps; toExpression: AnyExpression | ExpressionProps; to?: 'to' | 'through'; }; /** * A `@for` rule. Extends [`postcss.AtRule`]. * * [`postcss.AtRule`]: https://postcss.org/api/#atrule * * @category Statement */ export declare class ForRule extends _AtRule> implements Statement { readonly sassType: "for-rule"; parent: StatementWithChildren | undefined; raws: ForRuleRaws; nodes: ChildNode[]; /** The variabl names assigned for for iteration, without `"$"`. */ variable: string; /** * The keyword that appears before {@link toExpression}. * * If this is `"to"`, the loop is exclusive; if it's `"through"`, the loop is * inclusive. It defaults to `"to"` when creating a new `ForRule`. */ to: 'to' | 'through'; get name(): string; set name(value: string); get params(): string; set params(value: string | number | undefined); /** The expression whose value is the starting point of the iteration. */ get fromExpression(): AnyExpression; set fromExpression(fromExpression: AnyExpression | ExpressionProps); private _fromExpression?; /** The expression whose value is the ending point of the iteration. */ get toExpression(): AnyExpression; set toExpression(toExpression: AnyExpression | ExpressionProps); private _toExpression?; constructor(defaults: ForRuleProps); /** @hidden */ constructor(_: undefined, inner: sassInternal.ForRule); 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[]; }