Skip to content

Use the wildcard type for signature erasure #41067

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

weswigham
Copy link
Member

Fixes #23352's first issue. We used any as a "type erasure placeholder" so that we could assume it would allow all assignability. It does, not, however, allow assignability to never (which is the cause of the issue). The wildcardType (an any variant) we introduced for inference awhile back does admit assignability to never, and so fulfills the erasure duty better.

@weswigham
Copy link
Member Author

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 12, 2020

Heya @weswigham, I've started to run the parallelized Definitely Typed test suite on this PR at cdb4e6e. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 12, 2020

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 12, 2020

Heya @weswigham, I've started to run the parallelized community code test suite on this PR at cdb4e6e. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 12, 2020

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

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

Here they are:

Comparison Report - master..41067

Metric master 41067 Delta Best Worst
Angular - node (v10.16.3, x64)
Memory used 349,757k (± 0.02%) 350,271k (± 0.01%) +514k (+ 0.15%) 350,191k 350,389k
Parse Time 2.01s (± 0.80%) 2.00s (± 0.58%) -0.01s (- 0.45%) 1.97s 2.02s
Bind Time 0.82s (± 1.07%) 0.83s (± 0.98%) +0.01s (+ 1.22%) 0.82s 0.86s
Check Time 4.94s (± 0.54%) 5.00s (± 0.65%) +0.06s (+ 1.26%) 4.93s 5.07s
Emit Time 5.19s (± 0.41%) 5.25s (± 0.37%) +0.06s (+ 1.16%) 5.21s 5.29s
Total Time 12.96s (± 0.34%) 13.08s (± 0.33%) +0.12s (+ 0.93%) 13.01s 13.17s
Monaco - node (v10.16.3, x64)
Memory used 354,351k (± 0.02%) 354,400k (± 0.02%) +49k (+ 0.01%) 354,253k 354,586k
Parse Time 1.57s (± 0.57%) 1.56s (± 0.64%) -0.00s (- 0.13%) 1.54s 1.59s
Bind Time 0.71s (± 0.56%) 0.72s (± 0.65%) +0.01s (+ 1.27%) 0.71s 0.73s
Check Time 5.07s (± 0.54%) 5.09s (± 0.45%) +0.02s (+ 0.37%) 5.02s 5.14s
Emit Time 2.76s (± 0.93%) 2.77s (± 0.56%) +0.01s (+ 0.33%) 2.74s 2.81s
Total Time 10.11s (± 0.37%) 10.15s (± 0.39%) +0.03s (+ 0.33%) 10.07s 10.21s
TFS - node (v10.16.3, x64)
Memory used 307,640k (± 0.04%) 307,659k (± 0.02%) +19k (+ 0.01%) 307,519k 307,890k
Parse Time 1.22s (± 0.76%) 1.22s (± 0.81%) 0.00s ( 0.00%) 1.20s 1.24s
Bind Time 0.66s (± 1.37%) 0.68s (± 1.01%) +0.02s (+ 2.27%) 0.66s 0.69s
Check Time 4.57s (± 0.94%) 4.59s (± 0.52%) +0.02s (+ 0.50%) 4.55s 4.67s
Emit Time 2.90s (± 1.72%) 2.91s (± 1.10%) +0.01s (+ 0.31%) 2.83s 2.98s
Total Time 9.35s (± 0.59%) 9.40s (± 0.24%) +0.05s (+ 0.51%) 9.34s 9.44s
material-ui - node (v10.16.3, x64)
Memory used 489,125k (± 0.02%) 488,762k (± 0.01%) -362k (- 0.07%) 488,632k 488,910k
Parse Time 1.99s (± 0.54%) 1.98s (± 0.45%) -0.01s (- 0.35%) 1.97s 2.01s
Bind Time 0.65s (± 0.90%) 0.65s (± 0.53%) +0.00s (+ 0.00%) 0.64s 0.65s
Check Time 13.42s (± 0.51%) 13.52s (± 0.59%) +0.09s (+ 0.68%) 13.39s 13.69s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 16.06s (± 0.45%) 16.15s (± 0.52%) +0.08s (+ 0.52%) 16.02s 16.35s
Angular - node (v12.1.0, x64)
Memory used 326,934k (± 0.02%) 327,372k (± 0.03%) +438k (+ 0.13%) 327,239k 327,582k
Parse Time 2.00s (± 0.53%) 2.00s (± 0.65%) -0.00s (- 0.15%) 1.96s 2.03s
Bind Time 0.81s (± 1.12%) 0.82s (± 0.61%) +0.01s (+ 0.74%) 0.80s 0.82s
Check Time 4.83s (± 0.40%) 4.87s (± 0.36%) +0.03s (+ 0.72%) 4.85s 4.93s
Emit Time 5.39s (± 0.84%) 5.43s (± 0.93%) +0.04s (+ 0.69%) 5.35s 5.55s
Total Time 13.04s (± 0.52%) 13.11s (± 0.36%) +0.08s (+ 0.59%) 13.01s 13.22s
Monaco - node (v12.1.0, x64)
Memory used 336,578k (± 0.02%) 336,570k (± 0.01%) -7k (- 0.00%) 336,520k 336,678k
Parse Time 1.54s (± 0.72%) 1.55s (± 0.76%) +0.02s (+ 0.98%) 1.53s 1.57s
Bind Time 0.69s (± 0.58%) 0.69s (± 0.43%) +0.00s (+ 0.44%) 0.69s 0.70s
Check Time 4.88s (± 0.50%) 4.90s (± 0.39%) +0.02s (+ 0.43%) 4.87s 4.94s
Emit Time 2.82s (± 0.91%) 2.82s (± 0.93%) -0.00s (- 0.00%) 2.77s 2.90s
Total Time 9.93s (± 0.39%) 9.97s (± 0.33%) +0.04s (+ 0.37%) 9.91s 10.03s
TFS - node (v12.1.0, x64)
Memory used 291,933k (± 0.03%) 291,899k (± 0.02%) -34k (- 0.01%) 291,744k 292,014k
Parse Time 1.23s (± 0.49%) 1.23s (± 0.71%) +0.01s (+ 0.41%) 1.20s 1.24s
Bind Time 0.65s (± 1.38%) 0.64s (± 0.81%) -0.01s (- 0.77%) 0.63s 0.66s
Check Time 4.47s (± 0.30%) 4.52s (± 0.62%) +0.05s (+ 1.14%) 4.46s 4.57s
Emit Time 2.92s (± 0.99%) 2.94s (± 1.11%) +0.02s (+ 0.75%) 2.87s 3.02s
Total Time 9.26s (± 0.36%) 9.33s (± 0.56%) +0.07s (+ 0.76%) 9.24s 9.46s
material-ui - node (v12.1.0, x64)
Memory used 467,034k (± 0.05%) 466,632k (± 0.08%) -402k (- 0.09%) 465,470k 467,007k
Parse Time 2.01s (± 0.37%) 2.01s (± 0.47%) +0.00s (+ 0.10%) 1.99s 2.03s
Bind Time 0.64s (± 1.05%) 0.64s (± 0.58%) +0.01s (+ 1.26%) 0.64s 0.65s
Check Time 12.05s (± 0.94%) 12.07s (± 0.73%) +0.02s (+ 0.18%) 11.89s 12.22s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 14.70s (± 0.81%) 14.73s (± 0.63%) +0.03s (+ 0.20%) 14.55s 14.89s
Angular - node (v8.9.0, x64)
Memory used 346,442k (± 0.01%) 346,936k (± 0.03%) +494k (+ 0.14%) 346,712k 347,151k
Parse Time 2.54s (± 0.51%) 2.55s (± 0.42%) +0.01s (+ 0.39%) 2.54s 2.59s
Bind Time 0.85s (± 0.43%) 0.87s (± 0.79%) +0.01s (+ 1.41%) 0.85s 0.88s
Check Time 5.56s (± 0.52%) 5.59s (± 0.60%) +0.04s (+ 0.65%) 5.53s 5.69s
Emit Time 6.15s (± 1.07%) 6.21s (± 1.35%) +0.06s (+ 0.96%) 5.97s 6.35s
Total Time 15.11s (± 0.55%) 15.23s (± 0.63%) +0.12s (+ 0.77%) 14.99s 15.42s
Monaco - node (v8.9.0, x64)
Memory used 355,704k (± 0.02%) 355,741k (± 0.01%) +37k (+ 0.01%) 355,649k 355,894k
Parse Time 1.89s (± 0.77%) 1.88s (± 0.44%) -0.00s (- 0.11%) 1.86s 1.90s
Bind Time 0.89s (± 0.45%) 0.89s (± 0.73%) -0.00s (- 0.34%) 0.88s 0.90s
Check Time 5.62s (± 0.37%) 5.59s (± 0.55%) -0.03s (- 0.53%) 5.54s 5.67s
Emit Time 3.29s (± 1.17%) 3.28s (± 1.07%) -0.01s (- 0.30%) 3.21s 3.37s
Total Time 11.69s (± 0.28%) 11.64s (± 0.38%) -0.04s (- 0.37%) 11.52s 11.71s
TFS - node (v8.9.0, x64)
Memory used 309,391k (± 0.02%) 309,398k (± 0.02%) +7k (+ 0.00%) 309,289k 309,598k
Parse Time 1.55s (± 0.64%) 1.55s (± 0.34%) -0.00s (- 0.26%) 1.54s 1.56s
Bind Time 0.68s (± 0.73%) 0.68s (± 0.54%) 0.00s ( 0.00%) 0.67s 0.68s
Check Time 5.31s (± 0.58%) 5.31s (± 0.86%) -0.00s (- 0.02%) 5.24s 5.44s
Emit Time 2.94s (± 0.34%) 2.95s (± 0.88%) +0.01s (+ 0.24%) 2.88s 3.01s
Total Time 10.48s (± 0.34%) 10.48s (± 0.47%) +0.00s (+ 0.02%) 10.37s 10.62s
material-ui - node (v8.9.0, x64)
Memory used 493,431k (± 0.01%) 493,217k (± 0.01%) -214k (- 0.04%) 493,119k 493,324k
Parse Time 2.40s (± 0.46%) 2.41s (± 0.61%) +0.01s (+ 0.37%) 2.38s 2.45s
Bind Time 0.81s (± 1.02%) 0.82s (± 1.10%) +0.00s (+ 0.12%) 0.80s 0.84s
Check Time 17.95s (± 0.69%) 17.87s (± 0.86%) -0.08s (- 0.47%) 17.46s 18.13s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 21.17s (± 0.56%) 21.10s (± 0.72%) -0.07s (- 0.35%) 20.70s 21.36s
Angular - node (v8.9.0, x86)
Memory used 198,690k (± 0.01%) 198,985k (± 0.02%) +294k (+ 0.15%) 198,912k 199,083k
Parse Time 2.48s (± 1.02%) 2.47s (± 0.80%) -0.01s (- 0.28%) 2.44s 2.51s
Bind Time 1.00s (± 1.00%) 1.01s (± 1.08%) +0.00s (+ 0.50%) 0.98s 1.04s
Check Time 5.05s (± 0.56%) 5.06s (± 0.69%) +0.02s (+ 0.30%) 5.00s 5.15s
Emit Time 5.89s (± 0.83%) 6.02s (± 1.37%) +0.14s (+ 2.34%) 5.84s 6.22s
Total Time 14.42s (± 0.58%) 14.56s (± 0.66%) +0.15s (+ 1.03%) 14.38s 14.83s
Monaco - node (v8.9.0, x86)
Memory used 201,493k (± 0.01%) 201,521k (± 0.01%) +28k (+ 0.01%) 201,481k 201,602k
Parse Time 1.94s (± 1.05%) 1.92s (± 0.85%) -0.03s (- 1.39%) 1.89s 1.96s
Bind Time 0.71s (± 0.47%) 0.70s (± 1.08%) -0.01s (- 0.85%) 0.69s 0.72s
Check Time 5.47s (± 0.38%) 5.53s (± 1.51%) +0.06s (+ 1.13%) 5.42s 5.72s
Emit Time 3.06s (± 0.59%) 2.97s (± 4.33%) -0.09s (- 2.95%) 2.65s 3.11s
Total Time 11.18s (± 0.25%) 11.12s (± 0.67%) -0.06s (- 0.54%) 10.92s 11.28s
TFS - node (v8.9.0, x86)
Memory used 176,867k (± 0.03%) 176,917k (± 0.02%) +50k (+ 0.03%) 176,871k 176,980k
Parse Time 1.60s (± 1.10%) 1.60s (± 0.54%) -0.01s (- 0.44%) 1.58s 1.62s
Bind Time 0.66s (± 2.04%) 0.65s (± 1.39%) -0.00s (- 0.61%) 0.64s 0.68s
Check Time 4.82s (± 0.58%) 4.80s (± 0.53%) -0.02s (- 0.35%) 4.74s 4.85s
Emit Time 2.80s (± 0.66%) 2.81s (± 1.19%) +0.01s (+ 0.32%) 2.74s 2.91s
Total Time 9.88s (± 0.51%) 9.86s (± 0.26%) -0.02s (- 0.20%) 9.81s 9.92s
material-ui - node (v8.9.0, x86)
Memory used 277,878k (± 0.02%) 277,691k (± 0.01%) -187k (- 0.07%) 277,611k 277,781k
Parse Time 2.46s (± 0.43%) 2.46s (± 0.59%) +0.00s (+ 0.12%) 2.43s 2.49s
Bind Time 0.69s (± 1.35%) 0.71s (± 4.44%) +0.03s (+ 3.78%) 0.68s 0.82s
Check Time 16.45s (± 0.73%) 16.38s (± 0.90%) -0.07s (- 0.45%) 16.06s 16.84s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 19.60s (± 0.63%) 19.55s (± 0.77%) -0.04s (- 0.22%) 19.33s 20.06s
System
Machine Namets-ci-ubuntu
Platformlinux 4.4.0-166-generic
Architecturex64
Available Memory16 GB
Available Memory3 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)
Benchmark Name Iterations
Current 41067 10
Baseline master 10

@typescript-bot
Copy link
Collaborator

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

@sandersn sandersn added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Oct 20, 2020
@sandersn sandersn requested a review from ahejlsberg October 20, 2020 15:33
@sandersn
Copy link
Member

@weswigham do the baselines look good for this change?

@weswigham
Copy link
Member Author

DT was clean, rwc was mostly clean (just an elaboration change when relating jquery promise to normal promise in a case where there was already an error), user baselines were.... probably clean? There's some noise there, but I think it's unrelated. Perf looks fine.

@RyanCavanaugh
Copy link
Member

Closing due to closing the upstream bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
Archived in project
4 participants