Skip to content

Add IteratorVoidReturnResult for optional 'value' when done - #40825

Closed
Ron Buckton (rbuckton) wants to merge 1 commit into
mainfrom
iteratorVoidResult
Closed

Add IteratorVoidReturnResult for optional 'value' when done#40825
Ron Buckton (rbuckton) wants to merge 1 commit into
mainfrom
iteratorVoidResult

Conversation

@rbuckton

Copy link
Copy Markdown
Contributor

This is an alternative to #40823 to verify whether introducing an optional IteratorVoidReturnResult to the IteratorResult union (that only applies when TReturn contains void) will cause any issues with assignability in our user tests.

Fixes#38479

@rbuckton

Copy link
Copy Markdown
ContributorAuthor

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 29, 2020

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized community code test suite on this PR at 52a09b6. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 29, 2020

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the extended test suite on this PR at 52a09b6. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 29, 2020

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the parallelized Definitely Typed test suite on this PR at 52a09b6. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented Sep 29, 2020

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at 52a09b6. You can monitor the build here.

Update: The results are in!

@typescript-bot

Copy link
Copy Markdown
Contributor

Ron Buckton (@rbuckton)
The results of the perf run you requested are in!

Here they are:

Comparison Report - master..40825

Metricmaster40825DeltaBestWorst
Angular - node (v10.16.3, x64)
Memory used349,616k (± 0.01%)349,574k (± 0.02%)-42k (- 0.01%)349,350k349,692k
Parse Time2.00s (± 0.26%)2.00s (± 0.50%)-0.00s (- 0.15%)1.98s2.02s
Bind Time0.82s (± 0.81%)0.82s (± 0.57%)-0.00s (- 0.36%)0.81s0.83s
Check Time4.90s (± 0.77%)4.88s (± 0.34%)-0.03s (- 0.51%)4.85s4.92s
Emit Time5.19s (± 0.52%)5.17s (± 0.48%)-0.02s (- 0.37%)5.13s5.24s
Total Time12.91s (± 0.43%)12.87s (± 0.38%)-0.05s (- 0.37%)12.81s13.02s
Monaco - node (v10.16.3, x64)
Memory used354,341k (± 0.03%)354,289k (± 0.03%)-52k (- 0.01%)354,038k354,545k
Parse Time1.56s (± 0.52%)1.57s (± 0.44%)+0.00s (+ 0.32%)1.55s1.58s
Bind Time0.71s (± 0.52%)0.71s (± 0.67%)-0.00s (- 0.28%)0.70s0.72s
Check Time5.07s (± 0.61%)5.04s (± 0.63%)-0.03s (- 0.51%)4.99s5.15s
Emit Time2.76s (± 0.86%)2.76s (± 0.69%)-0.00s (- 0.07%)2.71s2.81s
Total Time10.10s (± 0.49%)10.08s (± 0.36%)-0.02s (- 0.23%)10.01s10.19s
TFS - node (v10.16.3, x64)
Memory used307,541k (± 0.04%)307,607k (± 0.02%)+66k (+ 0.02%)307,472k307,779k
Parse Time1.21s (± 0.56%)1.21s (± 0.78%)0.00s ( 0.00%)1.20s1.24s
Bind Time0.67s (± 0.99%)0.67s (± 0.44%)-0.00s (- 0.15%)0.67s0.68s
Check Time4.54s (± 0.49%)4.53s (± 0.49%)-0.01s (- 0.13%)4.49s4.60s
Emit Time2.90s (± 1.00%)2.89s (± 0.83%)-0.00s (- 0.17%)2.84s2.95s
Total Time9.33s (± 0.46%)9.31s (± 0.44%)-0.01s (- 0.13%)9.24s9.44s
material-ui - node (v10.16.3, x64)
Memory used489,001k (± 0.01%)488,985k (± 0.01%)-16k (- 0.00%)488,802k489,177k
Parse Time1.98s (± 0.45%)1.98s (± 0.61%)-0.00s (- 0.20%)1.95s2.00s
Bind Time0.65s (± 0.86%)0.65s (± 0.53%)-0.00s (- 0.15%)0.64s0.65s
Check Time13.50s (± 0.78%)13.36s (± 0.49%)-0.14s (- 1.07%)13.26s13.54s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time16.14s (± 0.64%)15.99s (± 0.40%)-0.15s (- 0.94%)15.88s16.13s
Angular - node (v12.1.0, x64)
Memory used326,839k (± 0.03%)326,836k (± 0.03%)-3k (- 0.00%)326,654k327,061k
Parse Time1.99s (± 0.51%)1.99s (± 0.42%)+0.00s (+ 0.20%)1.98s2.02s
Bind Time0.81s (± 0.64%)0.81s (± 0.45%)-0.00s (- 0.37%)0.80s0.81s
Check Time4.80s (± 0.57%)4.80s (± 0.49%)-0.00s (- 0.04%)4.74s4.84s
Emit Time5.36s (± 0.68%)5.39s (± 1.27%)+0.04s (+ 0.65%)5.32s5.64s
Total Time12.95s (± 0.46%)12.99s (± 0.62%)+0.04s (+ 0.28%)12.85s13.28s
Monaco - node (v12.1.0, x64)
Memory used336,492k (± 0.01%)336,513k (± 0.02%)+21k (+ 0.01%)336,409k336,673k
Parse Time1.54s (± 0.86%)1.54s (± 0.89%)+0.01s (+ 0.39%)1.52s1.58s
Bind Time0.70s (± 1.84%)0.69s (± 0.80%)-0.01s (- 1.14%)0.68s0.71s
Check Time4.87s (± 0.47%)4.84s (± 0.36%)-0.03s (- 0.66%)4.80s4.87s
Emit Time2.83s (± 0.76%)2.81s (± 0.99%)-0.02s (- 0.60%)2.77s2.90s
Total Time9.93s (± 0.47%)9.88s (± 0.26%)-0.05s (- 0.54%)9.80s9.93s
TFS - node (v12.1.0, x64)
Memory used291,819k (± 0.02%)291,835k (± 0.03%)+17k (+ 0.01%)291,676k291,959k
Parse Time1.23s (± 0.66%)1.23s (± 0.63%)+0.00s (+ 0.08%)1.21s1.24s
Bind Time0.64s (± 0.90%)0.64s (± 0.73%)-0.00s (- 0.47%)0.63s0.65s
Check Time4.44s (± 0.36%)4.43s (± 0.62%)-0.01s (- 0.20%)4.38s4.52s
Emit Time2.94s (± 0.96%)2.91s (± 0.85%)-0.02s (- 0.82%)2.87s2.98s
Total Time9.25s (± 0.42%)9.22s (± 0.40%)-0.03s (- 0.35%)9.13s9.28s
material-ui - node (v12.1.0, x64)
Memory used466,976k (± 0.05%)466,888k (± 0.08%)-88k (- 0.02%)465,940k467,240k
Parse Time2.00s (± 0.38%)2.00s (± 0.47%)0.00s ( 0.00%)1.99s2.02s
Bind Time0.64s (± 0.58%)0.64s (± 0.77%)+0.00s (+ 0.16%)0.63s0.65s
Check Time12.01s (± 0.69%)12.02s (± 1.02%)+0.01s (+ 0.09%)11.82s12.45s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time14.65s (± 0.59%)14.66s (± 0.83%)+0.02s (+ 0.11%)14.48s15.09s
Angular - node (v8.9.0, x64)
Memory used346,316k (± 0.02%)346,357k (± 0.02%)+41k (+ 0.01%)346,265k346,495k
Parse Time2.55s (± 0.37%)2.55s (± 0.42%)+0.01s (+ 0.27%)2.53s2.58s
Bind Time0.86s (± 0.58%)0.86s (± 1.10%)-0.00s (- 0.12%)0.84s0.88s
Check Time5.54s (± 0.73%)5.54s (± 0.49%)+0.01s (+ 0.09%)5.49s5.61s
Emit Time6.21s (± 1.36%)6.06s (± 1.48%)-0.15s (- 2.40%)5.90s6.26s
Total Time15.17s (± 0.51%)15.03s (± 0.66%)-0.14s (- 0.92%)14.81s15.25s
Monaco - node (v8.9.0, x64)
Memory used355,579k (± 0.02%)355,623k (± 0.02%)+45k (+ 0.01%)355,486k355,747k
Parse Time1.90s (± 0.44%)1.88s (± 0.34%)-0.01s (- 0.74%)1.87s1.89s
Bind Time0.89s (± 0.82%)0.89s (± 0.77%)-0.01s (- 0.67%)0.88s0.91s
Check Time5.62s (± 0.55%)5.60s (± 0.38%)-0.02s (- 0.32%)5.55s5.63s
Emit Time3.31s (± 1.50%)3.24s (± 1.25%)-0.07s (- 1.97%)3.18s3.34s
Total Time11.71s (± 0.55%)11.61s (± 0.41%)-0.10s (- 0.90%)11.49s11.74s
TFS - node (v8.9.0, x64)
Memory used309,276k (± 0.01%)309,276k (± 0.03%)-1k (- 0.00%)309,122k309,507k
Parse Time1.56s (± 0.32%)1.54s (± 0.44%)-0.01s (- 0.77%)1.53s1.56s
Bind Time0.68s (± 0.95%)0.68s (± 0.70%)-0.00s (- 0.15%)0.67s0.69s
Check Time5.30s (± 0.59%)5.28s (± 0.46%)-0.02s (- 0.30%)5.20s5.32s
Emit Time2.93s (± 0.80%)2.94s (± 0.65%)+0.01s (+ 0.31%)2.88s2.98s
Total Time10.46s (± 0.28%)10.44s (± 0.34%)-0.02s (- 0.20%)10.31s10.48s
material-ui - node (v8.9.0, x64)
Memory used493,347k (± 0.02%)493,394k (± 0.01%)+47k (+ 0.01%)493,292k493,563k
Parse Time2.40s (± 0.36%)2.40s (± 0.65%)+0.00s (+ 0.12%)2.38s2.44s
Bind Time0.81s (± 1.17%)0.82s (± 0.94%)+0.01s (+ 0.86%)0.80s0.84s
Check Time17.92s (± 0.84%)17.83s (± 0.86%)-0.09s (- 0.49%)17.52s18.14s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time21.14s (± 0.68%)21.06s (± 0.68%)-0.08s (- 0.37%)20.74s21.35s
Angular - node (v8.9.0, x86)
Memory used198,593k (± 0.02%)198,609k (± 0.03%)+16k (+ 0.01%)198,489k198,697k
Parse Time2.48s (± 0.81%)2.46s (± 0.58%)-0.02s (- 0.69%)2.42s2.49s
Bind Time1.00s (± 0.93%)1.00s (± 1.22%)+0.00s (+ 0.10%)0.98s1.04s
Check Time4.99s (± 0.61%)5.00s (± 0.31%)+0.01s (+ 0.18%)4.97s5.05s
Emit Time5.92s (± 0.90%)5.94s (± 0.75%)+0.02s (+ 0.32%)5.84s6.04s
Total Time14.39s (± 0.56%)14.40s (± 0.33%)+0.01s (+ 0.06%)14.27s14.50s
Monaco - node (v8.9.0, x86)
Memory used201,394k (± 0.01%)201,407k (± 0.02%)+13k (+ 0.01%)201,313k201,475k
Parse Time1.93s (± 0.81%)1.92s (± 0.90%)-0.01s (- 0.41%)1.88s1.97s
Bind Time0.71s (± 0.91%)0.71s (± 0.70%)-0.00s (- 0.28%)0.69s0.71s
Check Time5.46s (± 1.24%)5.47s (± 1.24%)+0.01s (+ 0.16%)5.37s5.64s
Emit Time3.03s (± 3.23%)2.99s (± 3.32%)-0.05s (- 1.52%)2.72s3.10s
Total Time11.13s (± 0.64%)11.08s (± 0.50%)-0.05s (- 0.41%)10.94s11.21s
TFS - node (v8.9.0, x86)
Memory used176,811k (± 0.02%)176,830k (± 0.03%)+19k (+ 0.01%)176,715k176,949k
Parse Time1.58s (± 0.84%)1.59s (± 1.39%)+0.01s (+ 0.38%)1.56s1.67s
Bind Time0.65s (± 1.23%)0.65s (± 0.90%)-0.00s (- 0.15%)0.64s0.66s
Check Time4.79s (± 0.56%)4.83s (± 0.65%)+0.04s (+ 0.75%)4.75s4.92s
Emit Time2.80s (± 1.10%)2.83s (± 1.55%)+0.03s (+ 1.07%)2.75s2.94s
Total Time9.82s (± 0.40%)9.89s (± 0.57%)+0.08s (+ 0.79%)9.74s10.01s
material-ui - node (v8.9.0, x86)
Memory used277,775k (± 0.01%)277,814k (± 0.01%)+39k (+ 0.01%)277,750k277,893k
Parse Time2.46s (± 0.82%)2.46s (± 0.61%)-0.00s (- 0.00%)2.43s2.51s
Bind Time0.71s (± 5.86%)0.74s (± 6.14%)+0.03s (+ 3.65%)0.67s0.87s
Check Time16.38s (± 0.69%)16.42s (± 0.80%)+0.04s (+ 0.24%)16.24s16.86s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time19.55s (± 0.74%)19.61s (± 0.79%)+0.06s (+ 0.32%)19.42s20.08s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-166-generic
Architecturex64
Available Memory16 GB
Available Memory1 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v10.16.3, x64)
  • node (v12.1.0, x64)
  • node (v8.9.0, x64)
  • node (v8.9.0, x86)
