Skip to content

Use destructured names as fallback labels when expanding parameters - #57619

Closed
Mateusz Burzyński (Andarist) wants to merge 13 commits into
microsoft:mainfrom
Andarist:fallback-expanded-labels
Closed

Use destructured names as fallback labels when expanding parameters#57619
Mateusz Burzyński (Andarist) wants to merge 13 commits into
microsoft:mainfrom
Andarist:fallback-expanded-labels

Conversation

@Andarist

Copy link
Copy Markdown
Contributor

closes#56289

@typescript-botTypeScript Bot (typescript-bot) added the For Backlog Bug PRs that fix a backlog bug label Mar 3, 2024
Comment threadsrc/compiler/checker.ts Outdated
Comment threadsrc/compiler/checker.ts Outdated
Comment threadsrc/compiler/checker.ts Outdated
Comment threadsrc/compiler/checker.ts Outdated

if (isTupleType(restType)) {
return [expandSignatureParametersWithTupleMembers(restType, restIndex, restName)];
return [expandSignatureParametersWithTupleMembers(restType, restIndex, restName, getFallbackExpandedLabels(restType, restDeclaration))];

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Another thing I realized is that we're going to be calculating this fallback list every time we do this, even though it's not always used. But, I'm not sure how to make that lazy either.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

ye, this is somewhat unfortunate but I don't think it's a particularly costly operation to create this so I just don't mind having this eager here

@jakebailey

Copy link
Copy Markdown
Member

@typescript-bot

TypeScript Bot (typescript-bot) commented Mar 26, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

Hey Jake Bailey (@jakebailey), the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the user tests comparing main and refs/pull/57619/merge:

Everything looks good!

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey)
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Angular - node (v18.15.0, x64)
Memory used295,481k (± 0.00%)295,477k (± 0.01%)~295,423k295,500kp=0.748 n=6
Parse Time2.66s (± 0.31%)2.66s (± 0.24%)~2.65s2.67sp=0.599 n=6
Bind Time0.83s (± 0.49%)0.82s (± 0.66%)~0.82s0.83sp=0.282 n=6
Check Time8.17s (± 0.30%)8.22s (± 0.26%)+0.05s (+ 0.57%)8.18s8.24sp=0.016 n=6
Emit Time7.05s (± 0.21%)7.07s (± 0.77%)~7.03s7.18sp=0.328 n=6
Total Time18.70s (± 0.20%)18.77s (± 0.34%)+0.07s (+ 0.37%)18.71s18.89sp=0.036 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used193,672k (± 1.00%)192,573k (± 0.77%)~191,838k195,593kp=0.689 n=6
Parse Time1.35s (± 0.30%)1.36s (± 0.55%)~1.35s1.37sp=0.100 n=6
Bind Time0.72s (± 0.00%)0.72s (± 0.00%)~0.72s0.72sp=1.000 n=6
Check Time9.46s (± 0.56%)9.47s (± 0.32%)~9.44s9.52sp=0.630 n=6
Emit Time2.63s (± 0.21%)2.64s (± 1.04%)~2.62s2.69sp=0.663 n=6
Total Time14.17s (± 0.40%)14.19s (± 0.32%)~14.14s14.25sp=0.520 n=6
Monaco - node (v18.15.0, x64)
Memory used347,367k (± 0.00%)347,366k (± 0.01%)~347,346k347,392kp=0.810 n=6
Parse Time2.48s (± 0.54%)2.48s (± 0.40%)~2.46s2.49sp=0.396 n=6
Bind Time0.93s (± 0.00%)0.93s (± 0.56%)~0.92s0.93sp=0.174 n=6
Check Time7.02s (± 0.33%)6.99s (± 0.17%)-0.03s (- 0.47%)6.98s7.01sp=0.042 n=6
Emit Time4.06s (± 0.37%)4.07s (± 0.57%)~4.03s4.10sp=0.464 n=6
Total Time14.49s (± 0.09%)14.46s (± 0.12%)-0.03s (- 0.21%)14.44s14.49sp=0.019 n=6
TFS - node (v18.15.0, x64)
Memory used302,704k (± 0.01%)302,685k (± 0.01%)~302,641k302,735kp=0.336 n=6
Parse Time2.96s (± 0.93%)2.98s (± 0.87%)~2.95s3.02sp=0.257 n=6
Bind Time1.46s (± 0.72%)1.47s (± 0.82%)~1.46s1.49sp=0.282 n=6
Check Time9.18s (± 0.39%)9.19s (± 0.52%)~9.13s9.24sp=0.520 n=6
Emit Time5.32s (± 0.74%)5.32s (± 0.41%)~5.29s5.35sp=1.000 n=6
Total Time18.93s (± 0.43%)18.96s (± 0.20%)~18.90s19.00sp=0.574 n=6
material-ui - node (v18.15.0, x64)
Memory used509,884k (± 0.00%)509,894k (± 0.00%)~509,871k509,907kp=0.520 n=6
Parse Time2.65s (± 0.52%)2.66s (± 0.61%)~2.63s2.67sp=0.101 n=6
Bind Time0.98s (± 0.64%)0.98s (± 0.85%)~0.97s0.99sp=0.226 n=6
Check Time17.24s (± 0.43%)17.28s (± 0.21%)~17.24s17.33sp=0.574 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time20.88s (± 0.40%)20.93s (± 0.22%)~20.86s20.99sp=0.520 n=6
mui-docs - node (v18.15.0, x64)
Memory used1,737,607k (± 0.00%)1,737,586k (± 0.00%)~1,737,532k1,737,632kp=0.298 n=6
Parse Time7.79s (± 0.15%)7.80s (± 0.46%)~7.77s7.86sp=0.934 n=6
Bind Time2.79s (± 0.44%)2.80s (± 1.03%)~2.78s2.86sp=0.737 n=6
Check Time66.55s (± 0.60%)66.56s (± 0.62%)~66.08s67.05sp=0.630 n=6
Emit Time0.16s (± 2.58%)0.15s (± 3.53%)~0.15s0.16sp=0.282 n=6
Total Time77.29s (± 0.51%)77.33s (± 0.51%)~76.86s77.80sp=0.575 n=6
self-build-src - node (v18.15.0, x64)
Memory used2,389,481k (± 0.02%)2,390,364k (± 0.07%)~2,388,269k2,393,081kp=0.298 n=6
Parse Time6.08s (± 1.48%)6.08s (± 0.64%)~6.04s6.12sp=1.000 n=6
Bind Time2.24s (± 1.23%)2.26s (± 1.08%)~2.22s2.29sp=0.419 n=6
Check Time39.34s (± 0.20%)39.48s (± 0.25%)~39.35s39.61sp=0.066 n=6
Emit Time3.15s (± 1.60%)3.18s (± 1.32%)~3.11s3.23sp=0.298 n=6
Total Time50.83s (± 0.27%)51.00s (± 0.12%)+0.17s (+ 0.34%)50.95s51.11sp=0.045 n=6
self-compiler - node (v18.15.0, x64)
Memory used414,559k (± 0.01%)414,664k (± 0.01%)+105k (+ 0.03%)414,628k414,698kp=0.005 n=6
Parse Time3.47s (± 7.16%)3.39s (± 0.73%)~3.34s3.41sp=0.570 n=6
Bind Time1.29s (± 0.69%)1.29s (± 0.81%)~1.28s1.31sp=0.452 n=6
Check Time17.97s (± 0.33%)17.93s (± 0.18%)~17.87s17.97sp=0.295 n=6
Emit Time1.35s (± 2.16%)1.37s (± 1.01%)~1.35s1.38sp=0.625 n=6
Total Time24.08s (± 1.08%)23.98s (± 0.19%)~23.93s24.03sp=0.809 n=6
vscode - node (v18.15.0, x64)
Memory used2,892,193k (± 0.00%)2,892,201k (± 0.00%)~2,892,103k2,892,284kp=0.575 n=6
Parse Time15.91s (± 0.28%)15.93s (± 0.37%)~15.88s16.01sp=0.571 n=6
Bind Time5.05s (± 0.32%)5.04s (± 0.45%)~5.00s5.06sp=0.570 n=6
Check Time86.71s (± 0.26%)87.23s (± 0.40%)+0.52s (+ 0.60%)86.83s87.84sp=0.020 n=6
Emit Time23.69s (± 0.55%)23.74s (± 0.56%)~23.54s23.90sp=0.471 n=6
Total Time131.36s (± 0.21%)131.94s (± 0.22%)+0.59s (+ 0.45%)131.59s132.43sp=0.008 n=6
webpack - node (v18.15.0, x64)
Memory used408,333k (± 0.01%)408,373k (± 0.02%)~408,294k408,466kp=0.378 n=6
Parse Time3.90s (± 1.00%)3.89s (± 0.75%)~3.86s3.94sp=0.686 n=6
Bind Time1.67s (± 0.31%)1.67s (± 0.99%)~1.64s1.69sp=0.198 n=6
Check Time16.64s (± 0.20%)16.69s (± 0.17%)+0.04s (+ 0.26%)16.64s16.72sp=0.041 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time22.22s (± 0.17%)22.25s (± 0.22%)~22.17s22.32sp=0.257 n=6
xstate - node (v18.15.0, x64)
Memory used513,042k (± 0.02%)513,020k (± 0.01%)~512,912k513,106kp=0.748 n=6
Parse Time3.96s (± 0.57%)3.97s (± 0.50%)~3.95s4.00sp=0.416 n=6
Bind Time1.86s (± 0.79%)1.85s (± 1.12%)~1.83s1.88sp=0.742 n=6
Check Time3.38s (± 0.49%)3.37s (± 0.45%)~3.35s3.39sp=0.806 n=6
Emit Time0.09s (± 6.44%)0.09s (± 5.95%)~0.08s0.09sp=0.640 n=6
Total Time9.28s (± 0.38%)9.29s (± 0.28%)~9.25s9.32sp=1.000 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Angular - node (v18.15.0, x64)
  • Compiler-Unions - node (v18.15.0, x64)
  • Monaco - node (v18.15.0, x64)
  • TFS - node (v18.15.0, x64)
  • material-ui - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the top 400 repos comparing main and refs/pull/57619/merge:

