Skip to content

Fix Awaited<T> for onfulfilled callbacks with more than one argument - #46951

Merged
Daniel Rosenwasser (DanielRosenwasser) merged 2 commits into
mainfrom
fix46934
Dec 7, 2021
Merged

Daniel Rosenwasser (DanielRosenwasser) merged 2 commits into
mainfrom
fix46934

Conversation

@rbuckton

Copy link
Copy Markdown
Contributor

This adds a rest argument to the inference for the onfulfilled callback to support Promise subtypes that provide more than one argument.

Fixes #46934

@typescript-bot

TypeScript Bot (typescript-bot) commented Nov 30, 2021 •

Copy link
Copy Markdown
Contributor

Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the parallelized community code test suite on this PR at e19aed3. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented Nov 30, 2021 •

Copy link
Copy Markdown
Contributor

Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the perf test suite on this PR at e19aed3. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented Nov 30, 2021 •

Copy link
Copy Markdown
Contributor

Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the extended test suite on this PR at e19aed3. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented Nov 30, 2021 •

Copy link
Copy Markdown
Contributor

Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the tarball bundle task on this PR at e19aed3. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented Nov 30, 2021 •

Copy link
Copy Markdown
Contributor

Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the parallelized Definitely Typed test suite on this PR at e19aed3. You can monitor the build here.

@typescript-bot

TypeScript Bot (typescript-bot) commented Nov 30, 2021 •

Copy link
Copy Markdown
Contributor

Hey Daniel Rosenwasser (@DanielRosenwasser), 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/115574/artifacts?artifactName=tgz&fileId=6551FFFB71A718253B428FD346F7C727EDCCF647F8F015F222FC8F831145536A02&fileName=/typescript-4.6.0-insiders.20211130.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@4.6.0-pr-46951-6".;

@rbuckton

Copy link
Copy Markdown
Contributor Author
@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 1, 2021 •

Copy link
Copy Markdown
Contributor

Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at e19aed3. 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 - main..46951

