Skip to content

Commit 6614886

Browse files
authoredApr 11, 2023
fix(es/parser): Parse const type parameters in arrow function expressions (#7242)
1 parent 2a66235 commit 6614886

File tree

7 files changed

+400
-14
lines changed

7 files changed

+400
-14
lines changed
 

‎crates/swc_ecma_parser/src/parser/expr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ impl<I: Tokens> Parser<I> {
105105
}
106106
}
107107

108-
let type_parameters = p.parse_ts_type_params(false, false)?;
108+
let type_parameters = p.parse_ts_type_params(false, true)?;
109109
let mut arrow = p.parse_assignment_expr_base()?;
110110
match *arrow {
111111
Expr::Arrow(ArrowExpr {

‎crates/swc_ecma_parser/src/parser/typescript.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -398,16 +398,16 @@ impl<I: Tokens> Parser<I> {
398398
)? {
399399
match modifer {
400400
"const" => {
401+
is_const = true;
401402
if !permit_const {
402403
self.emit_err(
403404
self.input.prev_span(),
404405
SyntaxError::TS1277(js_word!("const")),
405406
);
406-
} else {
407-
is_const = true;
408407
}
409408
}
410409
"in" => {
410+
is_in = true;
411411
if !permit_in_out {
412412
self.emit_err(self.input.prev_span(), SyntaxError::TS1274(js_word!("in")));
413413
} else if is_in {
@@ -417,17 +417,14 @@ impl<I: Tokens> Parser<I> {
417417
self.input.prev_span(),
418418
SyntaxError::TS1029(js_word!("in"), js_word!("out")),
419419
);
420-
} else {
421-
is_in = true;
422420
}
423421
}
424422
"out" => {
423+
is_out = true;
425424
if !permit_in_out {
426425
self.emit_err(self.input.prev_span(), SyntaxError::TS1274(js_word!("out")));
427426
} else if is_out {
428427
self.emit_err(self.input.prev_span(), SyntaxError::TS1030(js_word!("out")));
429-
} else {
430-
is_out = true;
431428
}
432429
}
433430
other => self.emit_err(self.input.prev_span(), SyntaxError::TS1273(other.into())),

‎crates/swc_ecma_parser/tests/typescript-errors/variance-annotations/1/input.ts.swc-stderr

+227-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,152 @@
11

2+
x 'out' modifier already seen.
3+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:1:1]
4+
1 | type Covariant<out T> = {
5+
: ^^^
6+
2 | x: T;
7+
`----
8+
9+
x 'in' modifier already seen.
10+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:10:1]
11+
10 |
12+
11 | type Contravariant<in T> = {
13+
: ^^
14+
12 | f: (x: T) => void;
15+
`----
16+
17+
x 'in' modifier already seen.
18+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:20:1]
19+
20 |
20+
21 | type Invariant<in out T> = {
21+
: ^^
22+
22 | f: (x: T) => T;
23+
`----
24+
25+
x 'out' modifier already seen.
26+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:20:1]
27+
20 |
28+
21 | type Invariant<in out T> = {
29+
: ^^^
30+
22 | f: (x: T) => T;
31+
`----
32+
33+
x 'out' modifier already seen.
34+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:32:1]
35+
32 |
36+
33 | type T10<out T> = T;
37+
: ^^^
38+
34 | type T11<in T> = keyof T;
39+
`----
40+
41+
x 'in' modifier already seen.
42+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:33:1]
43+
33 | type T10<out T> = T;
44+
34 | type T11<in T> = keyof T;
45+
: ^^
46+
35 | type T12<out T, out K extends keyof T> = T[K];
47+
`----
48+
49+
x 'out' modifier already seen.
50+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:34:1]
51+
34 | type T11<in T> = keyof T;
52+
35 | type T12<out T, out K extends keyof T> = T[K];
53+
: ^^^
54+
36 | type T13<in out T> = T[keyof T];
55+
`----
56+
57+
x 'out' modifier already seen.
58+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:34:1]
59+
34 | type T11<in T> = keyof T;
60+
35 | type T12<out T, out K extends keyof T> = T[K];
61+
: ^^^
62+
36 | type T13<in out T> = T[keyof T];
63+
`----
64+
65+
x 'in' modifier already seen.
66+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:35:1]
67+
35 | type T12<out T, out K extends keyof T> = T[K];
68+
36 | type T13<in out T> = T[keyof T];
69+
: ^^
70+
`----
71+
72+
x 'out' modifier already seen.
73+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:35:1]
74+
35 | type T12<out T, out K extends keyof T> = T[K];
75+
36 | type T13<in out T> = T[keyof T];
76+
: ^^^
77+
`----
78+
79+
x 'in' modifier already seen.
80+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:39:1]
81+
39 |
82+
40 | type Covariant1<in T> = { // Error
83+
: ^^
84+
41 | x: T;
85+
`----
86+
87+
x 'out' modifier already seen.
88+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:43:1]
89+
43 |
90+
44 | type Contravariant1<out T> = keyof T; // Error
91+
: ^^^
92+
`----
93+
94+
x 'out' modifier already seen.
95+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:45:1]
96+
45 |
97+
46 | type Contravariant2<out T> = { // Error
98+
: ^^^
99+
47 | f: (x: T) => void;
100+
`----
101+
102+
x 'in' modifier already seen.
103+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:49:1]
104+
49 |
105+
50 | type Invariant1<in T> = { // Error
106+
: ^^
107+
51 | f: (x: T) => T;
108+
`----
109+
110+
x 'out' modifier already seen.
111+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:53:1]
112+
53 |
113+
54 | type Invariant2<out T> = { // Error
114+
: ^^^
115+
55 | f: (x: T) => T;
116+
`----
117+
118+
x 'in' modifier already seen.
119+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:59:1]
120+
59 |
121+
60 | type Foo1<in T> = { // Error
122+
: ^^
123+
61 | x: T;
124+
`----
125+
126+
x 'out' modifier already seen.
127+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:70:1]
128+
70 |
129+
71 | type Foo2<out T> = { // Error
130+
: ^^^
131+
72 | x: T;
132+
`----
133+
134+
x 'in' modifier already seen.
135+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:81:1]
136+
81 |
137+
82 | type Foo3<in out T> = {
138+
: ^^
139+
83 | x: T;
140+
`----
141+
142+
x 'out' modifier already seen.
143+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:81:1]
144+
81 |
145+
82 | type Foo3<in out T> = {
146+
: ^^^
147+
83 | x: T;
148+
`----
149+
2150
x 'public' modifier cannot appear on a type parameter
3151
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:94:1]
4152
94 |
@@ -10,11 +158,43 @@
10158
x 'in' modifier already seen.
11159
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:95:1]
12160
95 | type T20<public T> = T; // Error
161+
96 | type T21<in out in T> = T; // Error
162+
: ^^
163+
97 | type T22<in out out T> = T; // Error
164+
`----
165+
166+
x 'out' modifier already seen.
167+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:95:1]
168+
95 | type T20<public T> = T; // Error
169+
96 | type T21<in out in T> = T; // Error
170+
: ^^^
171+
97 | type T22<in out out T> = T; // Error
172+
`----
173+
174+
x 'in' modifier already seen.
175+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:95:1]
176+
95 | type T20<public T> = T; // Error
13177
96 | type T21<in out in T> = T; // Error
14178
: ^^
15179
97 | type T22<in out out T> = T; // Error
16180
`----
17181

182+
x 'in' modifier already seen.
183+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:96:1]
184+
96 | type T21<in out in T> = T; // Error
185+
97 | type T22<in out out T> = T; // Error
186+
: ^^
187+
98 | type T23<out in T> = T; // Error
188+
`----
189+
190+
x 'out' modifier already seen.
191+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:96:1]
192+
96 | type T21<in out in T> = T; // Error
193+
97 | type T22<in out out T> = T; // Error
194+
: ^^^
195+
98 | type T23<out in T> = T; // Error
196+
`----
197+
18198
x 'out' modifier already seen.
19199
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:96:1]
20200
96 | type T21<in out in T> = T; // Error
@@ -23,7 +203,14 @@
23203
98 | type T23<out in T> = T; // Error
24204
`----
25205

26-
x 'in' modifier must precede 'out' modifier.
206+
x 'out' modifier already seen.
207+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:97:1]
208+
97 | type T22<in out out T> = T; // Error
209+
98 | type T23<out in T> = T; // Error
210+
: ^^^
211+
`----
212+
213+
x 'in' modifier already seen.
27214
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:97:1]
28215
97 | type T22<in out out T> = T; // Error
29216
98 | type T23<out in T> = T; // Error
@@ -60,3 +247,42 @@
60247
: ^^^
61248
106 | }
62249
`----
250+
251+
x 'out' modifier already seen.
252+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:109:1]
253+
109 |
254+
110 | interface Baz<out T> {}
255+
: ^^^
256+
111 | interface Baz<in T> {}
257+
`----
258+
259+
x 'in' modifier already seen.
260+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:110:1]
261+
110 | interface Baz<out T> {}
262+
111 | interface Baz<in T> {}
263+
: ^^
264+
`----
265+
266+
x 'out' modifier already seen.
267+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:120:1]
268+
120 |
269+
121 | interface Parent<out A> {
270+
: ^^^
271+
122 | child: Child<A> | null;
272+
`----
273+
274+
x 'in' modifier already seen.
275+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:139:1]
276+
139 |
277+
140 | declare class StateNode<TContext, in out TEvent extends { type: string }> {
278+
: ^^
279+
141 | _storedEvent: TEvent;
280+
`----
281+
282+
x 'out' modifier already seen.
283+
,-[$DIR/tests/typescript-errors/variance-annotations/1/input.ts:139:1]
284+
139 |
285+
140 | declare class StateNode<TContext, in out TEvent extends { type: string }> {
286+
: ^^^
287+
141 | _storedEvent: TEvent;
288+
`----
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const fn = <const Data extends Type>(payload: Data) => payload;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
{
2+
"type": "Module",
3+
"span": {
4+
"start": 1,
5+
"end": 71,
6+
"ctxt": 0
7+
},
8+
"body": [
9+
{
10+
"type": "ExportDeclaration",
11+
"span": {
12+
"start": 1,
13+
"end": 71,
14+
"ctxt": 0
15+
},
16+
"declaration": {
17+
"type": "VariableDeclaration",
18+
"span": {
19+
"start": 8,
20+
"end": 71,
21+
"ctxt": 0
22+
},
23+
"kind": "const",
24+
"declare": false,
25+
"declarations": [
26+
{
27+
"type": "VariableDeclarator",
28+
"span": {
29+
"start": 14,
30+
"end": 70,
31+
"ctxt": 0
32+
},
33+
"id": {
34+
"type": "Identifier",
35+
"span": {
36+
"start": 14,
37+
"end": 16,
38+
"ctxt": 0
39+
},
40+
"value": "fn",
41+
"optional": false,
42+
"typeAnnotation": null
43+
},
44+
"init": {
45+
"type": "ArrowFunctionExpression",
46+
"span": {
47+
"start": 19,
48+
"end": 70,
49+
"ctxt": 0
50+
},
51+
"params": [
52+
{
53+
"type": "Identifier",
54+
"span": {
55+
"start": 45,
56+
"end": 58,
57+
"ctxt": 0
58+
},
59+
"value": "payload",
60+
"optional": false,
61+
"typeAnnotation": {
62+
"type": "TsTypeAnnotation",
63+
"span": {
64+
"start": 52,
65+
"end": 58,
66+
"ctxt": 0
67+
},
68+
"typeAnnotation": {
69+
"type": "TsTypeReference",
70+
"span": {
71+
"start": 54,
72+
"end": 58,
73+
"ctxt": 0
74+
},
75+
"typeName": {
76+
"type": "Identifier",
77+
"span": {
78+
"start": 54,
79+
"end": 58,
80+
"ctxt": 0
81+
},
82+
"value": "Data",
83+
"optional": false
84+
},
85+
"typeParams": null
86+
}
87+
}
88+
}
89+
],
90+
"body": {
91+
"type": "Identifier",
92+
"span": {
93+
"start": 63,
94+
"end": 70,
95+
"ctxt": 0
96+
},
97+
"value": "payload",
98+
"optional": false
99+
},
100+
"async": false,
101+
"generator": false,
102+
"typeParameters": {
103+
"type": "TsTypeParameterDeclaration",
104+
"span": {
105+
"start": 19,
106+
"end": 44,
107+
"ctxt": 0
108+
},
109+
"parameters": [
110+
{
111+
"type": "TsTypeParameter",
112+
"span": {
113+
"start": 20,
114+
"end": 43,
115+
"ctxt": 0
116+
},
117+
"name": {
118+
"type": "Identifier",
119+
"span": {
120+
"start": 26,
121+
"end": 30,
122+
"ctxt": 0
123+
},
124+
"value": "Data",
125+
"optional": false
126+
},
127+
"in": false,
128+
"out": false,
129+
"const": true,
130+
"constraint": {
131+
"type": "TsTypeReference",
132+
"span": {
133+
"start": 39,
134+
"end": 43,
135+
"ctxt": 0
136+
},
137+
"typeName": {
138+
"type": "Identifier",
139+
"span": {
140+
"start": 39,
141+
"end": 43,
142+
"ctxt": 0
143+
},
144+
"value": "Type",
145+
"optional": false
146+
},
147+
"typeParams": null
148+
},
149+
"default": null
150+
}
151+
]
152+
},
153+
"returnType": null
154+
},
155+
"definite": false
156+
}
157+
]
158+
}
159+
}
160+
],
161+
"interpreter": null
162+
}

‎crates/swc_ecma_parser/tests/typescript/variance-annotations/1/input.ts.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -3973,7 +3973,7 @@
39733973
"value": "T",
39743974
"optional": false
39753975
},
3976-
"in": false,
3976+
"in": true,
39773977
"out": true,
39783978
"const": false,
39793979
"constraint": null,
@@ -4096,7 +4096,7 @@
40964096
"value": "T",
40974097
"optional": false
40984098
},
4099-
"in": false,
4099+
"in": true,
41004100
"out": false,
41014101
"const": false,
41024102
"constraint": null,
@@ -4171,7 +4171,7 @@
41714171
"optional": false
41724172
},
41734173
"in": false,
4174-
"out": false,
4174+
"out": true,
41754175
"const": false,
41764176
"constraint": null,
41774177
"default": null

