Skip to content

Conversation

@Zzzen
Copy link
Contributor

Fixes#50349

@typescript-bottypescript-bot added the For Backlog Bug PRs that fix a backlog bug label Aug 19, 2022
}
if (isFunctionLike(current)){
return true;
return !getImmediatelyInvokedFunctionExpression(current);
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enum is not checked properly. playground

functionfoo17(){leta=(()=>Enum.Yes)();// should errorenumEnum{No=0,Yes=1,}}foo17()

@DanielRosenwasser
Copy link
Member

@typescript-bot test this
@typescript-bot user test this
@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 22, 2022

Heya @DanielRosenwasser, I've started to run the extended test suite on this PR at 4190fb8. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 22, 2022

Heya @DanielRosenwasser, I've started to run the diff-based user code test suite on this PR at 4190fb8. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 22, 2022

Heya @DanielRosenwasser, I've started to run the perf test suite on this PR at 4190fb8. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

@DanielRosenwasser Here are the results of running the user test suite comparing main and refs/pull/50372/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

Heya @DanielRosenwasser, I've run the RWC suite on this PR - assuming you're on the TS core team, you can view the resulting diff here.

@typescript-bot
Copy link
Collaborator

@DanielRosenwasser
The results of the perf run you requested are in!

Here they are:

Compiler

Comparison Report - main..50372
Metricmain50372DeltaBestWorst
Angular - node (v10.16.3, x64)
Memory used361,765k (± 0.03%)361,717k (± 0.02%)-48k (- 0.01%)361,520k361,900k
Parse Time2.08s (± 0.54%)2.09s (± 0.34%)+0.01s (+ 0.63%)2.08s2.10s
Bind Time0.79s (± 0.75%)0.79s (± 0.78%)-0.01s (- 0.75%)0.78s0.81s
Check Time6.02s (± 0.55%)6.03s (± 0.73%)+0.00s (+ 0.07%)5.92s6.13s
Emit Time6.01s (± 0.31%)5.96s (± 1.07%)-0.05s (- 0.90%)5.87s6.15s
Total Time14.91s (± 0.26%)14.87s (± 0.66%)-0.04s (- 0.27%)14.71s15.09s
Compiler-Unions - node (v10.16.3, x64)
Memory used205,810k (± 0.03%)205,884k (± 0.03%)+74k (+ 0.04%)205,739k206,097k
Parse Time0.83s (± 0.92%)0.83s (± 0.44%)+0.01s (+ 0.97%)0.83s0.84s
Bind Time0.47s (± 1.22%)0.47s (± 1.27%)-0.00s (- 0.85%)0.45s0.48s
Check Time7.32s (± 0.54%)7.29s (± 0.45%)-0.02s (- 0.34%)7.21s7.36s
Emit Time2.43s (± 0.73%)2.43s (± 1.11%)+0.00s (+ 0.16%)2.38s2.51s
Total Time11.04s (± 0.29%)11.03s (± 0.51%)-0.01s (- 0.14%)10.88s11.18s
Monaco - node (v10.16.3, x64)
Memory used344,245k (± 0.02%)344,240k (± 0.01%)-5k (- 0.00%)344,132k344,362k
Parse Time1.60s (± 0.59%)1.60s (± 0.51%)-0.00s (- 0.00%)1.58s1.62s
Bind Time0.70s (± 0.57%)0.70s (± 0.88%)0.00s ( 0.00%)0.69s0.71s
Check Time5.96s (± 0.54%)5.99s (± 0.50%)+0.03s (+ 0.52%)5.94s6.07s
Emit Time3.25s (± 1.06%)3.26s (± 0.76%)+0.01s (+ 0.34%)3.20s3.31s
Total Time11.50s (± 0.52%)11.55s (± 0.42%)+0.04s (+ 0.38%)11.44s11.66s
TFS - node (v10.16.3, x64)
Memory used305,446k (± 0.02%)305,457k (± 0.03%)+11k (+ 0.00%)305,244k305,661k
Parse Time1.28s (± 0.77%)1.29s (± 0.48%)+0.01s (+ 1.02%)1.28s1.31s
Bind Time0.67s (± 0.86%)0.67s (± 0.66%)+0.00s (+ 0.30%)0.66s0.68s
Check Time5.42s (± 0.55%)5.42s (± 0.70%)+0.01s (+ 0.11%)5.37s5.55s
Emit Time3.40s (± 1.45%)3.44s (± 1.55%)+0.05s (+ 1.35%)3.35s3.56s
Total Time10.76s (± 0.52%)10.82s (± 0.64%)+0.07s (+ 0.61%)10.71s10.98s
material-ui - node (v10.16.3, x64)
Memory used473,096k (± 0.01%)473,125k (± 0.01%)+29k (+ 0.01%)472,979k473,224k
Parse Time1.82s (± 0.66%)1.82s (± 0.57%)+0.00s (+ 0.06%)1.80s1.84s
Bind Time0.58s (± 1.96%)0.58s (± 1.82%)+0.00s (+ 0.52%)0.56s0.60s
Check Time14.58s (± 0.46%)14.62s (± 0.48%)+0.04s (+ 0.27%)14.46s14.77s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time16.98s (± 0.40%)17.02s (± 0.46%)+0.05s (+ 0.28%)16.86s17.20s
xstate - node (v10.16.3, x64)
Memory used583,187k (± 0.02%)586,545k (± 1.24%)+3,359k (+ 0.58%)583,170k616,037k
Parse Time2.58s (± 0.36%)2.60s (± 0.52%)+0.02s (+ 0.74%)2.58s2.64s
Bind Time0.90s (± 0.72%)0.91s (± 1.15%)+0.01s (+ 0.67%)0.87s0.92s
Check Time1.56s (± 0.38%)1.58s (± 0.66%)+0.02s (+ 1.54%)1.55s1.60s
Emit Time0.07s (± 4.13%)0.07s (± 3.14%)-0.00s (- 1.39%)0.07s0.08s
Total Time5.12s (± 0.25%)5.15s (± 0.47%)+0.04s (+ 0.74%)5.10s5.20s
Angular - node (v12.1.0, x64)
Memory used339,188k (± 0.10%)339,403k (± 0.02%)+215k (+ 0.06%)339,268k339,535k
Parse Time2.08s (± 0.77%)2.08s (± 0.67%)+0.00s (+ 0.05%)2.05s2.12s
Bind Time0.77s (± 0.62%)0.77s (± 0.62%)+0.01s (+ 0.78%)0.76s0.78s
Check Time5.83s (± 0.92%)5.82s (± 0.40%)-0.02s (- 0.33%)5.77s5.87s
Emit Time6.23s (± 0.81%)6.24s (± 0.87%)+0.00s (+ 0.02%)6.14s6.33s
Total Time14.92s (± 0.74%)14.91s (± 0.45%)-0.01s (- 0.06%)14.74s15.03s
Compiler-Unions - node (v12.1.0, x64)
Memory used193,440k (± 0.13%)193,585k (± 0.09%)+144k (+ 0.07%)192,945k193,757k
Parse Time0.82s (± 0.68%)0.83s (± 1.09%)+0.01s (+ 0.85%)0.81s0.86s
Bind Time0.47s (± 0.94%)0.47s (± 1.23%)+0.00s (+ 0.21%)0.46s0.49s
Check Time6.86s (± 0.71%)6.87s (± 0.74%)+0.01s (+ 0.15%)6.75s6.97s
Emit Time2.45s (± 1.11%)2.46s (± 1.31%)+0.01s (+ 0.29%)2.41s2.55s
Total Time10.60s (± 0.60%)10.63s (± 0.70%)+0.02s (+ 0.22%)10.49s10.79s
Monaco - node (v12.1.0, x64)
Memory used327,303k (± 0.02%)327,242k (± 0.02%)-60k (- 0.02%)327,114k327,431k
Parse Time1.57s (± 0.51%)1.57s (± 0.58%)+0.00s (+ 0.06%)1.55s1.59s
Bind Time0.70s (± 0.68%)0.69s (± 0.52%)-0.00s (- 0.43%)0.69s0.70s
Check Time5.80s (± 0.56%)5.80s (± 0.45%)-0.00s (- 0.03%)5.73s5.84s
Emit Time3.30s (± 0.85%)3.27s (± 0.47%)-0.03s (- 0.82%)3.24s3.31s
Total Time11.37s (± 0.49%)11.34s (± 0.34%)-0.03s (- 0.28%)11.25s11.41s
TFS - node (v12.1.0, x64)
Memory used290,048k (± 0.02%)290,025k (± 0.01%)-23k (- 0.01%)289,954k290,113k
Parse Time1.29s (± 0.79%)1.30s (± 0.85%)+0.01s (+ 0.46%)1.27s1.32s
Bind Time0.66s (± 0.84%)0.66s (± 1.21%)-0.00s (- 0.00%)0.64s0.68s
Check Time5.36s (± 0.39%)5.35s (± 0.38%)-0.01s (- 0.28%)5.31s5.40s
Emit Time3.46s (± 0.85%)3.50s (± 0.61%)+0.04s (+ 1.04%)3.45s3.56s
Total Time10.78s (± 0.42%)10.80s (± 0.37%)+0.03s (+ 0.26%)10.73s10.90s
material-ui - node (v12.1.0, x64)
Memory used452,231k (± 0.02%)452,100k (± 0.06%)-130k (- 0.03%)450,988k452,352k
Parse Time1.81s (± 0.61%)1.81s (± 0.75%)-0.00s (- 0.11%)1.79s1.85s
Bind Time0.55s (± 0.67%)0.55s (± 0.87%)+0.00s (+ 0.18%)0.54s0.56s
Check Time13.03s (± 0.49%)13.05s (± 0.29%)+0.02s (+ 0.15%)12.98s13.15s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.40s (± 0.43%)15.41s (± 0.26%)+0.02s (+ 0.11%)15.33s15.50s
xstate - node (v12.1.0, x64)
Memory used548,339k (± 0.02%)548,418k (± 0.02%)+79k (+ 0.01%)548,166k548,658k
Parse Time2.52s (± 0.43%)2.52s (± 0.35%)+0.00s (+ 0.04%)2.51s2.55s
Bind Time0.89s (± 0.65%)0.89s (± 0.67%)-0.00s (- 0.45%)0.88s0.90s
Check Time1.51s (± 0.60%)1.51s (± 0.63%)-0.00s (- 0.33%)1.48s1.52s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time4.99s (± 0.29%)4.98s (± 0.32%)-0.01s (- 0.22%)4.95s5.03s
Angular - node (v14.15.1, x64)
Memory used337,324k (± 0.01%)337,306k (± 0.01%)-18k (- 0.01%)337,258k337,390k
Parse Time2.05s (± 0.46%)2.05s (± 0.65%)+0.00s (+ 0.15%)2.02s2.09s
Bind Time0.79s (± 0.95%)0.79s (± 0.63%)+0.00s (+ 0.13%)0.79s0.81s
Check Time5.81s (± 0.42%)5.81s (± 0.34%)+0.00s (+ 0.03%)5.76s5.86s
Emit Time6.16s (± 0.79%)6.16s (± 0.54%)+0.00s (+ 0.06%)6.11s6.23s
Total Time14.81s (± 0.43%)14.81s (± 0.27%)+0.01s (+ 0.05%)14.75s14.94s
Compiler-Unions - node (v14.15.1, x64)
Memory used192,118k (± 0.02%)192,127k (± 0.01%)+9k (+ 0.00%)192,042k192,165k
Parse Time0.85s (± 0.53%)0.86s (± 0.97%)+0.01s (+ 0.83%)0.84s0.88s
Bind Time0.48s (± 0.62%)0.48s (± 0.75%)+0.00s (+ 0.41%)0.48s0.49s
Check Time6.86s (± 0.65%)6.89s (± 0.69%)+0.03s (+ 0.45%)6.76s7.00s
Emit Time2.40s (± 0.28%)2.40s (± 0.85%)+0.00s (+ 0.04%)2.37s2.46s
Total Time10.60s (± 0.39%)10.63s (± 0.54%)+0.04s (+ 0.35%)10.49s10.79s
Monaco - node (v14.15.1, x64)
Memory used326,033k (± 0.00%)326,033k (± 0.01%)0k ( 0.00%)325,971k326,089k
Parse Time1.56s (± 0.43%)1.57s (± 0.64%)+0.00s (+ 0.26%)1.55s1.59s
Bind Time0.72s (± 0.77%)0.72s (± 0.72%)-0.00s (- 0.14%)0.71s0.73s
Check Time5.67s (± 0.30%)5.69s (± 0.50%)+0.02s (+ 0.26%)5.62s5.75s
Emit Time3.32s (± 0.35%)3.33s (± 0.47%)+0.01s (+ 0.15%)3.29s3.36s
Total Time11.28s (± 0.21%)11.30s (± 0.29%)+0.02s (+ 0.20%)11.23s11.37s
TFS - node (v14.15.1, x64)
Memory used289,098k (± 0.01%)289,107k (± 0.01%)+9k (+ 0.00%)289,053k289,162k
Parse Time1.33s (± 2.25%)1.33s (± 1.46%)-0.01s (- 0.38%)1.30s1.37s
Bind Time0.70s (± 4.43%)0.71s (± 5.16%)+0.00s (+ 0.43%)0.66s0.80s
Check Time5.33s (± 0.46%)5.33s (± 0.28%)-0.01s (- 0.19%)5.29s5.36s
Emit Time3.44s (± 1.75%)3.51s (± 2.22%)+0.07s (+ 2.12%)3.38s3.66s
Total Time10.81s (± 0.62%)10.87s (± 0.76%)+0.07s (+ 0.61%)10.70s11.07s
material-ui - node (v14.15.1, x64)
Memory used450,417k (± 0.06%)450,522k (± 0.01%)+105k (+ 0.02%)450,482k450,580k
Parse Time1.85s (± 0.46%)1.86s (± 0.45%)+0.01s (+ 0.38%)1.84s1.88s
Bind Time0.58s (± 0.69%)0.57s (± 0.63%)-0.00s (- 0.86%)0.57s0.58s
Check Time13.15s (± 0.63%)13.13s (± 0.49%)-0.02s (- 0.14%)13.03s13.29s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time15.57s (± 0.54%)15.56s (± 0.39%)-0.01s (- 0.08%)15.47s15.72s
xstate - node (v14.15.1, x64)
Memory used546,034k (± 0.01%)546,036k (± 0.01%)+3k (+ 0.00%)545,981k546,094k
Parse Time2.59s (± 0.36%)2.59s (± 0.41%)+0.00s (+ 0.08%)2.57s2.61s
Bind Time0.98s (± 1.08%)0.97s (± 1.01%)-0.01s (- 1.22%)0.96s1.00s
Check Time1.54s (± 0.42%)1.55s (± 0.62%)+0.01s (+ 0.45%)1.53s1.57s
Emit Time0.07s (± 0.00%)0.07s (± 3.14%)+0.00s (+ 1.43%)0.07s0.08s
Total Time5.19s (± 0.27%)5.19s (± 0.27%)+0.00s (+ 0.02%)5.17s5.22s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v10.16.3, x64)
  • Compiler-Unions - node (v12.1.0, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v10.16.3, x64)
  • xstate - node (v12.1.0, x64)
  • xstate - node (v14.15.1, x64)
BenchmarkNameIterations
Current5037210
Baselinemain10

TSServer

Comparison Report - main..50372
Metricmain50372DeltaBestWorst
Compiler-UnionsTSServer - node (v10.16.3, x64)
Req 1 - updateOpen1,396ms (± 0.51%)1,395ms (± 0.37%)-1ms (- 0.08%)1,386ms1,407ms
Req 2 - geterr3,725ms (± 0.61%)3,738ms (± 0.48%)+14ms (+ 0.37%)3,693ms3,783ms
Req 3 - references229ms (± 0.71%)229ms (± 0.95%)+1ms (+ 0.22%)225ms236ms
Req 4 - navto171ms (± 1.10%)172ms (± 1.29%)+0ms (+ 0.18%)167ms176ms
Req 5 - completionInfo count1,355 (± 0.00%)1,355 (± 0.00%)0 ( 0.00%)1,3551,355
Req 5 - completionInfo63ms (± 4.35%)61ms (± 1.54%)-2ms (- 2.56%)59ms64ms
CompilerTSServer - node (v10.16.3, x64)
Req 1 - updateOpen1,498ms (± 0.48%)1,502ms (± 0.53%)+3ms (+ 0.22%)1,487ms1,525ms
Req 2 - geterr2,218ms (± 0.60%)2,233ms (± 0.46%)+15ms (+ 0.67%)2,207ms2,254ms
Req 3 - references241ms (± 0.71%)244ms (± 0.90%)+3ms (+ 1.41%)241ms250ms
Req 4 - navto185ms (± 0.92%)186ms (± 0.81%)+1ms (+ 0.59%)184ms190ms
Req 5 - completionInfo count1,517 (± 0.00%)1,517 (± 0.00%)0 ( 0.00%)1,5171,517
Req 5 - completionInfo68ms (± 2.54%)68ms (± 3.28%)+0ms (+ 0.29%)61ms71ms
xstateTSServer - node (v10.16.3, x64)
Req 1 - updateOpen2,071ms (± 0.77%)2,069ms (± 0.44%)-2ms (- 0.08%)2,055ms2,099ms
Req 2 - geterr776ms (± 0.68%)776ms (± 0.51%)-0ms (- 0.05%)766ms783ms
Req 3 - references101ms (± 1.18%)100ms (± 0.96%)-1ms (- 1.29%)98ms101ms
Req 4 - navto233ms (± 1.10%)233ms (± 1.48%)-0ms (- 0.09%)226ms241ms
Req 5 - completionInfo count3,293 (± 0.00%)3,293 (± 0.00%)0 ( 0.00%)3,2933,293
Req 5 - completionInfo270ms (± 1.00%)268ms (± 0.73%)-2ms (- 0.67%)263ms272ms
Compiler-UnionsTSServer - node (v12.1.0, x64)
Req 1 - updateOpen1,401ms (± 0.74%)1,400ms (± 0.94%)-0ms (- 0.03%)1,370ms1,432ms
Req 2 - geterr3,487ms (± 0.59%)3,484ms (± 0.54%)-3ms (- 0.07%)3,444ms3,522ms
Req 3 - references219ms (± 0.73%)219ms (± 0.73%)-0ms (- 0.05%)215ms222ms
Req 4 - navto160ms (± 0.95%)163ms (± 1.23%)+2ms (+ 1.43%)158ms168ms
Req 5 - completionInfo count1,355 (± 0.00%)1,355 (± 0.00%)0 ( 0.00%)1,3551,355
Req 5 - completionInfo58ms (± 4.61%)59ms (± 4.24%)+1ms (+ 1.38%)53ms63ms
CompilerTSServer - node (v12.1.0, x64)
Req 1 - updateOpen1,496ms (± 0.43%)1,492ms (± 0.36%)-4ms (- 0.26%)1,479ms1,504ms
Req 2 - geterr2,157ms (± 0.54%)2,167ms (± 0.58%)+10ms (+ 0.44%)2,148ms2,204ms
Req 3 - references232ms (± 0.97%)232ms (± 0.93%)+0ms (+ 0.17%)227ms237ms
Req 4 - navto171ms (± 1.09%)171ms (± 0.99%)+1ms (+ 0.47%)168ms175ms
Req 5 - completionInfo count1,517 (± 0.00%)1,517 (± 0.00%)0 ( 0.00%)1,5171,517
Req 5 - completionInfo62ms (± 3.81%)62ms (± 5.21%)0ms ( 0.00%)55ms67ms
xstateTSServer - node (v12.1.0, x64)
Req 1 - updateOpen2,022ms (± 0.56%)2,019ms (± 0.41%)-3ms (- 0.12%)1,999ms2,035ms
Req 2 - geterr759ms (± 0.38%)755ms (± 0.34%)-4ms (- 0.53%)748ms760ms
Req 3 - references68ms (± 1.39%)68ms (± 3.18%)+0ms (+ 0.59%)66ms76ms
Req 4 - navto223ms (± 1.55%)224ms (± 1.64%)+1ms (+ 0.54%)214ms233ms
Req 5 - completionInfo count3,293 (± 0.00%)3,293 (± 0.00%)0 ( 0.00%)3,2933,293
Req 5 - completionInfo267ms (± 1.04%)267ms (± 0.57%)+1ms (+ 0.19%)265ms272ms
Compiler-UnionsTSServer - node (v14.15.1, x64)
Req 1 - updateOpen1,437ms (± 0.50%)1,440ms (± 0.36%)+3ms (+ 0.22%)1,429ms1,453ms
Req 2 - geterr3,627ms (± 0.85%)3,632ms (± 0.62%)+5ms (+ 0.15%)3,585ms3,680ms
Req 3 - references227ms (± 0.60%)227ms (± 0.51%)+0ms (+ 0.04%)226ms231ms
Req 4 - navto171ms (± 0.62%)172ms (± 0.32%)+1ms (+ 0.76%)171ms173ms
Req 5 - completionInfo count1,355 (± 0.00%)1,355 (± 0.00%)0 ( 0.00%)1,3551,355
Req 5 - completionInfo59ms (± 2.87%)59ms (± 1.57%)+0ms (+ 0.68%)57ms62ms
CompilerTSServer - node (v14.15.1, x64)
Req 1 - updateOpen1,518ms (± 0.79%)1,505ms (± 0.46%)-12ms (- 0.82%)1,492ms1,522ms
Req 2 - geterr2,281ms (± 0.41%)2,290ms (± 0.33%)+9ms (+ 0.40%)2,275ms2,305ms
Req 3 - references241ms (± 0.67%)241ms (± 0.83%)+0ms (+ 0.08%)238ms245ms
Req 4 - navto178ms (± 0.45%)178ms (± 0.47%)-0ms (- 0.06%)177ms180ms
Req 5 - completionInfo count1,517 (± 0.00%)1,517 (± 0.00%)0 ( 0.00%)1,5171,517
Req 5 - completionInfo52ms (± 0.94%)53ms (± 1.05%)+0ms (+ 0.76%)52ms54ms
xstateTSServer - node (v14.15.1, x64)
Req 1 - updateOpen2,128ms (± 0.48%)2,121ms (± 0.36%)-7ms (- 0.35%)2,102ms2,142ms
Req 2 - geterr774ms (± 0.22%)775ms (± 0.28%)+1ms (+ 0.12%)771ms780ms
Req 3 - references66ms (± 1.10%)66ms (± 1.06%)-0ms (- 0.45%)65ms68ms
Req 4 - navto228ms (± 0.51%)227ms (± 0.32%)-1ms (- 0.48%)225ms228ms
Req 5 - completionInfo count3,293 (± 0.00%)3,293 (± 0.00%)0 ( 0.00%)3,2933,293
Req 5 - completionInfo275ms (± 3.55%)276ms (± 5.02%)+0ms (+ 0.15%)267ms331ms
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v14.15.1, x64)
Scenarios
  • Compiler-UnionsTSServer - node (v10.16.3, x64)
  • Compiler-UnionsTSServer - node (v12.1.0, x64)
  • Compiler-UnionsTSServer - node (v14.15.1, x64)
  • CompilerTSServer - node (v10.16.3, x64)
  • CompilerTSServer - node (v12.1.0, x64)
  • CompilerTSServer - node (v14.15.1, x64)
  • xstateTSServer - node (v10.16.3, x64)
  • xstateTSServer - node (v12.1.0, x64)
  • xstateTSServer - node (v14.15.1, x64)