Scenarios
  • Angular - node (v10.16.3, x64)
  • Angular - node (v12.1.0, x64)
  • Angular - node (v8.9.0, x64)
  • Angular - node (v8.9.0, x86)
  • Monaco - node (v10.16.3, x64)
  • Monaco - node (v12.1.0, x64)
  • Monaco - node (v8.9.0, x64)
  • Monaco - node (v8.9.0, x86)
  • TFS - node (v10.16.3, x64)
  • TFS - node (v12.1.0, x64)
  • TFS - node (v8.9.0, x64)
  • TFS - node (v8.9.0, x86)
  • material-ui - node (v10.16.3, x64)
  • material-ui - node (v12.1.0, x64)
  • material-ui - node (v8.9.0, x64)
  • material-ui - node (v8.9.0, x86)
BenchmarkNameIterations
Current4082510
Baselinemaster10

@typescript-bot

Copy link
Copy Markdown
Contributor

The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master.

@rbuckton

Copy link
Copy Markdown
ContributorAuthor

These are the exact cases that illustrate why I'm not certain this approach will work compared to #40823:

https://github.com/typescript-bot/TypeScript/pull/88/files#diff-f408a44c43eeedd5c1ee6356b6cda8b2

@sandersnNathan Shively-Sanders (sandersn) added the Experiment A fork with an experimental idea which might not make it into master label Oct 9, 2020
@sandersn

Copy link
Copy Markdown
Member

This experiment is pretty old, so I'm going to close it to reduce the number of open PRs.

@microsoftMicrosoft (microsoft) locked as resolved and limited conversation to collaborators Oct 21, 2025
@jakebailey
Jake Bailey (jakebailey) deleted the iteratorVoidResult branch August 28, 2026 19:35
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: TeamExperimentA fork with an experimental idea which might not make it into masterFor Milestone BugPRs that fix a bug with a specific milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IteratorResult<T> definition conflicts with the JS spec

3 participants

@rbuckton@typescript-bot@sandersn