@@ -3,7 +3,7 @@ import { Bench } from 'tinybench'
33import { parse , tokenize , walk } from '../dist/index.js'
44import * as fs from 'node:fs'
55import * as path from 'node:path'
6- // @ts -expect-error
6+ // @ts -expect-error: no type definitions for css-tree
77import * as csstree from 'css-tree'
88import * as postcss from 'postcss'
99
6363 . add ( 'Parse/walk - CSSTree - Bootstrap CSS' , ( ) => {
6464 let ast = csstree . parse ( bootstrapCSS , { positions : true } )
6565 let count = 0
66- // @ts -expect-error
66+ // @ts -expect-error: no type definitions for css-tree
6767 csstree . walk ( ast , ( node ) => {
6868 let type = node . type
6969 let line = node . loc ?. start . line
9393 . add ( 'Parse/walk - CSSTree - Tailwind CSS' , ( ) => {
9494 let ast = csstree . parse ( tailwindCSS , { positions : true } )
9595 let count = 0
96- // @ts -expect-error
96+ // @ts -expect-error: no type definitions for css-tree
9797 csstree . walk ( ast , ( node ) => {
9898 let type = node . type
9999 let line = node . loc ?. start . line
@@ -140,7 +140,7 @@ console.table(
140140 'File Size' : getFileSize ( name ) ,
141141 'ops/sec' : stats ?. throughput . mean . toFixed ( 0 ) ?? 'N/A' ,
142142 'Average Time (ms)' : stats ?. latency . mean . toFixed ( 4 ) ?? 'N/A' ,
143- Margin : stats ?. latency . rme != null ? `±${ stats . latency . rme . toFixed ( 2 ) } %` : 'N/A' ,
143+ Margin : stats ?. latency . rme === null ? 'N/A' : `±${ stats . latency . rme . toFixed ( 2 ) } %` ,
144144 }
145145 } ) ,
146146)
0 commit comments