1 import PreviousMap from './previous-map';
2 import Container from './container';
3 import postcss from './postcss';
4 import Result from './result';
5 import Node from './node';
6 export default class Root extends Container implements postcss.Root {
8 * Returns a string representing the node's type. Possible values are
9 * root, atrule, rule, decl or comment.
16 * Represents a CSS file and contains all its parsed nodes.
18 constructor(defaults?: postcss.RootNewProps);
20 * @param overrides New properties to override in the clone.
21 * @returns A clone of this node. The node and its (cloned) children will
22 * have a clean parent and code style properties.
24 clone(overrides?: Object): Root;
25 toJSON(): postcss.JsonRoot;
27 * Removes child from the root node, and the parent properties of node and
29 * @param child Child or child's index.
30 * @returns This root node for chaining.
32 removeChild(child: Node | number): this;
33 protected normalize(node: Node | string, sample: Node, type?: string): Node[];
34 protected normalize(props: postcss.AtRuleNewProps | postcss.RuleNewProps | postcss.DeclarationNewProps | postcss.CommentNewProps, sample: Node, type?: string): Node[];
36 * @returns A Result instance representing the root's CSS.
40 * The path where you'll put the output CSS file. You should always
41 * set "to" to generate correct source maps.
44 map?: postcss.SourceMapOptions;
47 * Deprecated. Use Root#removeChild.
49 remove(child?: Node | number): Root;
51 * Deprecated. Use Root#source.input.map.
53 prevMap(): PreviousMap;