import * as postcss from 'postcss'; import { AnyExpression, ExpressionProps } from './expression'; import { Node, NodeProps } from './node'; import { ArgumentList } from './argument-list'; import { RawWithValue } from './raw-with-value'; /** * The set of raws supported by {@link Argument}. * * @category Expression */ export interface ArgumentRaws { /** * The whitespace before the argument name (if it has one) or value (if it * doesn't). */ before?: string; /** * The argument's name, not including the `$`. * * This may be different than {@link Argument.name} if the name contains * escape codes or underscores. It's ignored unless {@link Argument.name} is * defined. */ name?: RawWithValue; /** * The whitespace and colon between the argument name and its value. This is * ignored unless the argument {@link Argument.name} is defined. */ between?: string; /** * The whitespace between the argument and the `...`, if {@link * Argument.rest} is true. */ beforeRest?: string; /** * The space symbols between the end of the argument value and the comma * afterwards. Always empty for an argument that doesn't have a trailing comma. */ after?: string; } /** * The initializer properties for {@link Argument} passed as an * options object. * * @category Expression */ export type ArgumentObjectProps = NodeProps & { raws?: ArgumentRaws; value: AnyExpression | ExpressionProps; } & ({ name?: string; rest?: never; } | { name?: never; rest?: boolean; }); /** * Properties used to initialize a {@link Argument} without an explicit name. * This is used when the name is given elsewhere, either in the array form of * {@link ArgumentProps} or the record form of [@link * ArgumentDeclarationProps}. */ export type ArgumentExpressionProps = AnyExpression | ExpressionProps | Omit; /** * The initializer properties for {@link Argument}. * * @category Expression */ export type ArgumentProps = ArgumentObjectProps | AnyExpression | ExpressionProps | [string, ArgumentExpressionProps]; /** * A single argument passed to an `@include` or `@content` rule or a function * invocation. This is always included in a {@link ArgumentList}. * * @category Expression */ export declare class Argument extends Node { readonly sassType: "argument"; raws: ArgumentRaws; parent: ArgumentList | undefined; /** * The argument name, not including `$`. * * This is the parsed and normalized value, with underscores converted to * hyphens and escapes resolved to the characters they represent. * * Setting this to a value automatically sets {@link rest} to * `undefined`. */ get name(): string | undefined; set name(name: string | undefined); private _name?; /** The argument's value. */ get value(): AnyExpression; set value(value: AnyExpression | ExpressionProps); private _value?; /** * Whether this is a rest argument (indicated by `...` in Sass). * * Setting this to true automatically sets {@link name} to * `undefined`. */ get rest(): boolean; set rest(value: boolean); private _rest?; constructor(defaults: ArgumentProps); clone(overrides?: Partial): this; toJSON(): object; /** @hidden */ toJSON(_: string, inputs: Map): object; /** @hidden */ toString(): string; /** @hidden */ get nonStatementChildren(): ReadonlyArray; }