declare function createItem(data: T): ListItem; /** * Convenience constructor matching `csstree.List()` (callable without `new`). */ export declare function makeList(): CssList; /** * Doubly linked list used as the children container for every CSS AST node. * * Mirrors css-tree's `List` so `csstree.List` import sites can switch to * `import { CssList as List } from '@stacksjs/ts-css/parse'` without changing * call sites. The list owns its `ListItem` cells; items can be moved * between lists by detach/insert pairs. */ export declare interface ListItem { prev: ListItem | null next: ListItem | null data: T } export declare class CssList { head: ListItem | null; tail: ListItem | null; static createItem(data: U): ListItem; createItem(data: T): ListItem; get isEmpty(): boolean; get first(): T | null; get last(): T | null; [Symbol.iterator](): Iterator; fromArray(items: ReadonlyArray): this; toArray(): T[]; toJSON(): T[]; forEach(fn: (data: T, item: ListItem, list: CssList) => void, thisArg?: any): void; forEachRight(fn: (data: T, item: ListItem, list: CssList) => void, thisArg?: any): void; reduce(fn: (acc: U, data: T, index: number, list: CssList) => U, initial: U): U; some(fn: (item: T, index: number, list: CssList) => boolean): boolean; map(fn: (item: T, index: number, list: CssList) => U): CssList; filter(fn: (item: T, index: number, list: CssList) => boolean): CssList; clear(): void; copy(): CssList; prepend(item: ListItem): this; prependData(data: T): this; append(item: ListItem): this; appendData(data: T): this; insert(item: ListItem, before?: ListItem | null | undefined): this; insertData(data: T, before?: ListItem | null): this; remove(item: ListItem): ListItem; push(data: T): void; pop(): ListItem | null; unshift(data: T): void; shift(): ListItem | null; prependList(list: CssList): this; appendList(list: CssList): this; insertList(list: CssList, before?: ListItem | null): this; replace(oldItem: ListItem, newItemOrList: ListItem | CssList): void; }