BenchmarkNameIterations
Current5037210
Baselinemain10

Developer Information:

Download Benchmark

@sandersn
Copy link
Member

@typescript-bot test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented May 2, 2025

Starting jobs; this comment will be updated as builds start and complete.

CommandStatusResults
test top400✅ Started✅ Results
user test this✅ Started✅ Results
run dt✅ Started✅ Results
perf test this faster✅ Started👀 Results

@typescript-bot
Copy link
Collaborator

@sandersn Here are the results of running the user tests with tsc comparing main and refs/pull/50372/merge:

There were infrastructure failures potentially unrelated to your change:

  • 1 instance of "Timeout"

Otherwise...

Everything looks good!

@typescript-bot
Copy link
Collaborator

Hey @sandersn, the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot
Copy link
Collaborator

@sandersn
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-Unions - node (v18.15.0, x64)
Errors3434~~~p=1.000 n=6
Symbols62,39062,390~~~p=1.000 n=6
Types50,39550,395~~~p=1.000 n=6
Memory used192,972k (± 0.01%)194,204k (± 0.98%)~192,960k196,794kp=0.377 n=6
Parse Time1.30s (± 0.79%)1.31s (± 1.12%)~1.29s1.33sp=0.276 n=6
Bind Time0.73s0.73s~~~p=1.000 n=6
Check Time9.76s (± 0.21%)9.76s (± 0.27%)~9.72s9.80sp=0.684 n=6
Emit Time2.74s (± 0.60%)2.73s (± 0.72%)~2.70s2.75sp=0.935 n=6
Total Time14.53s (± 0.21%)14.53s (± 0.15%)~14.50s14.56sp=1.000 n=6
angular-1 - node (v18.15.0, x64)
Errors5656~~~p=1.000 n=6
Symbols948,670948,670~~~p=1.000 n=6
Types410,947410,947~~~p=1.000 n=6
Memory used1,224,518k (± 0.01%)1,224,536k (± 0.01%)~1,224,446k1,224,654kp=0.936 n=6
Parse Time8.07s (± 0.41%)8.06s (± 0.77%)~7.95s8.12sp=0.808 n=6
Bind Time2.29s (± 1.32%)2.28s (± 0.76%)~2.25s2.30sp=0.570 n=6
Check Time38.20s (± 0.28%)38.25s (± 0.62%)~37.89s38.55sp=0.630 n=6
Emit Time18.24s (± 0.87%)18.29s (± 0.57%)~18.17s18.41sp=0.574 n=6
Total Time66.79s (± 0.30%)66.88s (± 0.30%)~66.67s67.14sp=0.423 n=6
mui-docs - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols2,361,6672,361,667~~~p=1.000 n=6
Types868,625868,625~~~p=1.000 n=6
Memory used2,317,079k (± 0.00%)2,317,062k (± 0.00%)~2,317,012k2,317,116kp=0.689 n=6
Parse Time8.77s (± 0.31%)8.75s (± 0.32%)~8.71s8.78sp=0.225 n=6
Bind Time2.21s (± 0.55%)2.20s (± 0.53%)~2.19s2.22sp=0.492 n=6
Check Time69.81s (± 0.17%)69.66s (± 0.41%)~69.31s70.12sp=0.298 n=6
Emit Time0.30s (± 2.11%)0.30s (± 2.75%)~0.29s0.31sp=0.432 n=6
Total Time81.09s (± 0.16%)80.91s (± 0.36%)~80.53s81.36sp=0.261 n=6
self-build-src - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,228,0441,228,052+8 (+ 0.00%)~~p=0.001 n=6
Types267,260267,262+2 (+ 0.00%)~~p=0.001 n=6
Memory used2,360,979k (± 0.03%)2,360,556k (± 0.03%)~2,359,679k2,361,597kp=0.378 n=6
Parse Time5.20s (± 0.79%)5.21s (± 1.06%)~5.12s5.28sp=0.936 n=6
Bind Time1.80s (± 1.13%)1.81s (± 0.91%)~1.78s1.82sp=0.871 n=6
Check Time35.35s (± 0.30%)35.40s (± 0.64%)~35.21s35.81sp=1.000 n=6
Emit Time3.00s (± 1.72%)3.00s (± 1.62%)~2.95s3.09sp=0.688 n=6
Total Time45.35s (± 0.28%)45.42s (± 0.59%)~45.14s45.90sp=1.000 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,228,0441,228,052+8 (+ 0.00%)~~p=0.001 n=6
Types267,260267,262+2 (+ 0.00%)~~p=0.001 n=6
Memory used2,427,797k (± 0.01%)2,427,620k (± 0.02%)~2,426,801k2,428,205kp=0.936 n=6
Parse Time5.48s (± 0.77%)5.46s (± 1.07%)~5.41s5.57sp=0.230 n=6
Bind Time1.81s (± 0.64%)1.82s (± 0.81%)~1.80s1.84sp=0.458 n=6
Check Time35.30s (± 0.30%)35.45s (± 0.61%)~35.24s35.83sp=0.230 n=6
Emit Time3.06s (± 1.35%)3.07s (± 2.25%)~3.00s3.20sp=0.809 n=6
Total Time45.66s (± 0.20%)45.78s (± 0.60%)~45.56s46.24sp=1.000 n=6
self-compiler - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols263,411263,419+8 (+ 0.00%)~~p=0.001 n=6
Types107,096107,098+2 (+ 0.00%)~~p=0.001 n=6
Memory used441,807k (± 0.02%)441,771k (± 0.03%)~441,693k441,947kp=0.230 n=6
Parse Time3.53s (± 1.10%)3.52s (± 0.78%)~3.47s3.54sp=0.520 n=6
Bind Time1.32s (± 0.64%)1.32s (± 0.89%)~1.30s1.33sp=0.547 n=6
Check Time19.03s (± 0.37%)18.99s (± 0.55%)~18.87s19.13sp=0.470 n=6
Emit Time1.53s (± 0.89%)1.53s (± 0.79%)~1.52s1.55sp=1.000 n=6
Total Time25.41s (± 0.35%)25.36s (± 0.48%)~25.23s25.53sp=0.574 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors7171~~~p=1.000 n=6
Symbols225,981225,981~~~p=1.000 n=6
Types94,35694,356~~~p=1.000 n=6
Memory used371,284k (± 0.01%)371,326k (± 0.03%)~371,243k371,501kp=0.810 n=6
Parse Time2.89s (± 1.69%)2.91s (± 0.99%)~2.88s2.95sp=0.226 n=6
Bind Time1.59s (± 1.08%)1.59s (± 0.62%)~1.58s1.61sp=0.607 n=6
Check Time16.53s (± 0.40%)16.54s (± 0.43%)~16.46s16.62sp=0.936 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time21.02s (± 0.46%)21.04s (± 0.29%)~20.98s21.11sp=0.688 n=6
vscode - node (v18.15.0, x64)
Errors44~~~p=1.000 n=6
Symbols3,391,6493,391,649~~~p=1.000 n=6
Types1,148,5941,148,594~~~p=1.000 n=6
Memory used3,443,254k (± 0.01%)3,443,324k (± 0.00%)~3,443,182k3,443,394kp=0.936 n=6
Parse Time14.72s (± 0.61%)14.69s (± 0.20%)~14.65s14.73sp=0.809 n=6
Bind Time4.73s (± 0.18%)4.75s (± 0.49%)+0.02s (+ 0.49%)4.71s4.78sp=0.050 n=6
Check Time93.94s (± 3.02%)93.27s (± 2.52%)~91.97s98.03sp=0.810 n=6
Emit Time30.20s (± 2.78%)29.74s (± 0.49%)~29.51s29.88sp=0.936 n=6
Total Time143.59s (± 2.56%)142.45s (± 1.56%)~141.28s146.94sp=1.000 n=6
webpack - node (v18.15.0, x64)
Errors22~~~p=1.000 n=6
Symbols317,345317,345~~~p=1.000 n=6
Types140,331140,331~~~p=1.000 n=6
Memory used472,403k (± 0.03%)472,331k (± 0.04%)~471,955k472,476kp=0.471 n=6
Parse Time5.17s (± 0.54%)5.19s (± 0.58%)~5.15s5.23sp=0.147 n=6
Bind Time2.25s (± 0.33%)2.25s (± 1.31%)~2.20s2.29sp=0.397 n=6
Check Time25.90s (± 0.49%)26.27s (± 2.59%)~25.86s27.64sp=0.126 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time33.32s (± 0.42%)33.71s (± 1.96%)~33.34s35.05sp=0.149 n=6
xstate-main - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols570,517570,517~~~p=1.000 n=6
Types191,417191,417~~~p=1.000 n=6
Memory used500,814k (± 0.04%)500,836k (± 0.03%)~500,534k500,943kp=0.689 n=6
Parse Time4.31s (± 0.41%)4.30s (± 0.46%)~4.28s4.33sp=0.416 n=6
Bind Time1.53s (± 0.64%)1.54s (± 1.39%)~1.51s1.57sp=0.558 n=6
Check Time25.18s (± 1.86%)25.16s (± 3.08%)~24.76s26.74sp=0.470 n=6
Emit Time0.00s0.00s (±244.70%)~0.00s0.01sp=0.405 n=6
Total Time31.02s (± 1.50%)31.00s (± 2.47%)~30.56s32.56sp=0.521 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

