postcss
Advanced tools
Comparing version 8.4.34 to 8.4.35
@@ -1,2 +0,5 @@ | ||
import Container, { ContainerProps } from './container.js' | ||
import Container, { | ||
ContainerProps, | ||
ContainerWithChildren | ||
} from './container.js' | ||
@@ -119,3 +122,3 @@ declare namespace AtRule { | ||
params: string | ||
parent: Container | undefined | ||
parent: ContainerWithChildren | undefined | ||
@@ -122,0 +125,0 @@ raws: AtRule.AtRuleRaws |
@@ -8,2 +8,8 @@ import AtRule from './at-rule.js' | ||
declare namespace Container { | ||
export class ContainerWithChildren< | ||
Child extends Node = ChildNode | ||
> extends Container_<Child> { | ||
nodes: Child[] | ||
} | ||
export interface ValueOptions { | ||
@@ -70,3 +76,11 @@ /** | ||
append( | ||
...nodes: (ChildProps | ChildProps[] | Node | Node[] | string | string[])[] | ||
...nodes: ( | ||
| ChildProps | ||
| ChildProps[] | ||
| Node | ||
| Node[] | ||
| string | ||
| string[] | ||
| undefined | ||
)[] | ||
): this | ||
@@ -151,3 +165,10 @@ | ||
oldNode: Child | number, | ||
newNode: Child | Child[] | ChildProps | ChildProps[] | string | string[] | ||
newNode: | ||
| Child | ||
| Child[] | ||
| ChildProps | ||
| ChildProps[] | ||
| string | ||
| string[] | ||
| undefined | ||
): this | ||
@@ -167,3 +188,10 @@ /** | ||
oldNode: Child | number, | ||
newNode: Child | Child[] | ChildProps | ChildProps[] | string | string[] | ||
newNode: | ||
| Child | ||
| Child[] | ||
| ChildProps | ||
| ChildProps[] | ||
| string | ||
| string[] | ||
| undefined | ||
): this | ||
@@ -209,3 +237,11 @@ | ||
prepend( | ||
...nodes: (ChildProps | ChildProps[] | Node | Node[] | string | string[])[] | ||
...nodes: ( | ||
| ChildProps | ||
| ChildProps[] | ||
| Node | ||
| Node[] | ||
| string | ||
| string[] | ||
| undefined | ||
)[] | ||
): this | ||
@@ -455,4 +491,6 @@ /** | ||
declare class Container<Child extends Node = ChildNode> extends Container_<Child> {} | ||
declare class Container< | ||
Child extends Node = ChildNode | ||
> extends Container_<Child> {} | ||
export = Container |
@@ -176,2 +176,4 @@ 'use strict' | ||
nodes = cleanSource(parse(nodes).nodes) | ||
} else if (typeof nodes === 'undefined') { | ||
nodes = [] | ||
} else if (Array.isArray(nodes)) { | ||
@@ -178,0 +180,0 @@ nodes = nodes.slice(0) |
@@ -1,2 +0,2 @@ | ||
import Container from './container.js' | ||
import { ContainerWithChildren } from './container.js' | ||
import Node from './node.js' | ||
@@ -82,3 +82,3 @@ | ||
parent: Container | undefined | ||
parent: ContainerWithChildren | undefined | ||
@@ -85,0 +85,0 @@ /** |
@@ -249,3 +249,3 @@ import AtRule = require('./at-rule.js') | ||
*/ | ||
after(newNode: Node | Node.ChildProps | Node[] | string): this | ||
after(newNode: Node | Node.ChildProps | Node[] | string | undefined): this | ||
@@ -277,3 +277,3 @@ /** | ||
*/ | ||
before(newNode: Node | Node.ChildProps | Node[] | string): this | ||
before(newNode: Node | Node.ChildProps | Node[] | string | undefined): this | ||
@@ -536,4 +536,4 @@ /** | ||
declare class Node extends Node_ { } | ||
declare class Node extends Node_ {} | ||
export = Node |
@@ -10,3 +10,3 @@ 'use strict' | ||
constructor(plugins = []) { | ||
this.version = '8.4.34' | ||
this.version = '8.4.35' | ||
this.plugins = this.normalize(plugins) | ||
@@ -13,0 +13,0 @@ } |
@@ -1,2 +0,5 @@ | ||
import Container, { ContainerProps } from './container.js' | ||
import Container, { | ||
ContainerProps, | ||
ContainerWithChildren | ||
} from './container.js' | ||
@@ -73,3 +76,3 @@ declare namespace Rule { | ||
nodes: NonNullable<Container['nodes']> | ||
parent: Container | undefined | ||
parent: ContainerWithChildren | undefined | ||
raws: Rule.RuleRaws | ||
@@ -76,0 +79,0 @@ /** |
{ | ||
"name": "postcss", | ||
"version": "8.4.34", | ||
"version": "8.4.35", | ||
"description": "Tool for transforming styles with JS plugins", | ||
@@ -5,0 +5,0 @@ "engines": { |
197686
6815