Metric main 46951 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 354,508k (± 0.02%) 354,937k (± 0.03%) +430k (+ 0.12%) 354,674k 355,142k
Parse Time 1.95s (± 0.32%) 1.95s (± 0.42%) -0.00s (- 0.15%) 1.93s 1.96s
Bind Time 0.84s (± 0.89%) 0.84s (± 0.70%) +0.00s (+ 0.12%) 0.83s 0.86s
Check Time 5.47s (± 0.45%) 5.49s (± 0.36%) +0.02s (+ 0.38%) 5.45s 5.54s
Emit Time 5.86s (± 0.33%) 5.89s (± 0.42%) +0.04s (+ 0.60%) 5.85s 5.96s
Total Time 14.12s (± 0.26%) 14.18s (± 0.34%) +0.06s (+ 0.41%) 14.10s 14.31s
Compiler-Unions - node (v10.16.3, x64)
Memory used 204,059k (± 0.03%) 204,006k (± 0.02%) -53k (- 0.03%) 203,867k 204,078k
Parse Time 0.78s (± 0.87%) 0.78s (± 0.87%) 0.00s ( 0.00%) 0.77s 0.80s
Bind Time 0.52s (± 1.11%) 0.52s (± 1.39%) +0.00s (+ 0.38%) 0.51s 0.54s
Check Time 7.81s (± 0.50%) 7.83s (± 0.65%) +0.03s (+ 0.37%) 7.73s 7.96s
Emit Time 2.46s (± 0.78%) 2.48s (± 0.86%) +0.03s (+ 1.06%) 2.42s 2.53s
Total Time 11.56s (± 0.33%) 11.62s (± 0.54%) +0.06s (+ 0.48%) 11.49s 11.76s
Monaco - node (v10.16.3, x64)
Memory used 342,426k (± 0.02%) 342,435k (± 0.02%) +9k (+ 0.00%) 342,243k 342,561k
Parse Time 1.48s (± 0.44%) 1.48s (± 0.71%) +0.00s (+ 0.14%) 1.46s 1.51s
Bind Time 0.74s (± 0.66%) 0.75s (± 0.82%) +0.01s (+ 0.67%) 0.74s 0.76s
Check Time 5.47s (± 0.70%) 5.49s (± 0.70%) +0.01s (+ 0.24%) 5.43s 5.59s
Emit Time 3.19s (± 0.69%) 3.20s (± 0.79%) +0.02s (+ 0.47%) 3.17s 3.29s
Total Time 10.88s (± 0.22%) 10.91s (± 0.34%) +0.03s (+ 0.28%) 10.85s 11.00s
TFS - node (v10.16.3, x64)
Memory used 305,439k (± 0.03%) 305,526k (± 0.01%) +87k (+ 0.03%) 305,466k 305,618k
Parse Time 1.20s (± 0.46%) 1.20s (± 0.48%) -0.00s (- 0.08%) 1.18s 1.21s
Bind Time 0.71s (± 0.66%) 0.71s (± 0.73%) -0.00s (- 0.14%) 0.70s 0.72s
Check Time 5.03s (± 0.43%) 5.01s (± 0.38%) -0.02s (- 0.38%) 4.97s 5.05s
Emit Time 3.34s (± 0.93%) 3.34s (± 0.96%) +0.00s (+ 0.09%) 3.28s 3.43s
Total Time 10.28s (± 0.35%) 10.26s (± 0.31%) -0.02s (- 0.18%) 10.22s 10.35s
material-ui - node (v10.16.3, x64)
Memory used 471,310k (± 0.01%) 471,277k (± 0.01%) -34k (- 0.01%) 471,145k 471,348k
Parse Time 1.77s (± 0.40%) 1.78s (± 0.33%) +0.01s (+ 0.28%) 1.76s 1.79s
Bind Time 0.65s (± 0.52%) 0.66s (± 0.79%) +0.01s (+ 0.92%) 0.65s 0.67s
Check Time 14.17s (± 0.38%) 14.18s (± 0.33%) +0.01s (+ 0.11%) 14.10s 14.35s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 16.59s (± 0.34%) 16.61s (± 0.29%) +0.02s (+ 0.13%) 16.54s 16.79s
xstate - node (v10.16.3, x64)
Memory used 568,998k (± 0.02%) 569,024k (± 0.01%) +26k (+ 0.00%) 568,795k 569,146k
Parse Time 2.55s (± 0.30%) 2.55s (± 0.29%) +0.01s (+ 0.24%) 2.53s 2.56s
Bind Time 1.00s (± 0.55%) 1.01s (± 0.74%) +0.01s (+ 0.50%) 0.99s 1.02s
Check Time 1.49s (± 0.50%) 1.50s (± 0.39%) +0.00s (+ 0.27%) 1.48s 1.51s
Emit Time 0.07s (± 0.00%) 0.07s (± 3.14%) +0.00s (+ 1.43%) 0.07s 0.08s
Total Time 5.11s (± 0.19%) 5.12s (± 0.24%) +0.02s (+ 0.35%) 5.10s 5.15s
Angular - node (v12.1.0, x64)
Memory used 332,458k (± 0.02%) 332,812k (± 0.02%) +354k (+ 0.11%) 332,690k 332,930k
Parse Time 1.94s (± 0.56%) 1.94s (± 0.71%) +0.00s (+ 0.10%) 1.90s 1.96s
Bind Time 0.82s (± 0.91%) 0.82s (± 0.60%) -0.00s (- 0.49%) 0.81s 0.83s
Check Time 5.30s (± 0.30%) 5.29s (± 0.29%) -0.01s (- 0.28%) 5.26s 5.33s
Emit Time 6.15s (± 0.96%) 6.12s (± 0.44%) -0.03s (- 0.41%) 6.05s 6.19s
Total Time 14.21s (± 0.47%) 14.17s (± 0.25%) -0.04s (- 0.30%) 14.08s 14.26s
Compiler-Unions - node (v12.1.0, x64)
Memory used 191,602k (± 0.03%) 191,564k (± 0.03%) -38k (- 0.02%) 191,465k 191,687k
Parse Time 0.78s (± 0.61%) 0.78s (± 0.77%) -0.01s (- 0.89%) 0.76s 0.79s
Bind Time 0.53s (± 0.89%) 0.53s (± 1.13%) -0.01s (- 1.31%) 0.51s 0.54s
Check Time 7.28s (± 0.39%) 7.29s (± 0.61%) +0.01s (+ 0.19%) 7.20s 7.39s
Emit Time 2.47s (± 0.81%) 2.49s (± 1.11%) +0.02s (+ 0.61%) 2.43s 2.55s
Total Time 11.07s (± 0.38%) 11.08s (± 0.50%) +0.01s (+ 0.14%) 10.95s 11.19s
Monaco - node (v12.1.0, x64)
Memory used 325,493k (± 0.04%) 325,446k (± 0.07%) -48k (- 0.01%) 324,527k 325,742k
Parse Time 1.46s (± 0.72%) 1.47s (± 0.94%) +0.01s (+ 0.62%) 1.44s 1.50s
Bind Time 0.73s (± 0.61%) 0.73s (± 0.76%) +0.00s (+ 0.00%) 0.72s 0.74s
Check Time 5.34s (± 0.48%) 5.36s (± 0.42%) +0.02s (+ 0.37%) 5.32s 5.42s
Emit Time 3.21s (± 0.55%) 3.23s (± 1.04%) +0.02s (+ 0.65%) 3.19s 3.35s
Total Time 10.74s (± 0.36%) 10.79s (± 0.54%) +0.05s (+ 0.48%) 10.71s 10.99s
TFS - node (v12.1.0, x64)
Memory used 290,301k (± 0.03%) 290,243k (± 0.01%) -58k (- 0.02%) 290,147k 290,330k
Parse Time 1.21s (± 0.48%) 1.21s (± 0.68%) +0.00s (+ 0.08%) 1.20s 1.23s
Bind Time 0.68s (± 0.54%) 0.69s (± 0.84%) +0.01s (+ 1.17%) 0.68s 0.70s
Check Time 4.94s (± 0.47%) 4.95s (± 0.59%) +0.01s (+ 0.24%) 4.87s 4.99s
Emit Time 3.40s (± 1.27%) 3.38s (± 0.70%) -0.02s (- 0.44%) 3.33s 3.42s
Total Time 10.23s (± 0.63%) 10.23s (± 0.38%) +0.00s (+ 0.04%) 10.14s 10.30s
material-ui - node (v12.1.0, x64)
Memory used 450,083k (± 0.02%) 450,067k (± 0.01%) -17k (- 0.00%) 449,958k 450,220k
Parse Time 1.78s (± 0.33%) 1.78s (± 0.42%) +0.00s (+ 0.06%) 1.76s 1.79s
Bind Time 0.64s (± 1.14%) 0.64s (± 0.78%) -0.00s (- 0.47%) 0.63s 0.65s
Check Time 12.69s (± 0.40%) 12.64s (± 0.30%) -0.04s (- 0.34%) 12.55s 12.74s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.10s (± 0.33%) 15.05s (± 0.28%) -0.05s (- 0.32%) 14.96s 15.18s
xstate - node (v12.1.0, x64)
Memory used 535,055k (± 0.02%) 535,031k (± 0.01%) -24k (- 0.00%) 534,893k 535,235k
Parse Time 2.48s (± 0.47%) 2.48s (± 0.30%) +0.01s (+ 0.24%) 2.47s 2.50s
Bind Time 1.04s (± 0.75%) 1.04s (± 0.74%) -0.00s (- 0.38%) 1.02s 1.05s
Check Time 1.43s (± 0.56%) 1.43s (± 0.71%) +0.00s (+ 0.21%) 1.40s 1.45s
Emit Time 0.07s (± 0.00%) 0.07s (± 0.00%) 0.00s ( 0.00%) 0.07s 0.07s
Total Time 5.02s (± 0.27%) 5.02s (± 0.33%) +0.00s (+ 0.08%) 4.97s 5.05s
Angular - node (v14.15.1, x64)
Memory used 330,820k (± 0.01%) 331,218k (± 0.01%) +398k (+ 0.12%) 331,154k 331,278k
Parse Time 1.94s (± 0.53%) 1.94s (± 0.48%) +0.00s (+ 0.15%) 1.92s 1.96s
Bind Time 0.86s (± 0.55%) 0.86s (± 0.64%) +0.00s (+ 0.23%) 0.85s 0.87s
Check Time 5.38s (± 0.48%) 5.39s (± 0.64%) +0.01s (+ 0.24%) 5.29s 5.46s
Emit Time 6.15s (± 0.33%) 6.19s (± 0.51%) +0.05s (+ 0.78%) 6.13s 6.27s
Total Time 14.32s (± 0.26%) 14.39s (± 0.35%) +0.07s (+ 0.50%) 14.24s 14.49s
Compiler-Unions - node (v14.15.1, x64)
Memory used 192,757k (± 0.49%) 192,044k (± 0.59%) -713k (- 0.37%) 190,169k 193,486k
Parse Time 0.81s (± 1.01%) 0.81s (± 0.87%) +0.00s (+ 0.25%) 0.80s 0.83s
Bind Time 0.55s (± 0.73%) 0.55s (± 0.40%) 0.00s ( 0.00%) 0.55s 0.56s
Check Time 7.34s (± 0.34%) 7.35s (± 0.54%) +0.01s (+ 0.10%) 7.27s 7.47s
Emit Time 2.48s (± 0.90%) 2.48s (± 1.55%) +0.00s (+ 0.12%) 2.43s 2.62s
Total Time 11.18s (± 0.30%) 11.19s (± 0.53%) +0.01s (+ 0.10%) 11.11s 11.36s
Monaco - node (v14.15.1, x64)
Memory used 324,294k (± 0.00%) 324,308k (± 0.00%) +15k (+ 0.00%) 324,267k 324,331k
Parse Time 1.50s (± 0.56%) 1.50s (± 0.35%) 0.00s ( 0.00%) 1.49s 1.51s
Bind Time 0.76s (± 0.59%) 0.75s (± 0.40%) -0.01s (- 0.79%) 0.75s 0.76s
Check Time 5.29s (± 0.43%) 5.25s (± 0.29%) -0.04s (- 0.78%) 5.22s 5.28s
Emit Time 3.25s (± 0.78%) 3.26s (± 0.78%) +0.01s (+ 0.31%) 3.20s 3.32s
Total Time 10.80s (± 0.35%) 10.76s (± 0.34%) -0.04s (- 0.33%) 10.70s 10.86s
TFS - node (v14.15.1, x64)
Memory used 289,141k (± 0.00%) 289,174k (± 0.01%) +33k (+ 0.01%) 289,138k 289,206k
Parse Time 1.22s (± 0.82%) 1.24s (± 1.15%) +0.01s (+ 0.98%) 1.22s 1.28s
Bind Time 0.73s (± 0.55%) 0.73s (± 0.71%) -0.00s (- 0.00%) 0.72s 0.74s
Check Time 4.91s (± 0.33%) 4.90s (± 0.40%) -0.01s (- 0.24%) 4.84s 4.94s
Emit Time 3.51s (± 0.53%) 3.47s (± 1.27%) -0.04s (- 1.08%) 3.31s 3.55s
Total Time 10.38s (± 0.26%) 10.33s (± 0.40%) -0.04s (- 0.43%) 10.20s 10.39s
material-ui - node (v14.15.1, x64)
Memory used 448,276k (± 0.01%) 448,315k (± 0.01%) +39k (+ 0.01%) 448,269k 448,383k
Parse Time 1.82s (± 0.34%) 1.83s (± 0.28%) +0.01s (+ 0.55%) 1.82s 1.84s
Bind Time 0.67s (± 0.54%) 0.68s (± 0.55%) +0.00s (+ 0.15%) 0.67s 0.68s
Check Time 12.77s (± 0.39%) 12.74s (± 0.46%) -0.02s (- 0.19%) 12.59s 12.87s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 15.26s (± 0.33%) 15.25s (± 0.39%) -0.01s (- 0.10%) 15.08s 15.37s
xstate - node (v14.15.1, x64)
Memory used 532,756k (± 0.01%) 532,817k (± 0.01%) +62k (+ 0.01%) 532,769k 532,888k
Parse Time 2.55s (± 0.63%) 2.56s (± 0.61%) +0.00s (+ 0.04%) 2.52s 2.60s
Bind Time 1.15s (± 1.10%) 1.15s (± 0.67%) 0.00s ( 0.00%) 1.13s 1.16s
Check Time 1.48s (± 0.52%) 1.48s (± 0.57%) +0.00s (+ 0.27%) 1.46s 1.50s
Emit Time 0.07s (± 0.00%) 0.07s (± 0.00%) 0.00s ( 0.00%) 0.07s 0.07s
Total Time 5.25s (± 0.50%) 5.25s (± 0.49%) +0.00s (+ 0.08%) 5.20s 5.33s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-210-generic
Architecturex64
Available Memory16 GB
Available Memory10 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)
Benchmark Name Iterations
Current 46951 10
Baseline main 10