Everything looks good!

@jakebailey

Copy link
Copy Markdown
Member

Hm, hard to say if that vscode result is just noise or not.

TypeScript Bot (@typescript-bot) perf test this faster

@typescript-bot

TypeScript Bot (typescript-bot) commented Mar 26, 2024

Copy link
Copy Markdown
Contributor

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

CommandStatusResults
perf test this faster✅ Started👀 Results

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey)
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Angular - node (v18.15.0, x64)
Memory used295,483k (± 0.00%)295,480k (± 0.00%)~295,469k295,492kp=0.873 n=6
Parse Time2.66s (± 0.28%)2.66s (± 0.19%)~2.65s2.66sp=0.241 n=6
Bind Time0.83s (± 0.62%)0.83s (± 0.66%)~0.82s0.83sp=0.640 n=6
Check Time8.18s (± 0.35%)8.19s (± 0.31%)~8.17s8.23sp=0.506 n=6
Emit Time7.04s (± 0.23%)7.04s (± 0.28%)~7.02s7.07sp=0.870 n=6
Total Time18.71s (± 0.15%)18.71s (± 0.13%)~18.68s18.74sp=0.745 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used193,176k (± 0.95%)192,495k (± 0.72%)~191,897k195,323kp=0.873 n=6
Parse Time1.36s (± 1.29%)1.35s (± 0.60%)~1.34s1.36sp=0.740 n=6
Bind Time0.72s (± 0.57%)0.72s (± 0.00%)~0.72s0.72sp=0.405 n=6
Check Time9.53s (± 0.79%)9.49s (± 0.63%)~9.39s9.57sp=0.422 n=6
Emit Time2.63s (± 0.51%)2.64s (± 0.52%)~2.62s2.66sp=0.317 n=6
Total Time14.23s (± 0.58%)14.21s (± 0.42%)~14.10s14.26sp=0.423 n=6
Monaco - node (v18.15.0, x64)
Memory used347,379k (± 0.01%)347,371k (± 0.00%)~347,341k347,391kp=0.936 n=6
Parse Time2.49s (± 0.51%)2.49s (± 0.33%)~2.48s2.50sp=0.546 n=6
Bind Time0.93s (± 0.44%)0.93s (± 0.44%)~0.92s0.93sp=1.000 n=6
Check Time7.01s (± 0.28%)7.03s (± 0.48%)~6.97s7.06sp=0.146 n=6
Emit Time4.06s (± 0.43%)4.06s (± 0.25%)~4.04s4.07sp=1.000 n=6
Total Time14.48s (± 0.13%)14.50s (± 0.17%)~14.46s14.53sp=0.222 n=6
TFS - node (v18.15.0, x64)
Memory used302,717k (± 0.01%)302,705k (± 0.02%)~302,647k302,789kp=0.336 n=6
Parse Time2.37s (± 1.27%)2.41s (± 1.21%)+0.04s (+ 1.76%)2.37s2.46sp=0.024 n=6
Bind Time1.20s (± 0.68%)1.19s (± 0.86%)~1.18s1.21sp=0.546 n=6
Check Time7.47s (± 0.43%)7.46s (± 0.45%)~7.41s7.50sp=0.520 n=6
Emit Time4.29s (± 0.46%)4.30s (± 0.53%)~4.26s4.32sp=0.570 n=6
Total Time15.33s (± 0.25%)15.36s (± 0.24%)~15.31s15.42sp=0.224 n=6
material-ui - node (v18.15.0, x64)
Memory used509,891k (± 0.00%)509,884k (± 0.00%)~509,860k509,912kp=0.423 n=6
Parse Time2.65s (± 0.70%)2.65s (± 0.67%)~2.62s2.67sp=0.807 n=6
Bind Time0.99s (± 0.83%)0.98s (± 1.24%)~0.97s1.00sp=1.000 n=6
Check Time17.25s (± 0.43%)17.26s (± 0.50%)~17.21s17.43sp=1.000 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time20.88s (± 0.40%)20.89s (± 0.38%)~20.83s21.05sp=0.521 n=6
mui-docs - node (v18.15.0, x64)
Memory used1,737,620k (± 0.00%)1,737,609k (± 0.00%)~1,737,593k1,737,631kp=0.298 n=6
Parse Time7.81s (± 0.50%)7.79s (± 0.58%)~7.73s7.85sp=0.629 n=6
Bind Time2.79s (± 0.29%)2.81s (± 0.62%)~2.79s2.84sp=0.121 n=6
Check Time66.36s (± 0.48%)66.42s (± 0.34%)~66.15s66.76sp=0.810 n=6
Emit Time0.15s (± 3.53%)0.16s (± 3.29%)~0.15s0.16sp=0.640 n=6
Total Time77.12s (± 0.40%)77.17s (± 0.23%)~76.97s77.46sp=0.873 n=6
self-build-src - node (v18.15.0, x64)
Memory used2,390,090k (± 0.03%)2,390,248k (± 0.02%)~2,389,534k2,390,999kp=0.810 n=6
Parse Time6.12s (± 1.89%)6.06s (± 0.97%)~6.01s6.16sp=0.471 n=6
Bind Time2.28s (± 1.45%)2.26s (± 0.81%)~2.24s2.29sp=0.293 n=6
Check Time39.29s (± 0.46%)39.33s (± 0.10%)~39.29s39.38sp=1.000 n=6
Emit Time3.17s (± 1.37%)3.15s (± 1.71%)~3.07s3.22sp=0.378 n=6
Total Time50.88s (± 0.51%)50.82s (± 0.20%)~50.65s50.96sp=0.471 n=6
self-compiler - node (v18.15.0, x64)
Memory used414,576k (± 0.01%)414,652k (± 0.00%)+76k (+ 0.02%)414,635k414,657kp=0.005 n=6
Parse Time4.15s (± 2.40%)4.21s (± 0.88%)~4.17s4.27sp=0.335 n=6
Bind Time1.61s (± 4.37%)1.60s (± 1.07%)~1.58s1.62sp=0.684 n=6
Check Time22.24s (± 0.21%)22.21s (± 0.44%)~22.08s22.35sp=0.572 n=6
Emit Time1.69s (± 1.45%)1.67s (± 1.12%)~1.65s1.70sp=0.368 n=6
Total Time29.69s (± 0.15%)29.69s (± 0.31%)~29.58s29.84sp=0.936 n=6
vscode - node (v18.15.0, x64)
Memory used2,892,326k (± 0.00%)2,892,388k (± 0.00%)~2,892,274k2,892,436kp=0.297 n=6
Parse Time12.84s (± 0.42%)12.86s (± 0.68%)~12.79s13.03sp=0.686 n=6
Bind Time4.10s (± 0.50%)4.09s (± 0.15%)~4.08s4.10sp=0.210 n=6
Check Time71.09s (± 0.41%)71.12s (± 0.42%)~70.76s71.65sp=0.689 n=6
Emit Time19.24s (± 0.71%)19.22s (± 0.62%)~19.02s19.35sp=0.748 n=6
Total Time107.26s (± 0.34%)107.30s (± 0.41%)~106.87s108.13sp=0.936 n=6
webpack - node (v18.15.0, x64)
Memory used408,384k (± 0.02%)408,411k (± 0.01%)~408,334k408,463kp=0.471 n=6
Parse Time4.79s (± 0.39%)4.82s (± 0.66%)~4.79s4.88sp=0.145 n=6
Bind Time2.05s (± 1.84%)2.04s (± 1.28%)~2.01s2.08sp=0.809 n=6
Check Time20.78s (± 0.45%)20.75s (± 0.38%)~20.65s20.86sp=0.688 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time27.63s (± 0.25%)27.62s (± 0.31%)~27.52s27.77sp=0.747 n=6
xstate - node (v18.15.0, x64)
Memory used513,123k (± 0.01%)513,023k (± 0.02%)-100k (- 0.02%)512,897k513,105kp=0.045 n=6
Parse Time3.97s (± 0.85%)3.96s (± 0.44%)~3.93s3.98sp=0.469 n=6
Bind Time1.86s (± 0.74%)1.86s (± 1.47%)~1.83s1.90sp=0.806 n=6
Check Time3.38s (± 0.62%)3.37s (± 0.74%)~3.34s3.40sp=0.574 n=6
Emit Time0.08s (± 6.19%)0.09s (± 6.44%)~0.08s0.09sp=0.640 n=6
Total Time9.30s (± 0.38%)9.27s (± 0.60%)~9.21s9.36sp=0.254 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Angular - node (v18.15.0, x64)
  • Compiler-Unions - node (v18.15.0, x64)
  • Monaco - node (v18.15.0, x64)
  • TFS - node (v18.15.0, x64)
  • material-ui - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate - node (v18.15.0, x64)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@jakebailey