@sandersn Here are the results of running the top 400 repos with tsc comparing main and refs/pull/50372/merge:

Everything looks good!

@github-project-automationgithub-project-automationbot moved this from Waiting on reviewers to Needs merge in PR BacklogMay 2, 2025
@gabrittogabritto merged commit 5e36778 into microsoft:mainMay 2, 2025
32 checks passed
@github-project-automationgithub-project-automationbot moved this from Needs merge to Done in PR BacklogMay 2, 2025
@ZzzenZzzen deleted the used-before-decl-deco branch May 3, 2025 00:09
@Renegade334Renegade334 mentioned this pull request Jul 24, 2025
1 task
@Renegade334
Copy link
Contributor

Renegade334 commented Jul 29, 2025

This approach appears to conflict with #57933 (which had already been merged), in that the later PR deliberately avoided changing the behaviour of experimental decorators on the grounds that it caused too much ecosystem breakage.

@jakebailey
Copy link
Member

I'm confused; wouldn't our extended tests have caught a bad break?

@Renegade334
Copy link
Contributor

Renegade334 commented Jul 29, 2025

Actually, my read is wrong. #57933 only applied to passing the declared class variable to decorators used within that class, which is kosher given that the transformer injects the decorator call after the class is declared. The example from #62083, passing a block-scoped variable declared after the class to a decorator within the class body, would lead to runtime errors if transpiled by TypeScript itself – clearly the custom transpilation used there is doing something different.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Backlog BugPRs that fix a backlog bug

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

"used before its declaration" errors not reported when variable/enum/class is used as decorator parameter on class member

8 participants

@Zzzen@DanielRosenwasser@typescript-bot@sandersn@Renegade334@jakebailey@gabritto@navya9singh