import * as postcss from 'postcss'; import { Configuration } from './configuration'; import { AnyExpression, ExpressionProps } from './expression'; import { Node, NodeProps } from './node'; import * as sassInternal from './sass-internal'; import { RawWithValue } from './raw-with-value'; /** * The set of raws supported by {@link ConfiguredVariable}. * * @category Statement */ export interface ConfiguredVariableRaws { /** The whitespace before the variable name. */ before?: string; /** * The variable's name, not including the `$`. * * This may be different than {@link ConfiguredVariable.variable} if the name * contains escape codes or underscores. */ name?: RawWithValue; /** The whitespace and colon between the variable name and value. */ between?: string; /** * The whitespace between the variable's value and the `!default` flag. If the * variable doesn't have a `!default` flag, this is ignored. */ beforeGuard?: string; /** * The space symbols between the end of the variable declaration and the comma * afterwards. Always empty for a variable that doesn't have a trailing comma. */ after?: string; } /** * The initializer properties for {@link ConfiguredVariable} passed as an * options object. * * @category Statement */ export interface ConfiguredVariableObjectProps extends NodeProps { raws?: ConfiguredVariableRaws; name: string; expression: AnyExpression | ExpressionProps; guarded?: boolean; } /** * Properties used to initialize a {@link ConfiguredVariable} without an * explicit name. This is used when the name is given elsewhere, either in the * array form of {@link ConfiguredVariableProps} or the record form of [@link * ConfigurationProps}. * * Passing in an {@link Expression} or {@link ExpressionProps} directly always * creates an unguarded {@link ConfiguredVariable}. */ export type ConfiguredVariableExpressionProps = AnyExpression | ExpressionProps | Omit; /** * The initializer properties for {@link ConfiguredVariable}. * * @category Statement */ export type ConfiguredVariableProps = ConfiguredVariableObjectProps | [string, ConfiguredVariableExpressionProps]; /** * A single variable configured for the `with` clause of a `@use` or `@forward` * rule. This is always included in a {@link Configuration}. * * @category Statement */ export declare class ConfiguredVariable extends Node { readonly sassType: "configured-variable"; raws: ConfiguredVariableRaws; parent: Configuration | undefined; /** * The variable name, not including `$`. * * This is the parsed and normalized value, with underscores converted to * hyphens and escapes resolved to the characters they represent. */ name: string; /** The expression whose value the variable is assigned. */ get expression(): AnyExpression; set expression(value: AnyExpression | ExpressionProps); private _expression; /** Whether this has a `!default` guard. */ guarded: boolean; constructor(defaults: ConfiguredVariableProps); /** @hidden */ constructor(_: undefined, inner: sassInternal.ConfiguredVariable); clone(overrides?: Partial): this; toJSON(): object; /** @hidden */ toJSON(_: string, inputs: Map): object; /** @hidden */ toString(): string; /** @hidden */ get nonStatementChildren(): ReadonlyArray; }