Copy link
Copy Markdown
Member

Retesting with new benchmarks

TypeScript Bot (@typescript-bot) perf test this faster

@typescript-bot

TypeScript Bot (typescript-bot) commented Apr 19, 2024

Copy link
Copy Markdown
Contributor

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

CommandStatusResults
perf test this faster✅ Started👀 Results

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey)
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Angular - node (v18.15.0, x64)
Memory used297,143k (± 0.01%)297,141k (± 0.01%)~297,115k297,176kp=0.575 n=6
Parse Time4.04s (± 0.26%)4.04s (± 0.41%)~4.02s4.07sp=0.802 n=6
Bind Time1.21s (± 1.48%)1.20s (± 0.34%)~1.19s1.20sp=0.210 n=6
Check Time12.14s (± 0.28%)12.15s (± 0.42%)~12.12s12.25sp=0.685 n=6
Emit Time10.51s (± 0.58%)10.51s (± 0.47%)~10.46s10.60sp=1.000 n=6
Total Time27.91s (± 0.32%)27.90s (± 0.34%)~27.83s28.09sp=0.688 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used193,565k (± 1.05%)193,080k (± 0.94%)~191,798k195,438kp=1.000 n=6
Parse Time2.02s (± 0.70%)2.02s (± 1.68%)~1.98s2.07sp=0.870 n=6
Bind Time1.06s (± 0.49%)1.06s (± 1.14%)~1.05s1.08sp=1.000 n=6
Check Time14.06s (± 0.17%)14.08s (± 0.37%)~14.01s14.14sp=0.627 n=6
Emit Time3.91s (± 2.56%)3.88s (± 1.02%)~3.83s3.93sp=0.872 n=6
Total Time21.05s (± 0.44%)21.04s (± 0.11%)~21.01s21.08sp=0.290 n=6
mui-docs - node (v18.15.0, x64)
Memory used1,752,882k (± 0.00%)1,752,898k (± 0.00%)~1,752,839k1,752,949kp=0.521 n=6
Parse Time6.80s (± 0.20%)6.83s (± 0.26%)+0.02s (+ 0.34%)6.80s6.85sp=0.042 n=6
Bind Time2.29s (± 0.36%)2.28s (± 0.66%)~2.27s2.31sp=0.164 n=6
Check Time56.72s (± 0.67%)56.64s (± 0.39%)~56.34s56.90sp=0.688 n=6
Emit Time0.14s (± 0.00%)0.14s (± 0.00%)~0.14s0.14sp=1.000 n=6
Total Time65.95s (± 0.57%)65.89s (± 0.37%)~65.57s66.19sp=0.936 n=6
self-build-src - node (v18.15.0, x64)
Memory used2,308,629k (± 0.03%)2,308,700k (± 0.02%)~2,308,077k2,309,657kp=0.810 n=6
Parse Time7.44s (± 0.78%)7.42s (± 0.95%)~7.35s7.54sp=0.470 n=6
Bind Time2.74s (± 0.72%)2.74s (± 0.27%)~2.73s2.75sp=0.935 n=6
Check Time49.53s (± 0.87%)49.27s (± 0.69%)~48.96s49.89sp=0.298 n=6
Emit Time3.94s (± 2.50%)3.89s (± 1.17%)~3.81s3.94sp=0.298 n=6
Total Time63.67s (± 0.68%)63.32s (± 0.60%)~62.87s63.91sp=0.230 n=6
self-build-src-public-api - node (v18.15.0, x64)
Memory used2,383,020k (± 0.04%)2,383,025k (± 0.05%)~2,381,559k2,384,630kp=0.936 n=6
Parse Time7.68s (± 0.49%)7.65s (± 0.56%)~7.60s7.70sp=0.575 n=6
Bind Time2.70s (± 2.99%)2.74s (± 0.91%)~2.70s2.77sp=0.297 n=6
Check Time49.51s (± 0.87%)49.36s (± 0.47%)~49.10s49.65sp=0.575 n=6
Emit Time3.90s (± 2.88%)3.93s (± 2.70%)~3.76s4.07sp=0.810 n=6
Total Time63.81s (± 0.70%)63.70s (± 0.57%)~63.25s64.15sp=0.689 n=6
self-compiler - node (v18.15.0, x64)
Memory used419,194k (± 0.01%)419,310k (± 0.01%)+116k (+ 0.03%)419,283k419,356kp=0.005 n=6
Parse Time3.39s (± 0.85%)3.35s (± 2.00%)~3.22s3.41sp=0.170 n=6
Bind Time1.30s (± 1.05%)1.32s (± 4.34%)~1.26s1.43sp=0.681 n=6
Check Time17.90s (± 0.26%)17.96s (± 0.30%)~17.90s18.05sp=0.092 n=6
Emit Time1.35s (± 1.81%)1.37s (± 1.70%)~1.34s1.41sp=0.122 n=6
Total Time23.95s (± 0.28%)24.00s (± 0.24%)~23.95s24.11sp=0.261 n=6
ts-pre-modules - node (v18.15.0, x64)
Memory used368,964k (± 0.01%)368,948k (± 0.01%)~368,879k369,007kp=0.630 n=6
Parse Time3.64s (± 0.78%)3.68s (± 1.08%)~3.64s3.75sp=0.077 n=6
Bind Time1.93s (± 0.78%)1.90s (± 1.61%)~1.86s1.94sp=0.189 n=6
Check Time19.38s (± 0.20%)19.40s (± 0.59%)~19.25s19.51sp=0.422 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time24.94s (± 0.23%)24.97s (± 0.41%)~24.82s25.07sp=0.423 n=6
vscode - node (v18.15.0, x64)
Memory used2,919,564k (± 0.01%)2,919,685k (± 0.00%)~2,919,575k2,919,816kp=0.230 n=6
Parse Time16.53s (± 0.52%)16.57s (± 0.46%)~16.48s16.69sp=0.572 n=6
Bind Time5.03s (± 1.53%)4.98s (± 0.46%)-0.05s (- 1.09%)4.95s5.00sp=0.033 n=6
Check Time88.06s (± 0.22%)88.14s (± 0.22%)~87.82s88.39sp=0.574 n=6
Emit Time27.11s (± 7.19%)26.14s (± 7.70%)~23.78s28.33sp=0.336 n=6
Total Time136.73s (± 1.39%)135.83s (± 1.46%)~133.15s137.90sp=0.298 n=6
webpack - node (v18.15.0, x64)
Memory used409,586k (± 0.02%)409,690k (± 0.03%)~409,528k409,924kp=0.128 n=6
Parse Time4.84s (± 0.62%)4.81s (± 0.67%)~4.77s4.86sp=0.090 n=6
Bind Time2.02s (± 1.08%)2.02s (± 0.58%)~2.01s2.04sp=0.801 n=6
Check Time21.07s (± 0.31%)21.06s (± 0.42%)~21.00s21.23sp=0.575 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time27.93s (± 0.28%)27.89s (± 0.32%)~27.81s28.06sp=0.378 n=6
xstate-main - node (v18.15.0, x64)
Memory used459,058k (± 0.01%)459,097k (± 0.01%)~459,051k459,132kp=0.128 n=6
Parse Time4.00s (± 0.41%)3.99s (± 0.38%)~3.98s4.01sp=0.675 n=6
Bind Time1.46s (± 1.18%)1.47s (± 0.79%)~1.46s1.49sp=0.101 n=6
Check Time22.23s (± 0.56%)22.28s (± 0.64%)~22.11s22.47sp=0.630 n=6
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)~0.00s0.00sp=1.000 n=6
Total Time27.68s (± 0.43%)27.75s (± 0.53%)~27.58s27.94sp=0.575 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Angular - node (v18.15.0, x64)
  • Compiler-Unions - 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

