/** * Minimal type declaration for css-tree v2. * css-tree v2.x does not ship bundled TypeScript types. * These declarations cover only the subset of the API used by the sanitizer. */ declare module "css-tree" { interface CssNode { type: string; [key: string]: unknown; } interface List { remove(item: ListItem): void; } interface ListItem { data: CssNode; } function parse( css: string, options?: { parseValue?: boolean; onParseError?: (error: SyntaxError) => void; } ): CssNode; function walk( ast: CssNode, visitor: | ((node: CssNode, item: ListItem | null, list: List | null) => void) | { enter?: ( node: CssNode, item: ListItem | null, list: List | null ) => void; leave?: ( node: CssNode, item: ListItem | null, list: List | null ) => void; } ): void; function generate(ast: CssNode): string; }