File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -263,6 +263,7 @@ declare namespace parser {
263263 callback : ( node : Pseudo ) => boolean | void
264264 ) : boolean | undefined ;
265265 walkTags ( callback : ( node : Tag ) => boolean | void ) : boolean | undefined ;
266+ walkUniversals ( callback : ( node : Universal ) => boolean | void ) : boolean | undefined ;
266267 split ( callback : ( node : Child ) => boolean ) : [ Child [ ] , Child [ ] ] ;
267268 map < T > ( callback : ( node : Child ) => T ) : T [ ] ;
268269 reduce (
Original file line number Diff line number Diff line change @@ -2,11 +2,18 @@ import * as parser from './postcss-selector-parser';
22
33parser ( ( root ) => {
44 root . each ( ( node , index ) => {
5- node as parser . Selector ;
6- index as number ;
5+ node satisfies parser . Selector ;
6+ index satisfies number ;
77 } ) ;
88 root . walk ( ( node , index ) => {
9- node as parser . Selector ;
10- index as number ;
9+ node satisfies parser . Node ;
10+ index satisfies number ;
11+
12+ if ( node . type === 'selector' ) {
13+ node satisfies parser . Selector ;
14+ }
15+ } ) ;
16+ root . walkUniversals ( ( node ) => {
17+ node satisfies parser . Universal ;
1118 } ) ;
1219} ) . processSync ( "a b > c" ) ;
You can’t perform that action at this time.
0 commit comments