-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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): Handle qualified access in assign pat (#8012)
- Loading branch information
1 parent
7c22787
commit 2f01aba
Showing
5 changed files
with
85 additions
and
54 deletions.
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
18 changes: 9 additions & 9 deletions
18
crates/swc/tests/tsc-references/typeArgumentsWithStringLiteralTypes01.2.minified.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
10 changes: 10 additions & 0 deletions
10
crates/swc_ecma_transforms_typescript/tests/fixture/issue-8011/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,10 @@ | ||
namespace API { | ||
export let url = "/"; | ||
|
||
export function update(value: string) { | ||
url = value; | ||
} | ||
} | ||
|
||
API.update("/new"); | ||
console.log(API.url); |
10 changes: 10 additions & 0 deletions
10
crates/swc_ecma_transforms_typescript/tests/fixture/issue-8011/output.js
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,10 @@ | ||
var API; | ||
(function(API) { | ||
API.url = "/"; | ||
function update(value) { | ||
API.url = value; | ||
} | ||
API.update = update; | ||
})(API || (API = {})); | ||
API.update("/new"); | ||
console.log(API.url); |
2f01aba
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
289650
ns/iter (± 12923
)282449
ns/iter (± 7509
)1.03
es/full/minify/libraries/antd
1318521810
ns/iter (± 11772819
)1338949179
ns/iter (± 11337959
)0.98
es/full/minify/libraries/d3
277048233
ns/iter (± 2568365
)274325218
ns/iter (± 1449043
)1.01
es/full/minify/libraries/echarts
1059470217
ns/iter (± 6933353
)1067093159
ns/iter (± 5771137
)0.99
es/full/minify/libraries/jquery
84488195
ns/iter (± 446466
)84570412
ns/iter (± 321458
)1.00
es/full/minify/libraries/lodash
97431602
ns/iter (± 229058
)97523506
ns/iter (± 459472
)1.00
es/full/minify/libraries/moment
49949626
ns/iter (± 95031
)49801994
ns/iter (± 128396
)1.00
es/full/minify/libraries/react
18057161
ns/iter (± 48928
)18004233
ns/iter (± 19739
)1.00
es/full/minify/libraries/terser
218249351
ns/iter (± 768750
)218761213
ns/iter (± 1632454
)1.00
es/full/minify/libraries/three
386881625
ns/iter (± 2662566
)386911532
ns/iter (± 1791843
)1.00
es/full/minify/libraries/typescript
2599310602
ns/iter (± 13363509
)2680623810
ns/iter (± 13570212
)0.97
es/full/minify/libraries/victory
556328667
ns/iter (± 5115047
)578395358
ns/iter (± 3717483
)0.96
es/full/minify/libraries/vue
119371277
ns/iter (± 383121
)119620834
ns/iter (± 378850
)1.00
es/full/codegen/es3
34488
ns/iter (± 119
)34170
ns/iter (± 59
)1.01
es/full/codegen/es5
34762
ns/iter (± 145
)34114
ns/iter (± 84
)1.02
es/full/codegen/es2015
34702
ns/iter (± 143
)34166
ns/iter (± 61
)1.02
es/full/codegen/es2016
34548
ns/iter (± 137
)34187
ns/iter (± 94
)1.01
es/full/codegen/es2017
34716
ns/iter (± 232
)34108
ns/iter (± 83
)1.02
es/full/codegen/es2018
34639
ns/iter (± 145
)34107
ns/iter (± 91
)1.02
es/full/codegen/es2019
34583
ns/iter (± 145
)34169
ns/iter (± 77
)1.01
es/full/codegen/es2020
34605
ns/iter (± 106
)34139
ns/iter (± 66
)1.01
es/full/all/es3
164274922
ns/iter (± 1036964
)165401072
ns/iter (± 805762
)0.99
es/full/all/es5
158376299
ns/iter (± 1382441
)156727272
ns/iter (± 1625244
)1.01
es/full/all/es2015
116430147
ns/iter (± 594054
)117187163
ns/iter (± 498504
)0.99
es/full/all/es2016
115619287
ns/iter (± 890435
)115777913
ns/iter (± 962597
)1.00
es/full/all/es2017
115556294
ns/iter (± 875264
)115561284
ns/iter (± 820293
)1.00
es/full/all/es2018
113089083
ns/iter (± 508588
)112947588
ns/iter (± 684187
)1.00
es/full/all/es2019
112513220
ns/iter (± 347625
)112418713
ns/iter (± 409494
)1.00
es/full/all/es2020
108517256
ns/iter (± 2045340
)108720212
ns/iter (± 486187
)1.00
es/full/parser
494166
ns/iter (± 6429
)486609
ns/iter (± 4788
)1.02
es/full/base/fixer
18487
ns/iter (± 131
)18262
ns/iter (± 261
)1.01
es/full/base/resolver_and_hygiene
81429
ns/iter (± 843
)80597
ns/iter (± 192
)1.01
serialization of serde
297
ns/iter (± 4
)295
ns/iter (± 0
)1.01
css/minify/libraries/bootstrap
28595787
ns/iter (± 229472
)28354421
ns/iter (± 50094
)1.01
css/visitor/compare/clone
1650418
ns/iter (± 11572
)1687526
ns/iter (± 6366
)0.98
css/visitor/compare/visit_mut_span
1751935
ns/iter (± 10007
)1820409
ns/iter (± 7569
)0.96
css/visitor/compare/visit_mut_span_panic
1850548
ns/iter (± 11928
)1852989
ns/iter (± 3880
)1.00
css/visitor/compare/fold_span
2532507
ns/iter (± 22848
)2590169
ns/iter (± 12813
)0.98
css/visitor/compare/fold_span_panic
2766829
ns/iter (± 26902
)2768502
ns/iter (± 9198
)1.00
css/lexer/bootstrap_5_1_3
4395740
ns/iter (± 34431
)4439251
ns/iter (± 2101
)0.99
css/lexer/foundation_6_7_4
3693441
ns/iter (± 31056
)3737910
ns/iter (± 1876
)0.99
css/lexer/tailwind_3_1_1
701641
ns/iter (± 3783
)712373
ns/iter (± 240
)0.98
css/parser/bootstrap_5_1_3
19000559
ns/iter (± 116004
)19399738
ns/iter (± 47235
)0.98
css/parser/foundation_6_7_4
15207148
ns/iter (± 133650
)15457488
ns/iter (± 31873
)0.98
css/parser/tailwind_3_1_1
2944303
ns/iter (± 13316
)2962325
ns/iter (± 3102
)0.99
es/codegen/colors
738262
ns/iter (± 401637
)737893
ns/iter (± 404449
)1.00
es/codegen/large
2889338
ns/iter (± 1528039
)3162508
ns/iter (± 1683085
)0.91
es/codegen/with-parser/colors
45302
ns/iter (± 534
)45819
ns/iter (± 431
)0.99
es/codegen/with-parser/large
491966
ns/iter (± 2636
)498623
ns/iter (± 676
)0.99
es/minify/libraries/antd
1139945903
ns/iter (± 12863935
)1164663731
ns/iter (± 15049044
)0.98
es/minify/libraries/d3
239211206
ns/iter (± 684945
)241214164
ns/iter (± 1400502
)0.99
es/minify/libraries/echarts
907577178
ns/iter (± 8750979
)913849594
ns/iter (± 6630630
)0.99
es/minify/libraries/jquery
72948516
ns/iter (± 150513
)73566178
ns/iter (± 275219
)0.99
es/minify/libraries/lodash
86755822
ns/iter (± 150345
)87027397
ns/iter (± 257211
)1.00
es/minify/libraries/moment
43296453
ns/iter (± 76669
)43596954
ns/iter (± 183201
)0.99
es/minify/libraries/react
15931433
ns/iter (± 51221
)16091286
ns/iter (± 33296
)0.99
es/minify/libraries/terser
185341320
ns/iter (± 447762
)186656268
ns/iter (± 3704782
)0.99
es/minify/libraries/three
322886385
ns/iter (± 6531198
)324846004
ns/iter (± 1266950
)0.99
es/minify/libraries/typescript
2253431295
ns/iter (± 7466823
)2255133371
ns/iter (± 9122288
)1.00
es/minify/libraries/victory
473587192
ns/iter (± 8754992
)486064502
ns/iter (± 3401312
)0.97
es/minify/libraries/vue
106078479
ns/iter (± 266428
)106218837
ns/iter (± 372250
)1.00
es/visitor/compare/clone
1948461
ns/iter (± 5253
)1951175
ns/iter (± 3341
)1.00
es/visitor/compare/visit_mut_span
2285280
ns/iter (± 4790
)2276275
ns/iter (± 3634
)1.00
es/visitor/compare/visit_mut_span_panic
2327924
ns/iter (± 11633
)2322532
ns/iter (± 4473
)1.00
es/visitor/compare/fold_span
3351705
ns/iter (± 13478
)3362902
ns/iter (± 3599
)1.00
es/visitor/compare/fold_span_panic
3532970
ns/iter (± 6674
)3507062
ns/iter (± 10963
)1.01
es/lexer/colors
13022
ns/iter (± 67
)13279
ns/iter (± 22
)0.98
es/lexer/angular
6057985
ns/iter (± 32564
)6164048
ns/iter (± 31176
)0.98
es/lexer/backbone
775851
ns/iter (± 9075
)791150
ns/iter (± 3777
)0.98
es/lexer/jquery
4472820
ns/iter (± 12456
)4537775
ns/iter (± 12227
)0.99
es/lexer/jquery mobile
6704024
ns/iter (± 72810
)6883083
ns/iter (± 2578
)0.97
es/lexer/mootools
3508012
ns/iter (± 21022
)3567489
ns/iter (± 1864
)0.98
es/lexer/underscore
658221
ns/iter (± 4165
)661461
ns/iter (± 1150
)1.00
es/lexer/three
21145913
ns/iter (± 81998
)21528075
ns/iter (± 21773
)0.98
es/lexer/yui
3806050
ns/iter (± 14136
)3783982
ns/iter (± 3906
)1.01
es/parser/colors
27221
ns/iter (± 42
)27006
ns/iter (± 59
)1.01
es/parser/angular
13452375
ns/iter (± 130084
)13502372
ns/iter (± 51171
)1.00
es/parser/backbone
1956639
ns/iter (± 9591
)1975900
ns/iter (± 8863
)0.99
es/parser/jquery
10725163
ns/iter (± 71423
)10779860
ns/iter (± 41123
)0.99
es/parser/jquery mobile
16308758
ns/iter (± 145672
)16573142
ns/iter (± 57025
)0.98
es/parser/mootools
8200816
ns/iter (± 101071
)8304665
ns/iter (± 10927
)0.99
es/parser/underscore
1670062
ns/iter (± 18640
)1700918
ns/iter (± 7716
)0.98
es/parser/three
46210742
ns/iter (± 761338
)47246676
ns/iter (± 366210
)0.98
es/parser/yui
8266161
ns/iter (± 102601
)8247681
ns/iter (± 49236
)1.00
es/preset-env/usage/builtin_type
138109
ns/iter (± 32747
)139155
ns/iter (± 32842
)0.99
es/preset-env/usage/property
16396
ns/iter (± 67
)16968
ns/iter (± 53
)0.97
es/resolver/typescript
91397801
ns/iter (± 1453116
)91396691
ns/iter (± 887608
)1.00
es/fixer/typescript
62514198
ns/iter (± 1070787
)63686358
ns/iter (± 365604
)0.98
es/hygiene/typescript
129511869
ns/iter (± 552996
)131257016
ns/iter (± 695194
)0.99
es/resolver_with_hygiene/typescript
244155314
ns/iter (± 949650
)244732517
ns/iter (± 1822223
)1.00
es/visitor/base-perf/module_clone
59188
ns/iter (± 151
)59092
ns/iter (± 357
)1.00
es/visitor/base-perf/fold_empty
63084
ns/iter (± 305
)62667
ns/iter (± 240
)1.01
es/visitor/base-perf/fold_noop_impl_all
63140
ns/iter (± 381
)62809
ns/iter (± 131
)1.01
es/visitor/base-perf/fold_noop_impl_vec
63291
ns/iter (± 402
)63289
ns/iter (± 346
)1.00
es/visitor/base-perf/boxing_boxed_clone
56
ns/iter (± 0
)58
ns/iter (± 0
)0.97
es/visitor/base-perf/boxing_unboxed_clone
39
ns/iter (± 0
)39
ns/iter (± 0
)1
es/visitor/base-perf/boxing_boxed
108
ns/iter (± 0
)109
ns/iter (± 0
)0.99
es/visitor/base-perf/boxing_unboxed
77
ns/iter (± 0
)77
ns/iter (± 0
)1
es/visitor/base-perf/visit_empty
0
ns/iter (± 0
)0
ns/iter (± 0
)NaN
es/visitor/base-perf/visit_contains_this
2515
ns/iter (± 24
)2535
ns/iter (± 16
)0.99
es/base/parallel/resolver/typescript
4338239439
ns/iter (± 215466078
)4714031925
ns/iter (± 291885416
)0.92
es/base/parallel/hygiene/typescript
1433205572
ns/iter (± 14363859
)1454922214
ns/iter (± 16601214
)0.99
misc/visitors/time-complexity/time 5
140
ns/iter (± 1
)137
ns/iter (± 0
)1.02
misc/visitors/time-complexity/time 10
305
ns/iter (± 0
)305
ns/iter (± 33
)1
misc/visitors/time-complexity/time 15
599
ns/iter (± 3
)600
ns/iter (± 1
)1.00
misc/visitors/time-complexity/time 20
1057
ns/iter (± 7
)1169
ns/iter (± 3
)0.90
misc/visitors/time-complexity/time 40
4131
ns/iter (± 23
)3561
ns/iter (± 30
)1.16
misc/visitors/time-complexity/time 60
7739
ns/iter (± 81
)8833
ns/iter (± 4
)0.88
This comment was automatically generated by workflow using github-action-benchmark.