import * as postcss from 'postcss'; import { Container } from './container'; import { Parameter, ParameterProps } from './parameter'; import { Node, NodeProps } from './node'; import * as sassInternal from './sass-internal'; /** * The type of new nodes that can be passed into a parameter list, either a * single parameter or multiple parameters. * * @category Statement */ export type NewParameters = Parameter | ParameterProps | ReadonlyArray | undefined; /** * The initializer properties for {@link ParameterList} passed as an options * object. * * @category Statement */ export interface ParameterListObjectProps extends NodeProps { nodes?: ReadonlyArray; raws?: ParameterListRaws; } /** * The initializer properties for {@link ParameterList}. * * @category Statement */ export type ParameterListProps = ParameterListObjectProps | ReadonlyArray; /** * Raws indicating how to precisely serialize a {@link ParameterList} node. * * @category Statement */ export interface ParameterListRaws { /** * Whether the final parameter has a trailing comma. * * Ignored if {@link ParameterList.nodes} is empty. */ comma?: boolean; /** * The whitespace between the final parameter (or its trailing comma if it has * one) and the closing parenthesis. */ after?: string; } /** * A list of parameters, as in a `@function` or `@mixin` rule. * * @category Statement */ export declare class ParameterList extends Node implements Container { #private; readonly sassType: "parameter-list"; raws: ParameterListRaws; get nodes(): ReadonlyArray; /** @hidden */ set nodes(nodes: Array); private _nodes?; constructor(defaults?: ParameterListProps); /** @hidden */ constructor(_: undefined, inner: sassInternal.ParameterList); clone(overrides?: Partial): this; toJSON(): object; /** @hidden */ toJSON(_: string, inputs: Map): object; append(...nodes: NewParameters[]): this; each(callback: (node: Parameter, index: number) => false | void): false | undefined; every(condition: (node: Parameter, index: number, nodes: ReadonlyArray) => boolean): boolean; index(child: Parameter | number): number; insertAfter(oldNode: Parameter | number, newNode: NewParameters): this; insertBefore(oldNode: Parameter | number, newNode: NewParameters): this; prepend(...nodes: NewParameters[]): this; push(child: Parameter): this; removeAll(): this; removeChild(child: Parameter | number): this; some(condition: (node: Parameter, index: number, nodes: ReadonlyArray) => boolean): boolean; get first(): Parameter | undefined; get last(): Parameter | undefined; /** @hidden */ toString(): string; /** * Normalizes a single parameter declaration or list of parameters. */ private _normalize; /** Like {@link _normalize}, but doesn't set the parameter's parents. */ private _normalizeBeforeParent; /** Like {@link _normalize}, but also flattens a list of nodes. */ private _normalizeList; /** @hidden */ get nonStatementChildren(): ReadonlyArray; }