import * as postcss from 'postcss'; import { Container } from '../container'; import { NodeProps } from '../node'; import type * as sassInternal from '../sass-internal'; import { Expression } from '.'; import { MapEntry, MapEntryProps } from './map-entry'; /** * The initializer properties for {@link MapExpression}. * * @category Expression */ export interface MapExpressionProps extends NodeProps { raws?: MapExpressionRaws; nodes: Array; } /** * The type of new node pairs that can be passed into a map expression. * * @category Expression */ export type NewNodeForMapExpression = MapEntry | MapEntryProps | ReadonlyArray | ReadonlyArray | undefined; /** * Raws indicating how to precisely serialize a {@link MapExpression}. * * @category Expression */ export interface MapExpressionRaws { /** * The whitespace between the opening parenthesis and the first expression. */ afterOpen?: string; /** * The whitespace between the last comma and the closing bracket. * * This is only set automatically for maps with trailing commas. */ beforeClose?: string; /** * Whether this map has a trailing comma. * * Ignored if the expression has zero elements. */ trailingComma?: boolean; } /** * An expression representing a map literal in Sass. * * @category Expression */ export declare class MapExpression extends Expression implements Container { #private; readonly sassType: "map"; raws: MapExpressionRaws; get nodes(): ReadonlyArray; /** @hidden */ set nodes(nodes: Array); private _nodes?; constructor(defaults: MapExpressionProps); /** @hidden */ constructor(_: undefined, inner: sassInternal.MapExpression); clone(overrides?: Partial): this; toJSON(): object; /** @hidden */ toJSON(_: string, inputs: Map): object; append(...nodes: NewNodeForMapExpression[]): this; each(callback: (node: MapEntry, index: number) => false | void): false | undefined; every(condition: (node: MapEntry, index: number, nodes: ReadonlyArray) => boolean): boolean; index(child: MapEntry | number): number; insertAfter(oldNode: MapEntry | number, newNode: NewNodeForMapExpression): this; insertBefore(oldNode: MapEntry | number, newNode: NewNodeForMapExpression): this; prepend(...nodes: NewNodeForMapExpression[]): this; push(child: MapEntry): this; removeAll(): this; removeChild(child: MapEntry | number): this; some(condition: (node: MapEntry, index: number, nodes: ReadonlyArray) => boolean): boolean; get first(): MapEntry | undefined; get last(): MapEntry | undefined; /** @hidden */ toString(): string; /** * Normalizes a single argument declaration or list of arguments. */ private _normalize; /** Like {@link _normalize}, but also flattens a list of nodes. */ private _normalizeList; /** @hidden */ get nonStatementChildren(): ReadonlyArray; }