summaryrefslogtreecommitdiff
path: root/node_modules/postcss/lib/container.d.ts
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2024-03-27 15:44:30 +0800
committerlittleblack111 <littleblack11111@gmail.com>2024-03-27 15:44:30 +0800
commit1c0387549700d9ce64918fb5536e37350757c7dd (patch)
tree8f27183c1f6f698afdc49017ed19821360280b51 /node_modules/postcss/lib/container.d.ts
parentbd543050c40bb988689fc20304bba0d8b4398a80 (diff)
updates
Diffstat (limited to 'node_modules/postcss/lib/container.d.ts')
-rw-r--r--node_modules/postcss/lib/container.d.ts50
1 files changed, 44 insertions, 6 deletions
diff --git a/node_modules/postcss/lib/container.d.ts b/node_modules/postcss/lib/container.d.ts
index bd6b1ba0..d16b85d0 100644
--- a/node_modules/postcss/lib/container.d.ts
+++ b/node_modules/postcss/lib/container.d.ts
@@ -5,6 +5,12 @@ import Node, { ChildNode, ChildProps, NodeProps } from './node.js'
import Rule from './rule.js'
declare namespace Container {
+ export class ContainerWithChildren<
+ Child extends Node = ChildNode
+ > extends Container_<Child> {
+ nodes: Child[]
+ }
+
export interface ValueOptions {
/**
* String that’s used to narrow down values and speed up the regexp search.
@@ -43,7 +49,7 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
* root.nodes[0].nodes[0].prop //=> 'color'
* ```
*/
- nodes: Child[]
+ nodes: Child[] | undefined
/**
* Inserts new nodes to the end of the container.
@@ -66,7 +72,15 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
* @return This node for methods chain.
*/
append(
- ...nodes: (ChildProps | ChildProps[] | Node | Node[] | string | string[])[]
+ ...nodes: (
+ | ChildProps
+ | ChildProps[]
+ | Node
+ | Node[]
+ | string
+ | string[]
+ | undefined
+ )[]
): this
assign(overrides: Container.ContainerProps | object): this
@@ -146,7 +160,14 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
*/
insertAfter(
oldNode: Child | number,
- newNode: Child | Child[] | ChildProps | ChildProps[] | string | string[]
+ newNode:
+ | Child
+ | Child[]
+ | ChildProps
+ | ChildProps[]
+ | string
+ | string[]
+ | undefined
): this
/**
* Insert new node before old node within the container.
@@ -161,7 +182,14 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
*/
insertBefore(
oldNode: Child | number,
- newNode: Child | Child[] | ChildProps | ChildProps[] | string | string[]
+ newNode:
+ | Child
+ | Child[]
+ | ChildProps
+ | ChildProps[]
+ | string
+ | string[]
+ | undefined
): this
/**
@@ -202,7 +230,15 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
* @return This node for methods chain.
*/
prepend(
- ...nodes: (ChildProps | ChildProps[] | Node | Node[] | string | string[])[]
+ ...nodes: (
+ | ChildProps
+ | ChildProps[]
+ | Node
+ | Node[]
+ | string
+ | string[]
+ | undefined
+ )[]
): this
/**
* Add child to the end of the node.
@@ -447,6 +483,8 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
get last(): Child | undefined
}
-declare class Container<Child extends Node = ChildNode> extends Container_<Child> {}
+declare class Container<
+ Child extends Node = ChildNode
+> extends Container_<Child> {}
export = Container