‎crates/swc_ecma_parser/tests/typescript/variance-annotations/with_jsx/input.tsx.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -3973,7 +3973,7 @@
39733973
"value": "T",
39743974
"optional": false
39753975
},
3976-
"in": false,
3976+
"in": true,
39773977
"out": true,
39783978
"const": false,
39793979
"constraint": null,
@@ -4096,7 +4096,7 @@
40964096
"value": "T",
40974097
"optional": false
40984098
},
4099-
"in": false,
4099+
"in": true,
41004100
"out": false,
41014101
"const": false,
41024102
"constraint": null,
@@ -4171,7 +4171,7 @@
41714171
"optional": false
41724172
},
41734173
"in": false,
4174-
"out": false,
4174+
"out": true,
41754175
"const": false,
41764176
"constraint": null,
41774177
"default": null

1 commit comments

Comments
 (1)

github-actions[bot] commented on Apr 11, 2023

@github-actions[bot]

Benchmark

Benchmark suite Current: 6614886 Previous: 01db30f Ratio
es/full/bugs-1 318761 ns/iter (± 10108) 310987 ns/iter (± 16623) 1.02
es/full/minify/libraries/antd 1540535456 ns/iter (± 19489631) 1781397600 ns/iter (± 30219133) 0.86
es/full/minify/libraries/d3 303248018 ns/iter (± 5263571) 327460891 ns/iter (± 4232900) 0.93
es/full/minify/libraries/echarts 1200152673 ns/iter (± 17577650) 1360038360 ns/iter (± 12264649) 0.88
es/full/minify/libraries/jquery 90883449 ns/iter (± 1218443) 100764211 ns/iter (± 2694558) 0.90
es/full/minify/libraries/lodash 105791052 ns/iter (± 1383415) 114258472 ns/iter (± 1657267) 0.93
es/full/minify/libraries/moment 52647009 ns/iter (± 613407) 56051808 ns/iter (± 909252) 0.94
es/full/minify/libraries/react 19201783 ns/iter (± 262000) 20932723 ns/iter (± 228381) 0.92
es/full/minify/libraries/terser 245826459 ns/iter (± 3029288) 295502667 ns/iter (± 6542611) 0.83
es/full/minify/libraries/three 446248919 ns/iter (± 8469340) 526162730 ns/iter (± 6071390) 0.85
es/full/minify/libraries/typescript 2904751083 ns/iter (± 14828970) 3414818458 ns/iter (± 18063098) 0.85
es/full/minify/libraries/victory 657328400 ns/iter (± 14513358) 809035184 ns/iter (± 15729455) 0.81
es/full/minify/libraries/vue 128735397 ns/iter (± 1332115) 152802856 ns/iter (± 4728462) 0.84
es/full/codegen/es3 28687 ns/iter (± 44) 28731 ns/iter (± 35) 1.00
es/full/codegen/es5 28746 ns/iter (± 52) 28762 ns/iter (± 53) 1.00
es/full/codegen/es2015 28766 ns/iter (± 54) 28758 ns/iter (± 28) 1.00
es/full/codegen/es2016 28819 ns/iter (± 48) 28815 ns/iter (± 63) 1.00
es/full/codegen/es2017 28819 ns/iter (± 75) 28768 ns/iter (± 38) 1.00
es/full/codegen/es2018 28796 ns/iter (± 64) 28782 ns/iter (± 40) 1.00
es/full/codegen/es2019 28762 ns/iter (± 41) 28784 ns/iter (± 73) 1.00
es/full/codegen/es2020 28745 ns/iter (± 61) 28762 ns/iter (± 60) 1.00
es/full/all/es3 183437772 ns/iter (± 3220962) 187440589 ns/iter (± 4127629) 0.98
es/full/all/es5 173658622 ns/iter (± 2729690) 176823383 ns/iter (± 4049776) 0.98
es/full/all/es2015 138215138 ns/iter (± 2232225) 138636022 ns/iter (± 1933832) 1.00
es/full/all/es2016 136728591 ns/iter (± 2473161) 135461524 ns/iter (± 3349038) 1.01
es/full/all/es2017 136008978 ns/iter (± 1746757) 134492978 ns/iter (± 2312005) 1.01
es/full/all/es2018 132256693 ns/iter (± 2736929) 132566535 ns/iter (± 3184680) 1.00
es/full/all/es2019 129481985 ns/iter (± 2862417) 130063263 ns/iter (± 3553001) 1.00
es/full/all/es2020 121559695 ns/iter (± 2443914) 121387588 ns/iter (± 1659426) 1.00
es/full/parser 519713 ns/iter (± 6665) 515005 ns/iter (± 10358) 1.01
es/full/base/fixer 22975 ns/iter (± 31) 22819 ns/iter (± 33) 1.01
es/full/base/resolver_and_hygiene 87298 ns/iter (± 388) 83326 ns/iter (± 94) 1.05
serialization of serde 120 ns/iter (± 0) 121 ns/iter (± 0) 0.99
css/minify/libraries/bootstrap 27403922 ns/iter (± 172175) 29127435 ns/iter (± 217886) 0.94
css/visitor/compare/clone 2125950 ns/iter (± 10613) 2150211 ns/iter (± 79035) 0.99
css/visitor/compare/visit_mut_span 2320011 ns/iter (± 5669) 2370471 ns/iter (± 16295) 0.98
css/visitor/compare/visit_mut_span_panic 2359653 ns/iter (± 4337) 2408985 ns/iter (± 14057) 0.98
css/visitor/compare/fold_span 3090593 ns/iter (± 13871) 3153412 ns/iter (± 80809) 0.98
css/visitor/compare/fold_span_panic 3240693 ns/iter (± 18263) 3326931 ns/iter (± 16756) 0.97
css/lexer/bootstrap_5_1_3 5120287 ns/iter (± 5710) 5148263 ns/iter (± 109408) 0.99
css/lexer/foundation_6_7_4 4322057 ns/iter (± 968) 4319727 ns/iter (± 7437) 1.00
css/lexer/tailwind_3_1_1 819325 ns/iter (± 238) 820270 ns/iter (± 163) 1.00
css/parser/bootstrap_5_1_3 21016435 ns/iter (± 39976) 22071583 ns/iter (± 147861) 0.95
css/parser/foundation_6_7_4 16776957 ns/iter (± 47684) 17693101 ns/iter (± 475164) 0.95
css/parser/tailwind_3_1_1 3238295 ns/iter (± 1981) 3324730 ns/iter (± 27268) 0.97
es/codegen/colors 326138 ns/iter (± 184574) 306631 ns/iter (± 173290) 1.06
es/codegen/large 1273638 ns/iter (± 659315) 1129709 ns/iter (± 564407) 1.13
es/codegen/with-parser/colors 47406 ns/iter (± 320) 47105 ns/iter (± 314) 1.01
es/codegen/with-parser/large 516292 ns/iter (± 978) 515105 ns/iter (± 1033) 1.00
es/minify/libraries/antd 1357794145 ns/iter (± 25557821) 1507532962 ns/iter (± 16489070) 0.90
es/minify/libraries/d3 253544134 ns/iter (± 4014358) 284330716 ns/iter (± 3538501) 0.89
es/minify/libraries/echarts 1045352703 ns/iter (± 12576466) 1164392654 ns/iter (± 4679526) 0.90
es/minify/libraries/jquery 79036411 ns/iter (± 1549596) 83237062 ns/iter (± 706295) 0.95
es/minify/libraries/lodash 95393996 ns/iter (± 2048208) 99422233 ns/iter (± 1667534) 0.96
es/minify/libraries/moment 45907089 ns/iter (± 567045) 47936411 ns/iter (± 483959) 0.96
es/minify/libraries/react 17290164 ns/iter (± 202946) 17786494 ns/iter (± 178256) 0.97
es/minify/libraries/terser 210138879 ns/iter (± 3826309) 233965961 ns/iter (± 2311305) 0.90
es/minify/libraries/three 361979261 ns/iter (± 6623358) 414643604 ns/iter (± 9000240) 0.87
es/minify/libraries/typescript 2472570770 ns/iter (± 12244433) 2787833062 ns/iter (± 27322859) 0.89
es/minify/libraries/victory 563215044 ns/iter (± 9468647) 655240208 ns/iter (± 12481010) 0.86
es/minify/libraries/vue 117522469 ns/iter (± 1411875) 124672099 ns/iter (± 2285814) 0.94
es/visitor/compare/clone 2318495 ns/iter (± 9462) 2352686 ns/iter (± 20036) 0.99
es/visitor/compare/visit_mut_span 2683595 ns/iter (± 20922) 2750719 ns/iter (± 13907) 0.98
es/visitor/compare/visit_mut_span_panic 2735370 ns/iter (± 6066) 2796696 ns/iter (± 13811) 0.98
es/visitor/compare/fold_span 3799477 ns/iter (± 6911) 3910334 ns/iter (± 20100) 0.97
es/visitor/compare/fold_span_panic 3938554 ns/iter (± 5854) 4047574 ns/iter (± 54368) 0.97
es/lexer/colors 13107 ns/iter (± 12) 13084 ns/iter (± 7) 1.00
es/lexer/angular 6383535 ns/iter (± 8768) 6345345 ns/iter (± 9034) 1.01
es/lexer/backbone 788908 ns/iter (± 5213) 783922 ns/iter (± 282) 1.01
es/lexer/jquery 4412595 ns/iter (± 3294) 4379053 ns/iter (± 1719) 1.01
es/lexer/jquery mobile 6898193 ns/iter (± 5754) 6864056 ns/iter (± 9051) 1.00
es/lexer/mootools 3461816 ns/iter (± 3146) 3438053 ns/iter (± 22277) 1.01
es/lexer/underscore 649772 ns/iter (± 375) 648236 ns/iter (± 119) 1.00
es/lexer/three 20824025 ns/iter (± 16736) 20887612 ns/iter (± 15405) 1.00
es/lexer/yui 3862512 ns/iter (± 2596) 3852983 ns/iter (± 996) 1.00
es/parser/colors 29345 ns/iter (± 80) 28854 ns/iter (± 52) 1.02
es/parser/angular 15264533 ns/iter (± 178132) 15995707 ns/iter (± 303691) 0.95
es/parser/backbone 2170485 ns/iter (± 13338) 2176085 ns/iter (± 10327) 1.00
es/parser/jquery 11793177 ns/iter (± 109992) 12415528 ns/iter (± 220949) 0.95
es/parser/jquery mobile 18343768 ns/iter (± 169759) 20582463 ns/iter (± 331497) 0.89
es/parser/mootools 8995344 ns/iter (± 24756) 9170740 ns/iter (± 51601) 0.98
es/parser/underscore 1831198 ns/iter (± 9836) 1837595 ns/iter (± 10662) 1.00
es/parser/three 53615139 ns/iter (± 670682) 57758441 ns/iter (± 285549) 0.93
es/parser/yui 9016924 ns/iter (± 39468) 9431017 ns/iter (± 154765) 0.96
es/preset-env/usage/builtin_type 143822 ns/iter (± 33833) 144997 ns/iter (± 36068) 0.99
es/preset-env/usage/property 21128 ns/iter (± 102) 21840 ns/iter (± 125) 0.97
es/resolver/typescript 115073624 ns/iter (± 4143878) 125143204 ns/iter (± 3708599) 0.92
es/fixer/typescript 81072585 ns/iter (± 1240885) 94996287 ns/iter (± 2253378) 0.85
es/hygiene/typescript 169817979 ns/iter (± 1840552) 201455406 ns/iter (± 1159470) 0.84
es/resolver_with_hygiene/typescript 301348666 ns/iter (± 2875570) 352253258 ns/iter (± 1665354) 0.86
es/visitor/base-perf/module_clone 80913 ns/iter (± 274) 81098 ns/iter (± 463) 1.00
es/visitor/base-perf/fold_empty 90970 ns/iter (± 348) 90735 ns/iter (± 333) 1.00
es/visitor/base-perf/fold_noop_impl_all 91145 ns/iter (± 432) 90871 ns/iter (± 364) 1.00
es/visitor/base-perf/fold_noop_impl_vec 91058 ns/iter (± 697) 90924 ns/iter (± 288) 1.00
es/visitor/base-perf/boxing_boxed_clone 56 ns/iter (± 0) 56 ns/iter (± 0) 1
es/visitor/base-perf/boxing_unboxed_clone 42 ns/iter (± 0) 41 ns/iter (± 0) 1.02
es/visitor/base-perf/boxing_boxed 102 ns/iter (± 0) 102 ns/iter (± 0) 1
es/visitor/base-perf/boxing_unboxed 79 ns/iter (± 0) 78 ns/iter (± 0) 1.01
es/visitor/base-perf/visit_contains_this 3485 ns/iter (± 60) 3624 ns/iter (± 73) 0.96
es/base/parallel/resolver/typescript 5923342132 ns/iter (± 331699496) 6427992707 ns/iter (± 620000710) 0.92
es/base/parallel/hygiene/typescript 2023302488 ns/iter (± 30496383) 2281148809 ns/iter (± 40553903) 0.89
misc/visitors/time-complexity/time 5 109 ns/iter (± 0) 103 ns/iter (± 0) 1.06
misc/visitors/time-complexity/time 10 356 ns/iter (± 0) 330 ns/iter (± 5) 1.08
misc/visitors/time-complexity/time 15 691 ns/iter (± 8) 649 ns/iter (± 0) 1.06
misc/visitors/time-complexity/time 20 1270 ns/iter (± 5) 1242 ns/iter (± 8) 1.02
misc/visitors/time-complexity/time 40 6798 ns/iter (± 45) 6571 ns/iter (± 73) 1.03
misc/visitors/time-complexity/time 60 17290 ns/iter (± 124) 17015 ns/iter (± 42) 1.02
es/full-target/es2016 253563 ns/iter (± 3813) 253426 ns/iter (± 436) 1.00
es/full-target/es2017 246813 ns/iter (± 344) 245689 ns/iter (± 397) 1.00
es/full-target/es2018 235957 ns/iter (± 424) 235023 ns/iter (± 223) 1.00
es2020_nullish_coalescing 92535 ns/iter (± 275) 92512 ns/iter (± 502) 1.00
es2020_optional_chaining 124632 ns/iter (± 287) 124853 ns/iter (± 337) 1.00
es2022_class_properties 149793 ns/iter (± 350) 149327 ns/iter (± 320) 1.00
es2018_object_rest_spread 96203 ns/iter (± 294) 95956 ns/iter (± 103) 1.00
es2019_optional_catch_binding 85294 ns/iter (± 109) 85239 ns/iter (± 200) 1.00
es2017_async_to_generator 85874 ns/iter (± 334) 85906 ns/iter (± 227) 1.00
es2016_exponentiation 89799 ns/iter (± 249) 90031 ns/iter (± 130) 1.00
es2015_arrow 94331 ns/iter (± 178) 94614 ns/iter (± 255) 1.00
es2015_block_scoped_fn 91873 ns/iter (± 181) 91616 ns/iter (± 230) 1.00
es2015_block_scoping 170091 ns/iter (± 382) 170330 ns/iter (± 257) 1.00

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.