import * as postcss from 'postcss'; import { ConfiguredVariable, ConfiguredVariableExpressionProps, ConfiguredVariableProps } from './configured-variable'; import { Node, NodeProps } from './node'; import type * as sassInternal from './sass-internal'; import { ForwardRule } from './statement/forward-rule'; import { UseRule } from './statement/use-rule'; /** * The set of raws supported by {@link Configuration}. * * @category Statement */ export interface ConfigurationRaws { /** Whether the final variable has a trailing comma. */ comma?: boolean; /** * The whitespace between the final variable (or its trailing comma if it has * one) and the closing parenthesis. */ after?: string; } /** * The initializer properties for {@link Configuration}. * * @category Statement */ export interface ConfigurationProps extends NodeProps { raws?: ConfigurationRaws; variables: Record | Array; } /** * A configuration map for a `@use` or `@forward` rule. * * @category Statement */ export declare class Configuration extends Node { readonly sassType: "configuration"; raws: ConfigurationRaws; parent: ForwardRule | UseRule | undefined; /** The underlying map from variable names to their values. */ private _variables; /** The number of variables in this configuration. */ get size(): number; constructor(defaults?: ConfigurationProps); /** @hidden */ constructor(_: undefined, inner: sassInternal.ConfiguredVariable[]); /** * Adds {@link variable} to this configuration. * * If there's already a variable with that name, it's removed first. */ add(variable: ConfiguredVariable | ConfiguredVariableProps): this; /** Removes all variables from this configuration. */ clear(): void; /** * Removes the variable named {@link name} from this configuration. * * Returns whether the variable was removed. */ delete(key: string): boolean; /** * Returns the variable named {@link name} from this configuration if it * contains one. */ get(key: string): ConfiguredVariable | undefined; /** * Returns whether this configuration has a variable named {@link name}. */ has(key: string): boolean; /** * Sets the variable named {@link key}. This fully overrides the previous * value, so all previous raws and guarded state are discarded. */ set(key: string, expression: ConfiguredVariableExpressionProps): this; /** Returns all the variables in this configuration. */ variables(): IterableIterator; clone(overrides?: Partial): Configuration; toJSON(): object; /** @hidden */ toJSON(_: string, inputs: Map): object; /** @hidden */ toString(): string; /** @hidden */ get nonStatementChildren(): ReadonlyArray; }