Developer Information:

Download Benchmark

@rbuckton

Copy link
Copy Markdown
Contributor Author
@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 1, 2021 •

Copy link
Copy Markdown
Contributor

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

@rbuckton

Copy link
Copy Markdown
Contributor Author
@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 2, 2021 •

Copy link
Copy Markdown
Contributor

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

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 2, 2021 •

Copy link
Copy Markdown
Contributor

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

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 2, 2021 •

Copy link
Copy Markdown
Contributor

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

@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.

@andrewbranch

Copy link
Copy Markdown
Member

TypeScript Bot (@typescript-bot) cherry-pick this to release-4.5

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 7, 2021 •

Copy link
Copy Markdown
Contributor

Heya Andrew Branch (@andrewbranch), I've started to run the task to cherry-pick this into release-4.5 on this PR at f4b3ef2. You can monitor the build here.

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey Andrew Branch (@andrewbranch), I've opened #47058 for you.

TypeScript Bot (typescript-bot) pushed a commit to typescript-bot/TypeScript that referenced this pull request Dec 7, 2021
Component commits:
e19aed3 Fix Awaited<T> for onfulfilled callbacks with more than one argument

f4b3ef2 Merge branch 'main' into fix46934
Daniel Rosenwasser (DanielRosenwasser) pushed a commit that referenced this pull request Dec 7, 2021
Component commits:
e19aed3 Fix Awaited<T> for onfulfilled callbacks with more than one argument

f4b3ef2 Merge branch 'main' into fix46934

Co-authored-by: Ron Buckton <rbuckton@microsoft.com>
@DanielRosenwasser

Copy link
Copy Markdown
Member

Made this 4.5-bound.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

5 participants