import * as postcss from 'postcss'; import type { AtRuleRaws as PostcssAtRuleRaws } from 'postcss/lib/at-rule'; import { Interpolation, InterpolationProps } from '../interpolation'; 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 GenericAtRule}. * * Sass doesn't support PostCSS's `params` raws, since * {@link GenericAtRule.paramInterpolation} has its own raws. * * @category Statement */ export interface GenericAtRuleRaws extends Omit { /** * Whether to collapse the nesting for an `@at-root` with no params that * contains only a single style rule. * * This is ignored for rules that don't meet all of those criteria. */ atRootShorthand?: boolean; } /** * The initializer properties for {@link GenericAtRule}. * * @category Statement */ export type GenericAtRuleProps = ContainerProps & { raws?: GenericAtRuleRaws; } & ({ nameInterpolation: Interpolation | InterpolationProps; name?: never; } | { name: string; nameInterpolation?: never; }) & ({ paramsInterpolation?: Interpolation | InterpolationProps; params?: never; } | { params?: string | number; paramsInterpolation?: never; }); /** * An `@`-rule that isn't parsed as a more specific type. Extends * [`postcss.AtRule`]. * * [`postcss.AtRule`]: https://postcss.org/api/#atrule * * @category Statement */ export declare class GenericAtRule extends _AtRule> implements Statement { readonly sassType: "atrule"; parent: StatementWithChildren | undefined; raws: GenericAtRuleRaws; nodes: ChildNode[] | undefined; get name(): string; set name(value: string); /** * The interpolation that represents this at-rule's name. */ get nameInterpolation(): Interpolation; set nameInterpolation(value: Interpolation | InterpolationProps); private _nameInterpolation?; get params(): string; set params(value: string | number | undefined); /** * The interpolation that represents this at-rule's parameters, or undefined * if it has no parameters. */ get paramsInterpolation(): Interpolation | undefined; set paramsInterpolation(value: Interpolation | InterpolationProps | undefined); private _paramsInterpolation; constructor(defaults: GenericAtRuleProps); /** @hidden */ constructor(_: undefined, inner: sassInternal.AtRule); 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[]; }