@@ -10,7 +10,7 @@ const bench = new Bench({
1010 name : 'discriminated union' ,
1111 time : 100 ,
1212 async setup ( ) {
13- // biome-ignore lint/suspicious/noExplicitAny: making sure GC has no impact on the results
13+ // oxlint-disable-next-line typescript/no-explicit-any making sure GC has no impact on the results
1414 ( globalThis as any ) . gc ( ) ;
1515 } ,
1616} ) ;
@@ -43,23 +43,23 @@ bench
4343 . add (
4444 'string tags' ,
4545 ( ) => {
46- let count = 0 ;
46+ let _count = 0 ;
4747
4848 for ( const obj of stringTaggedObjs ) {
4949 if ( obj [ $internal ] . type === 'aaa' ) {
50- count += 2 ;
50+ _count += 2 ;
5151 } else if ( obj [ $internal ] . type === 'bbb' ) {
52- count += 3 ;
52+ _count += 3 ;
5353 } else if ( obj [ $internal ] . type === 'ccc' ) {
54- count += 4 ;
54+ _count += 4 ;
5555 }
5656 }
5757 } ,
5858 {
5959 beforeEach ( ) {
6060 stringTaggedObjs = Array . from ( { length : NUMBER_OF_OBJS } , ( ) => ( {
6161 [ $internal ] : {
62- // biome-ignore lint/style/noNonNullAssertion: in range
62+ // oxlint-disable-next-line typescript/no-non-null-assertion
6363 type : STRING_TAGS [ Math . floor ( Math . random ( ) * STRING_TAGS . length ) ] ! ,
6464 } ,
6565 } ) ) ;
@@ -69,23 +69,23 @@ bench
6969 . add (
7070 'number tags' ,
7171 async ( ) => {
72- let count = 0 ;
72+ let _count = 0 ;
7373
7474 for ( const obj of numberTaggedObjs ) {
7575 if ( obj [ $internal ] . type === NUMBER_TAG_CATALOG . aaa ) {
76- count += 2 ;
76+ _count += 2 ;
7777 } else if ( obj [ $internal ] . type === NUMBER_TAG_CATALOG . bbb ) {
78- count += 3 ;
78+ _count += 3 ;
7979 } else if ( obj [ $internal ] . type === NUMBER_TAG_CATALOG . ccc ) {
80- count += 4 ;
80+ _count += 4 ;
8181 }
8282 }
8383 } ,
8484 {
8585 beforeEach ( ) {
8686 numberTaggedObjs = Array . from ( { length : NUMBER_OF_OBJS } , ( ) => ( {
8787 [ $internal ] : {
88- // biome-ignore lint/style/noNonNullAssertion: in range
88+ // oxlint-disable-next-line typescript/no-non-null-assertion
8989 type : NUMBER_TAGS [ Math . floor ( Math . random ( ) * NUMBER_TAGS . length ) ] ! ,
9090 } ,
9191 } ) ) ;
@@ -95,23 +95,23 @@ bench
9595 . add (
9696 'number tags (inlined catalog)' ,
9797 async ( ) => {
98- let count = 0 ;
98+ let _count = 0 ;
9999
100100 for ( const obj of numberTaggedObjs ) {
101101 if ( obj [ $internal ] . type === 0 ) {
102- count += 2 ;
102+ _count += 2 ;
103103 } else if ( obj [ $internal ] . type === 1 ) {
104- count += 3 ;
104+ _count += 3 ;
105105 } else if ( obj [ $internal ] . type === 2 ) {
106- count += 4 ;
106+ _count += 4 ;
107107 }
108108 }
109109 } ,
110110 {
111111 beforeEach ( ) {
112112 numberTaggedObjs = Array . from ( { length : NUMBER_OF_OBJS } , ( ) => ( {
113113 [ $internal ] : {
114- // biome-ignore lint/style/noNonNullAssertion: in range
114+ // oxlint-disable-next-line typescript/no-non-null-assertion
115115 type : NUMBER_TAGS [ Math . floor ( Math . random ( ) * NUMBER_TAGS . length ) ] ! ,
116116 } ,
117117 } ) ) ;
@@ -121,23 +121,23 @@ bench
121121 . add (
122122 'symbol tags' ,
123123 async ( ) => {
124- let count = 0 ;
124+ let _count = 0 ;
125125
126126 for ( const obj of symbolTaggedObjs ) {
127127 if ( obj [ $internal ] . type === aaa ) {
128- count += 2 ;
128+ _count += 2 ;
129129 } else if ( obj [ $internal ] . type === bbb ) {
130- count += 3 ;
130+ _count += 3 ;
131131 } else if ( obj [ $internal ] . type === ccc ) {
132- count += 4 ;
132+ _count += 4 ;
133133 }
134134 }
135135 } ,
136136 {
137137 beforeEach ( ) {
138138 symbolTaggedObjs = Array . from ( { length : NUMBER_OF_OBJS } , ( ) => ( {
139139 [ $internal ] : {
140- // biome-ignore lint/style/noNonNullAssertion: in range
140+ // oxlint-disable-next-line typescript/no-non-null-assertion
141141 type : SYMBOL_TAGS [ Math . floor ( Math . random ( ) * SYMBOL_TAGS . length ) ] ! ,
142142 } ,
143143 } ) ) ;
@@ -147,15 +147,15 @@ bench
147147 . add (
148148 'symbol keys' ,
149149 async ( ) => {
150- let count = 0 ;
150+ let _count = 0 ;
151151
152152 for ( const obj of symbolKeyedObjs ) {
153153 if ( obj [ aaa ] ) {
154- count += 2 ;
154+ _count += 2 ;
155155 } else if ( obj [ bbb ] ) {
156- count += 3 ;
156+ _count += 3 ;
157157 } else if ( obj [ ccc ] ) {
158- count += 4 ;
158+ _count += 4 ;
159159 }
160160 }
161161 } ,
@@ -165,7 +165,7 @@ bench
165165 { length : NUMBER_OF_OBJS } ,
166166 ( ) =>
167167 ( {
168- // biome-ignore lint/style/noNonNullAssertion: in range
168+ // oxlint-disable-next-line typescript/no-non-null-assertion
169169 [ SYMBOL_TAGS [ Math . floor ( Math . random ( ) * SYMBOL_TAGS . length ) ] ! ] :
170170 true ,
171171 } ) as { [ K in ( typeof SYMBOL_TAGS ) [ number ] ] : boolean } ,
0 commit comments