-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(es/typescript): Strip inline type declarations (#6600)
- Loading branch information
Showing
3 changed files
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
crates/swc_ecma_transforms_typescript/tests/fixture/issue-6598/input.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import { type BadgeProps } from './badge.js'; | ||
export { BadgeProps }; |
Empty file.
fe0c651
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
es/full/bugs-1
247101
ns/iter (± 22172
)286022
ns/iter (± 10667
)0.86
es/full/minify/libraries/antd
1760932785
ns/iter (± 35236413
)1641000858
ns/iter (± 51331238
)1.07
es/full/minify/libraries/d3
339077097
ns/iter (± 16890319
)316833511
ns/iter (± 8944142
)1.07
es/full/minify/libraries/echarts
1361906932
ns/iter (± 72991969
)1313882269
ns/iter (± 35108595
)1.04
es/full/minify/libraries/jquery
100339372
ns/iter (± 3357304
)97267549
ns/iter (± 1936003
)1.03
es/full/minify/libraries/lodash
119202831
ns/iter (± 2226784
)110739346
ns/iter (± 4393294
)1.08
es/full/minify/libraries/moment
55197044
ns/iter (± 1642735
)54846242
ns/iter (± 1110226
)1.01
es/full/minify/libraries/react
21583706
ns/iter (± 747539
)20307733
ns/iter (± 292829
)1.06
es/full/minify/libraries/terser
246785443
ns/iter (± 9590666
)248341339
ns/iter (± 4492197
)0.99
es/full/minify/libraries/three
489853108
ns/iter (± 18130568
)422954956
ns/iter (± 7831722
)1.16
es/full/minify/libraries/typescript
3194478726
ns/iter (± 101831252
)3118985789
ns/iter (± 42237942
)1.02
es/full/minify/libraries/victory
697338669
ns/iter (± 52703004
)644756074
ns/iter (± 19071288
)1.08
es/full/minify/libraries/vue
141988357
ns/iter (± 3318648
)130663694
ns/iter (± 1666169
)1.09
es/full/codegen/es3
27717
ns/iter (± 142
)26456
ns/iter (± 445
)1.05
es/full/codegen/es5
27679
ns/iter (± 163
)26740
ns/iter (± 249
)1.04
es/full/codegen/es2015
27760
ns/iter (± 102
)26890
ns/iter (± 259
)1.03
es/full/codegen/es2016
27682
ns/iter (± 138
)26606
ns/iter (± 289
)1.04
es/full/codegen/es2017
27759
ns/iter (± 92
)26700
ns/iter (± 186
)1.04
es/full/codegen/es2018
27768
ns/iter (± 63
)26766
ns/iter (± 306
)1.04
es/full/codegen/es2019
27766
ns/iter (± 102
)26300
ns/iter (± 360
)1.06
es/full/codegen/es2020
27626
ns/iter (± 298
)26805
ns/iter (± 346
)1.03
es/full/all/es3
172072617
ns/iter (± 6135596
)173335145
ns/iter (± 2672460
)0.99
es/full/all/es5
164746858
ns/iter (± 3252532
)164247488
ns/iter (± 1038343
)1.00
es/full/all/es2015
120140578
ns/iter (± 3531817
)119697702
ns/iter (± 3868801
)1.00
es/full/all/es2016
120912820
ns/iter (± 2749116
)119195849
ns/iter (± 959577
)1.01
es/full/all/es2017
123700056
ns/iter (± 3375730
)119054832
ns/iter (± 3906539
)1.04
es/full/all/es2018
123079663
ns/iter (± 3579266
)115906100
ns/iter (± 2353957
)1.06
es/full/all/es2019
119629726
ns/iter (± 4892562
)116392271
ns/iter (± 2899475
)1.03
es/full/all/es2020
115559026
ns/iter (± 2752948
)112670016
ns/iter (± 981171
)1.03
es/full/parser
491022
ns/iter (± 14057
)504150
ns/iter (± 10016
)0.97
es/full/base/fixer
22526
ns/iter (± 76
)21661
ns/iter (± 351
)1.04
es/full/base/resolver_and_hygiene
77989
ns/iter (± 1069
)76487
ns/iter (± 939
)1.02
serialization of ast node
140
ns/iter (± 0
)137
ns/iter (± 1
)1.02
serialization of serde
122
ns/iter (± 0
)119
ns/iter (± 1
)1.03
css/minify/libraries/bootstrap
28523506
ns/iter (± 207393
)26841146
ns/iter (± 211507
)1.06
css/visitor/compare/clone
2326696
ns/iter (± 12184
)2251915
ns/iter (± 17993
)1.03
css/visitor/compare/visit_mut_span
2436226
ns/iter (± 18097
)2415305
ns/iter (± 22205
)1.01
css/visitor/compare/visit_mut_span_panic
2496566
ns/iter (± 34891
)2477081
ns/iter (± 19021
)1.01
css/visitor/compare/fold_span
3464228
ns/iter (± 6354
)3434990
ns/iter (± 12753
)1.01
css/visitor/compare/fold_span_panic
3612309
ns/iter (± 22222
)3500685
ns/iter (± 41096
)1.03
css/lexer/bootstrap_5_1_3
5337641
ns/iter (± 12562
)5205945
ns/iter (± 55805
)1.03
css/lexer/foundation_6_7_4
4479110
ns/iter (± 16889
)4332995
ns/iter (± 52724
)1.03
css/lexer/tailwind_3_1_1
851944
ns/iter (± 332
)818347
ns/iter (± 7134
)1.04
css/parser/bootstrap_5_1_3
21381403
ns/iter (± 163550
)20384409
ns/iter (± 287686
)1.05
css/parser/foundation_6_7_4
16854198
ns/iter (± 92005
)16251342
ns/iter (± 166645
)1.04
css/parser/tailwind_3_1_1
3245862
ns/iter (± 7283
)3112249
ns/iter (± 26323
)1.04
es/codegen/colors
321185
ns/iter (± 180106
)322484
ns/iter (± 179164
)1.00
es/codegen/large
1229183
ns/iter (± 645421
)1191636
ns/iter (± 617614
)1.03
es/codegen/with-parser/colors
45411
ns/iter (± 326
)44244
ns/iter (± 882
)1.03
es/codegen/with-parser/large
509123
ns/iter (± 2138
)502515
ns/iter (± 5914
)1.01
es/minify/libraries/antd
1517962809
ns/iter (± 36952138
)1396287371
ns/iter (± 25580378
)1.09
es/minify/libraries/d3
309231302
ns/iter (± 19307079
)258944238
ns/iter (± 6034841
)1.19
es/minify/libraries/echarts
1257510887
ns/iter (± 72389710
)1098626026
ns/iter (± 23484016
)1.14
es/minify/libraries/jquery
90566836
ns/iter (± 2785905
)83850928
ns/iter (± 1304391
)1.08
es/minify/libraries/lodash
100578361
ns/iter (± 3199530
)96998183
ns/iter (± 2320672
)1.04
es/minify/libraries/moment
49917140
ns/iter (± 1056712
)46543412
ns/iter (± 847869
)1.07
es/minify/libraries/react
18060826
ns/iter (± 386015
)17906176
ns/iter (± 487025
)1.01
es/minify/libraries/terser
229373188
ns/iter (± 5990438
)204776458
ns/iter (± 6139509
)1.12
es/minify/libraries/three
403579271
ns/iter (± 11867873
)344443197
ns/iter (± 4670482
)1.17
es/minify/libraries/typescript
2812452288
ns/iter (± 89376664
)2651342497
ns/iter (± 20147659
)1.06
es/minify/libraries/victory
592250630
ns/iter (± 49024942
)540044090
ns/iter (± 14224036
)1.10
es/minify/libraries/vue
124860179
ns/iter (± 7377630
)114909949
ns/iter (± 1587006
)1.09
es/visitor/compare/clone
2429636
ns/iter (± 23865
)2325175
ns/iter (± 24594
)1.04
es/visitor/compare/visit_mut_span
2855607
ns/iter (± 12819
)2762762
ns/iter (± 22967
)1.03
es/visitor/compare/visit_mut_span_panic
2879966
ns/iter (± 29980
)2769392
ns/iter (± 25765
)1.04
es/visitor/compare/fold_span
3967326
ns/iter (± 25134
)3840016
ns/iter (± 39545
)1.03
es/visitor/compare/fold_span_panic
4088293
ns/iter (± 29642
)3992121
ns/iter (± 52630
)1.02
es/lexer/colors
17471
ns/iter (± 28
)17014
ns/iter (± 271
)1.03
es/lexer/angular
8216823
ns/iter (± 21759
)8037290
ns/iter (± 55735
)1.02
es/lexer/backbone
1072300
ns/iter (± 5358
)1051194
ns/iter (± 13619
)1.02
es/lexer/jquery
5960605
ns/iter (± 10842
)5910156
ns/iter (± 16895
)1.01
es/lexer/jquery mobile
9183822
ns/iter (± 46051
)8995402
ns/iter (± 106633
)1.02
es/lexer/mootools
4670205
ns/iter (± 19861
)4571413
ns/iter (± 49442
)1.02
es/lexer/underscore
891591
ns/iter (± 7720
)871636
ns/iter (± 10606
)1.02
es/lexer/three
27754705
ns/iter (± 131608
)27161791
ns/iter (± 212666
)1.02
es/lexer/yui
5057994
ns/iter (± 8886
)4974095
ns/iter (± 40599
)1.02
es/parser/colors
31417
ns/iter (± 195
)29837
ns/iter (± 480
)1.05
es/parser/angular
15862576
ns/iter (± 479840
)15553596
ns/iter (± 200717
)1.02
es/parser/backbone
2313100
ns/iter (± 11515
)2270784
ns/iter (± 19960
)1.02
es/parser/jquery
12024055
ns/iter (± 104950
)11911068
ns/iter (± 161700
)1.01
es/parser/jquery mobile
19919517
ns/iter (± 658234
)18832317
ns/iter (± 162068
)1.06
es/parser/mootools
9525641
ns/iter (± 48876
)9216664
ns/iter (± 98723
)1.03
es/parser/underscore
1888921
ns/iter (± 41464
)1895236
ns/iter (± 40567
)1.00
es/parser/three
54600402
ns/iter (± 1741517
)54767212
ns/iter (± 1214289
)1.00
es/parser/yui
9347880
ns/iter (± 162241
)9448172
ns/iter (± 168556
)0.99
es/preset-env/usage/builtin_type
140560
ns/iter (± 33798
)141372
ns/iter (± 30987
)0.99
es/preset-env/usage/property
20563
ns/iter (± 328
)21331
ns/iter (± 177
)0.96
es/resolver/typescript
122006933
ns/iter (± 3568118
)114929408
ns/iter (± 2462984
)1.06
es/fixer/typescript
99501167
ns/iter (± 1962001
)96439115
ns/iter (± 3231729
)1.03
es/hygiene/typescript
198746705
ns/iter (± 4525290
)191892567
ns/iter (± 2792233
)1.04
es/resolver_with_hygiene/typescript
331304414
ns/iter (± 4293507
)320824488
ns/iter (± 4212143
)1.03
es/visitor/base-perf/module_clone
74446
ns/iter (± 1288
)74219
ns/iter (± 1601
)1.00
es/visitor/base-perf/fold_empty
85902
ns/iter (± 956
)84749
ns/iter (± 579
)1.01
es/visitor/base-perf/fold_noop_impl_all
86065
ns/iter (± 942
)85020
ns/iter (± 1344
)1.01
es/visitor/base-perf/fold_noop_impl_vec
85928
ns/iter (± 1419
)84461
ns/iter (± 1616
)1.02
es/visitor/base-perf/boxing_boxed_clone
54
ns/iter (± 0
)53
ns/iter (± 0
)1.02
es/visitor/base-perf/boxing_unboxed_clone
58
ns/iter (± 0
)57
ns/iter (± 0
)1.02
es/visitor/base-perf/boxing_boxed
99
ns/iter (± 0
)97
ns/iter (± 1
)1.02
es/visitor/base-perf/boxing_unboxed
101
ns/iter (± 0
)100
ns/iter (± 0
)1.01
es/visitor/base-perf/visit_empty
0
ns/iter (± 0
)es/visitor/base-perf/visit_contains_this
3523
ns/iter (± 82
)3414
ns/iter (± 90
)1.03
es/base/parallel/resolver/typescript
9429015352
ns/iter (± 173604627
)9652601927
ns/iter (± 279210005
)0.98
es/base/parallel/hygiene/typescript
1258004048
ns/iter (± 25596301
)1275392704
ns/iter (± 26681323
)0.99
misc/visitors/time-complexity/time 5
96
ns/iter (± 0
)95
ns/iter (± 1
)1.01
misc/visitors/time-complexity/time 10
315
ns/iter (± 3
)333
ns/iter (± 4
)0.95
misc/visitors/time-complexity/time 15
649
ns/iter (± 7
)649
ns/iter (± 10
)1
misc/visitors/time-complexity/time 20
1191
ns/iter (± 9
)1199
ns/iter (± 8
)0.99
misc/visitors/time-complexity/time 40
6093
ns/iter (± 75
)6038
ns/iter (± 92
)1.01
misc/visitors/time-complexity/time 60
15117
ns/iter (± 114
)15091
ns/iter (± 110
)1.00
es/full-target/es2016
180705
ns/iter (± 2689
)183114
ns/iter (± 1663
)0.99
es/full-target/es2017
176324
ns/iter (± 2402
)178637
ns/iter (± 1233
)0.99
es/full-target/es2018
164561
ns/iter (± 1938
)167913
ns/iter (± 2339
)0.98
es2020_nullish_coalescing
63778
ns/iter (± 592
)65244
ns/iter (± 811
)0.98
es2020_optional_chaining
93065
ns/iter (± 654
)92611
ns/iter (± 869
)1.00
es2022_class_properties
89926
ns/iter (± 864
)90783
ns/iter (± 1065
)0.99
es2018_object_rest_spread
69125
ns/iter (± 551
)68813
ns/iter (± 819
)1.00
es2019_optional_catch_binding
58342
ns/iter (± 625
)58614
ns/iter (± 1036
)1.00
es2017_async_to_generator
58821
ns/iter (± 791
)59793
ns/iter (± 688
)0.98
es2016_exponentiation
62201
ns/iter (± 692
)63692
ns/iter (± 478
)0.98
es2015_arrow
67458
ns/iter (± 649
)69135
ns/iter (± 581
)0.98
es2015_block_scoped_fn
62615
ns/iter (± 896
)64387
ns/iter (± 701
)0.97
es2015_block_scoping
147939
ns/iter (± 7286
)151386
ns/iter (± 7590
)0.98
es2015_classes
112943
ns/iter (± 1241
)112806
ns/iter (± 518
)1.00
es2015_computed_props
58497
ns/iter (± 559
)58157
ns/iter (± 246
)1.01
es2015_destructuring
111699
ns/iter (± 1276
)113887
ns/iter (± 1983
)0.98
es2015_duplicate_keys
61215
ns/iter (± 415
)61901
ns/iter (± 693
)0.99
es2015_parameters
75066
ns/iter (± 759
)77804
ns/iter (± 833
)0.96
es2015_fn_name
62692
ns/iter (± 952
)63905
ns/iter (± 649
)0.98
es2015_for_of
61230
ns/iter (± 922
)61534
ns/iter (± 660
)1.00
es2015_instanceof
60692
ns/iter (± 236
)60047
ns/iter (± 1147
)1.01
es2015_shorthand_property
58221
ns/iter (± 688
)58702
ns/iter (± 694
)0.99
es2015_spread
58955
ns/iter (± 439
)58260
ns/iter (± 383
)1.01
es2015_sticky_regex
60110
ns/iter (± 465
)59834
ns/iter (± 685
)1.00
es2015_typeof_symbol
59018
ns/iter (± 539
)60227
ns/iter (± 618
)0.98
es/transform/baseline/base
48590
ns/iter (± 540
)49404
ns/iter (± 426
)0.98
es/transform/baseline/common_reserved_word
60069
ns/iter (± 802
)59073
ns/iter (± 231
)1.02
es/transform/baseline/common_typescript
140010
ns/iter (± 3438
)161842
ns/iter (± 1562
)0.87
es/target/es3
162896
ns/iter (± 2399
)161492
ns/iter (± 1843
)1.01
es/target/es2015
610624
ns/iter (± 7554
)607099
ns/iter (± 6809
)1.01
es/target/es2016
63161
ns/iter (± 506
)61861
ns/iter (± 486
)1.02
es/target/es2017
59721
ns/iter (± 213
)58832
ns/iter (± 768
)1.02
es/target/es2018
78286
ns/iter (± 961
)77622
ns/iter (± 656
)1.01
es/target/es2020
126979
ns/iter (± 1136
)127909
ns/iter (± 1387
)0.99
babelify-only
645767
ns/iter (± 7142
)653981
ns/iter (± 5416
)0.99
parse_and_babelify_angular
39541609
ns/iter (± 723076
)37029063
ns/iter (± 1100647
)1.07
parse_and_babelify_backbone
5475736
ns/iter (± 87356
)5452927
ns/iter (± 90354
)1.00
parse_and_babelify_jquery
30733920
ns/iter (± 462320
)29961998
ns/iter (± 317443
)1.03
parse_and_babelify_jquery_mobile
51658992
ns/iter (± 898572
)50682430
ns/iter (± 1097564
)1.02
parse_and_babelify_mootools
34012744
ns/iter (± 959493
)33096317
ns/iter (± 929290
)1.03
parse_and_babelify_underscore
4494157
ns/iter (± 38382
)4416501
ns/iter (± 32702
)1.02
parse_and_babelify_yui
31759027
ns/iter (± 1157393
)31965340
ns/iter (± 1747127
)0.99
html/minify/document/css_spec
43258485
ns/iter (± 533672
)41807403
ns/iter (± 413851
)1.03
html/minify/document/github
18099139
ns/iter (± 256760
)18072645
ns/iter (± 265652
)1.00
html/minify/document/stackoverflow
16217296
ns/iter (± 143809
)15891569
ns/iter (± 161944
)1.02
html/minify/document_fragment/css_spec
40687850
ns/iter (± 711470
)39418922
ns/iter (± 525231
)1.03
html/minify/document_fragment/github
17247325
ns/iter (± 198800
)17243361
ns/iter (± 125515
)1.00
html/minify/document_fragment/stackoverflow
15451898
ns/iter (± 196944
)15499757
ns/iter (± 259034
)1.00
html/document/visitor/compare/clone
337016
ns/iter (± 3728
)333339
ns/iter (± 3260
)1.01
html/document/visitor/compare/visit_mut_span
365432
ns/iter (± 4191
)363311
ns/iter (± 5147
)1.01
html/document/visitor/compare/visit_mut_span_panic
373385
ns/iter (± 4329
)369189
ns/iter (± 4648
)1.01
html/document/visitor/compare/fold_span
399453
ns/iter (± 3385
)399452
ns/iter (± 3971
)1.00
html/document/visitor/compare/fold_span_panic
452444
ns/iter (± 5134
)453910
ns/iter (± 4578
)1.00
html/document_fragment/visitor/compare/clone
329264
ns/iter (± 3370
)334992
ns/iter (± 4943
)0.98
html/document_fragment/visitor/compare/visit_mut_span
353785
ns/iter (± 4981
)361635
ns/iter (± 3695
)0.98
html/document_fragment/visitor/compare/visit_mut_span_panic
366547
ns/iter (± 2888
)366226
ns/iter (± 3610
)1.00
html/document_fragment/visitor/compare/fold_span
392677
ns/iter (± 2764
)390833
ns/iter (± 4105
)1.00
html/document_fragment/visitor/compare/fold_span_panic
449964
ns/iter (± 3274
)451898
ns/iter (± 5979
)1.00
html/lexer/css_2021_spec
15023146
ns/iter (± 153722
)14907315
ns/iter (± 154477
)1.01
html/lexer/github_com_17_05_2022
5873897
ns/iter (± 44254
)5833484
ns/iter (± 58956
)1.01
html/lexer/stackoverflow_com_17_05_2022
5544854
ns/iter (± 53234
)5433251
ns/iter (± 56163
)1.02
html/parser/parser_document/css_2021_spec
25211606
ns/iter (± 243436
)24595013
ns/iter (± 251322
)1.03
html/parser/parser_document/github_com_17_05_2022
8549066
ns/iter (± 107589
)8610122
ns/iter (± 130877
)0.99
html/parser/parser_document/stackoverflow_com_17_05_2022
7549404
ns/iter (± 81031
)7620787
ns/iter (± 90767
)0.99
html/parser/parser_document_fragment/css_2021_spec
25123178
ns/iter (± 415398
)24489265
ns/iter (± 200037
)1.03
html/parser/parser_document_fragment/github_com_17_05_2022
8546638
ns/iter (± 115978
)8441024
ns/iter (± 56844
)1.01
html/parser/parser_document_fragment/stackoverflow_com_17_05_2022
7534413
ns/iter (± 77134
)7593462
ns/iter (± 106942
)0.99
This comment was automatically generated by workflow using github-action-benchmark.