@jakebailey

Copy link
Copy Markdown
Member

TypeScript Bot (@typescript-bot) pack this

@typescript-bot

TypeScript Bot (typescript-bot) commented Apr 19, 2024

Copy link
Copy Markdown
Contributor

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

CommandStatusResults
pack this✅ Started✅ Results

@typescript-bot

TypeScript Bot (typescript-bot) commented Apr 19, 2024

Copy link
Copy Markdown
Contributor

Hey Jake Bailey (@jakebailey), I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
"devDependencies": {
"typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/161377/artifacts?artifactName=tgz&fileId=B47820E3445EF45C604A52100FADD090601E734DDAAD03702C14216C35A23C0502&fileName=/typescript-5.5.0-insiders.20240419.tgz"
}
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/pr-build@5.5.0-pr-57619-14".;

@DanielRosenwasser

Copy link
Copy Markdown
Member

for

functionfoo(first: string, ...args: [first: number,second: number]){}

are we okay with this behavior?

image

@jakebaileyJake Bailey (jakebailey) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also, on second thought, I think that this should actually be first, second, not first, named; after all, the type could be coming from far far away, but the names from the rest are actually what's relavent for the function call...

image

@jakebailey

Copy link
Copy Markdown
Member

are we okay with this behavior?

I'd say no; now that we have two sources of truth, we should probably try and remember which names we've already used 🙁

@Andarist

Copy link
Copy Markdown
ContributorAuthor

are we okay with this behavior?

It's not perfect but it's nothing new (TS playground)

typeT0=[first: string];typeT1=[first: number, ...T0];// ^? type T1 = [first: number, first: string]

I'd prefer to fix this separately. Unless you feel it's crucial for this to land and that if I'd do this work here this PR would move further swiftly~.

Also, on second thought, I think that this should actually be first, second, not first, named; after all, the type could be coming from far far away, but the names from the rest are actually what's relavent for the function call...

I pushed out a commit to PR the local "labels" in those scenarios.

@rbuckton

Copy link
Copy Markdown
Contributor

This doesn't cover quite as many cases as #59045, though I found the fourslash tests in this PR very helpful so I've added them into #59045.

@microsoftMicrosoft (microsoft) locked as resolved and limited conversation to collaborators Oct 16, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

For Backlog BugPRs that fix a backlog bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default rest parameter names to destructuring names when of an anonymous tuple

6 participants

@Andarist@jakebailey@typescript-bot@DanielRosenwasser@rbuckton@sandersn