Skip to content

Use function that doesn't return unknown type #54713

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

Merged
merged 2 commits into from
Jun 20, 2023
Merged

Conversation

gabritto
Copy link
Member

When refactoring #54596, I introduced a bug by using a function that returns unknownType when a property or index signature is missing. Instead, we need to use a function that returns undefined when the property or index signature is missing.
Fixes the failing package qrcode on the nightly DT run (https://typescript.visualstudio.com/TypeScript/_build/results?buildId=155426&view=logs&j=71179031-6417-5a2f-3d87-af6fce2011e4&t=69c46c41-df19-593d-5ed2-0b9c514993a3).

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jun 20, 2023
@gabritto
Copy link
Member Author

@typescript-bot test this
@typescript-bot run DT
@typescript-bot user test this
@typescript-bot test top100
@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 20, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 20, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 20, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 20, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 20, 2023

Heya @gabritto, I've started to run the diff-based top-repos suite on this PR at eba78e4. You can monitor the build here.

Update: The results are in!

@gabritto gabritto requested a review from sandersn June 20, 2023 00:34
@typescript-bot
Copy link
Collaborator

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

There were infrastructure failures potentially unrelated to your change:

  • 1 instance of "Unknown failure"
  • 1 instance of "Package install failed"

Otherwise...

Something interesting changed - please have a look.

Details

rxjs-src

/mnt/ts_downloads/rxjs-src/build.sh

  • [NEW] error TS2428: All declarations of 'WeakMap' must have identical type parameters.
    • /home/vsts/work/1/s/typescript-54713/lib/lib.es2015.collection.d.ts(63,11)
    • /home/vsts/work/1/s/typescript-54713/lib/lib.es2015.iterable.d.ts(162,11)
    • /home/vsts/work/1/s/typescript-54713/lib/lib.es2015.symbol.wellknown.d.ts(140,11)
    • /home/vsts/work/1/s/typescript-54713/lib/lib.es2015.collection.d.ts(63,11)
    • /home/vsts/work/1/s/typescript-54713/lib/lib.es2015.iterable.d.ts(162,11)
    • /home/vsts/work/1/s/typescript-54713/lib/lib.es2015.symbol.wellknown.d.ts(140,11)
    • /home/vsts/work/1/s/typescript-54713/lib/lib.es2015.collection.d.ts(63,11)
    • /home/vsts/work/1/s/typescript-54713/lib/lib.es2015.iterable.d.ts(162,11)
    • /home/vsts/work/1/s/typescript-54713/lib/lib.es2015.symbol.wellknown.d.ts(140,11)
    • /home/vsts/work/1/s/typescript-54713/lib/lib.es2015.collection.d.ts(63,11)
    • /home/vsts/work/1/s/typescript-54713/lib/lib.es2015.iterable.d.ts(162,11)
    • /home/vsts/work/1/s/typescript-54713/lib/lib.es2015.symbol.wellknown.d.ts(140,11)
    • /home/vsts/work/1/s/typescript-54713/lib/lib.es2015.collection.d.ts(63,11)
    • /home/vsts/work/1/s/typescript-54713/lib/lib.es2015.iterable.d.ts(162,11)
    • /home/vsts/work/1/s/typescript-54713/lib/lib.es2015.symbol.wellknown.d.ts(140,11)
  • [MISSING] error TS2428: All declarations of 'WeakMap' must have identical type parameters.
    • /home/vsts/work/1/s/typescript-main/lib/lib.es2015.collection.d.ts(63,11)
    • /home/vsts/work/1/s/typescript-main/lib/lib.es2015.iterable.d.ts(162,11)
    • /home/vsts/work/1/s/typescript-main/lib/lib.es2015.symbol.wellknown.d.ts(140,11)
    • /home/vsts/work/1/s/typescript-main/lib/lib.es2015.collection.d.ts(63,11)
    • /home/vsts/work/1/s/typescript-main/lib/lib.es2015.iterable.d.ts(162,11)
    • /home/vsts/work/1/s/typescript-main/lib/lib.es2015.symbol.wellknown.d.ts(140,11)
    • /home/vsts/work/1/s/typescript-main/lib/lib.es2015.collection.d.ts(63,11)
    • /home/vsts/work/1/s/typescript-main/lib/lib.es2015.iterable.d.ts(162,11)
    • /home/vsts/work/1/s/typescript-main/lib/lib.es2015.symbol.wellknown.d.ts(140,11)
    • /home/vsts/work/1/s/typescript-main/lib/lib.es2015.collection.d.ts(63,11)
    • /home/vsts/work/1/s/typescript-main/lib/lib.es2015.iterable.d.ts(162,11)
    • /home/vsts/work/1/s/typescript-main/lib/lib.es2015.symbol.wellknown.d.ts(140,11)
    • /home/vsts/work/1/s/typescript-main/lib/lib.es2015.collection.d.ts(63,11)
    • /home/vsts/work/1/s/typescript-main/lib/lib.es2015.iterable.d.ts(162,11)
    • /home/vsts/work/1/s/typescript-main/lib/lib.es2015.symbol.wellknown.d.ts(140,11)

@typescript-bot
Copy link
Collaborator

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

Here they are:

Compiler

Comparison Report - main..54713
Metric main 54713 Delta Best Worst p-value
Angular - node (v18.10.0, x64)
Memory used 366,176k (± 0.01%) 366,171k (± 0.01%) ~ 366,130k 366,227k p=0.810 n=6
Parse Time 3.41s (± 0.34%) 3.42s (± 0.76%) ~ 3.39s 3.45s p=1.000 n=6
Bind Time 1.11s (± 0.94%) 1.11s (± 0.88%) ~ 1.10s 1.12s p=0.673 n=6
Check Time 8.80s (± 0.37%) 8.79s (± 0.44%) ~ 8.74s 8.84s p=0.628 n=6
Emit Time 7.41s (± 0.46%) 7.43s (± 0.97%) ~ 7.38s 7.56s p=1.000 n=6
Total Time 20.73s (± 0.21%) 20.75s (± 0.44%) ~ 20.66s 20.89s p=1.000 n=6
Compiler-Unions - node (v18.10.0, x64)
Memory used 191,799k (± 1.18%) 191,787k (± 1.20%) ~ 190,819k 196,488k p=0.298 n=6
Parse Time 1.51s (± 0.50%) 1.51s (± 1.02%) ~ 1.50s 1.54s p=0.796 n=6
Bind Time 0.77s (± 0.97%) 0.77s (± 0.67%) ~ 0.76s 0.77s p=0.241 n=6
Check Time 9.51s (± 0.79%) 9.45s (± 0.97%) ~ 9.36s 9.62s p=0.127 n=6
Emit Time 2.76s (± 1.62%) 2.75s (± 0.61%) ~ 2.73s 2.77s p=0.870 n=6
Total Time 14.54s (± 0.59%) 14.48s (± 0.62%) ~ 14.40s 14.64s p=0.335 n=6
Monaco - node (v18.10.0, x64)
Memory used 346,613k (± 0.01%) 346,600k (± 0.01%) ~ 346,587k 346,640k p=0.378 n=6
Parse Time 2.58s (± 0.53%) 2.59s (± 1.31%) ~ 2.55s 2.63s p=0.935 n=6
Bind Time 1.00s (± 0.51%) 1.01s (± 0.63%) ~ 1.00s 1.02s p=0.091 n=6
Check Time 7.15s (± 0.32%) 7.15s (± 0.43%) ~ 7.10s 7.17s p=0.868 n=6
Emit Time 4.22s (± 0.24%) 4.25s (± 1.18%) ~ 4.20s 4.34s p=0.244 n=6
Total Time 14.95s (± 0.29%) 14.99s (± 0.49%) ~ 14.90s 15.07s p=0.377 n=6
TFS - node (v18.10.0, x64)
Memory used 300,653k (± 0.00%) 300,650k (± 0.00%) ~ 300,634k 300,668k p=0.936 n=6
Parse Time 2.06s (± 1.50%) 2.05s (± 0.99%) ~ 2.02s 2.08s p=1.000 n=6
Bind Time 1.13s (± 0.72%) 1.14s (± 0.66%) ~ 1.13s 1.15s p=0.206 n=6
Check Time 6.64s (± 0.43%) 6.65s (± 0.64%) ~ 6.59s 6.70s p=0.806 n=6
Emit Time 3.86s (± 0.61%) 3.86s (± 0.97%) ~ 3.81s 3.90s p=0.809 n=6
Total Time 13.69s (± 0.28%) 13.71s (± 0.62%) ~ 13.57s 13.80s p=0.748 n=6
material-ui - node (v18.10.0, x64)
Memory used 481,044k (± 0.00%) 481,032k (± 0.00%) ~ 480,997k 481,056k p=0.689 n=6
Parse Time 3.10s (± 0.17%) 3.10s (± 0.44%) ~ 3.08s 3.11s p=0.351 n=6
Bind Time 0.90s (± 0.57%) 0.91s (± 0.82%) ~ 0.90s 0.92s p=0.069 n=6
Check Time 16.85s (± 0.60%) 16.79s (± 0.70%) ~ 16.67s 16.98s p=0.470 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 20.86s (± 0.46%) 20.79s (± 0.56%) ~ 20.66s 20.98s p=0.423 n=6
xstate - node (v18.10.0, x64)
Memory used 563,199k (± 0.03%) 563,231k (± 0.03%) ~ 563,078k 563,510k p=0.810 n=6
Parse Time 3.83s (± 0.35%) 3.82s (± 0.79%) ~ 3.78s 3.86s p=0.625 n=6
Bind Time 1.61s (± 0.65%) 1.62s (± 0.75%) ~ 1.61s 1.64s p=0.282 n=6
Check Time 2.79s (± 0.64%) 2.79s (± 0.29%) ~ 2.78s 2.80s p=0.567 n=6
Emit Time 0.08s (± 0.00%) 0.08s (± 0.00%) ~ 0.08s 0.08s p=1.000 n=6
Total Time 8.32s (± 0.38%) 8.31s (± 0.36%) ~ 8.28s 8.35s p=0.572 n=6
Angular - node (v16.17.1, x64)
Memory used 365,533k (± 0.01%) 365,578k (± 0.01%) ~ 365,527k 365,646k p=0.298 n=6
Parse Time 3.56s (± 0.15%) 3.56s (± 0.63%) ~ 3.54s 3.59s p=0.934 n=6
Bind Time 1.18s (± 0.54%) 1.18s (± 0.54%) ~ 1.17s 1.19s p=1.000 n=6
Check Time 9.60s (± 0.56%) 9.58s (± 0.33%) ~ 9.53s 9.62s p=0.686 n=6
Emit Time 7.90s (± 0.52%) 7.88s (± 0.22%) ~ 7.87s 7.91s p=0.224 n=6
Total Time 22.24s (± 0.38%) 22.21s (± 0.16%) ~ 22.16s 22.25s p=0.518 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used 193,676k (± 0.92%) 193,112k (± 0.67%) ~ 192,532k 195,760k p=0.810 n=6
Parse Time 1.58s (± 1.35%) 1.60s (± 0.47%) ~ 1.59s 1.61s p=0.117 n=6
Bind Time 0.83s (± 0.62%) 0.83s (± 0.49%) ~ 0.82s 0.83s p=0.595 n=6
Check Time 10.15s (± 1.03%) 10.21s (± 0.52%) ~ 10.17s 10.31s p=0.228 n=6
Emit Time 3.00s (± 1.20%) 3.00s (± 0.58%) ~ 2.97s 3.02s p=1.000 n=6
Total Time 15.56s (± 0.62%) 15.64s (± 0.43%) ~ 15.58s 15.76s p=0.228 n=6
Monaco - node (v16.17.1, x64)
Memory used 345,863k (± 0.00%) 345,882k (± 0.00%) ~ 345,861k 345,898k p=0.066 n=6
Parse Time 2.73s (± 0.60%) 2.71s (± 0.23%) -0.02s (- 0.85%) 2.70s 2.72s p=0.020 n=6
Bind Time 1.08s (± 0.91%) 1.09s (± 0.75%) ~ 1.08s 1.10s p=0.282 n=6
Check Time 7.83s (± 0.51%) 7.84s (± 0.47%) ~ 7.81s 7.90s p=0.747 n=6
Emit Time 4.43s (± 0.47%) 4.44s (± 0.43%) ~ 4.42s 4.47s p=0.627 n=6
Total Time 16.08s (± 0.35%) 16.08s (± 0.22%) ~ 16.04s 16.14s p=1.000 n=6
TFS - node (v16.17.1, x64)
Memory used 300,002k (± 0.01%) 299,987k (± 0.01%) ~ 299,968k 300,013k p=0.297 n=6
Parse Time 2.17s (± 0.79%) 2.17s (± 0.92%) ~ 2.16s 2.21s p=0.676 n=6
Bind Time 1.23s (± 1.11%) 1.23s (± 0.42%) ~ 1.23s 1.24s p=0.796 n=6
Check Time 7.31s (± 0.35%) 7.30s (± 0.37%) ~ 7.26s 7.33s p=0.687 n=6
Emit Time 4.37s (± 1.06%) 4.33s (± 0.65%) ~ 4.30s 4.37s p=0.170 n=6
Total Time 15.07s (± 0.41%) 15.04s (± 0.27%) ~ 14.99s 15.09s p=0.294 n=6
material-ui - node (v16.17.1, x64)
Memory used 480,336k (± 0.01%) 480,319k (± 0.01%) ~ 480,278k 480,393k p=0.574 n=6
Parse Time 3.26s (± 0.51%) 3.25s (± 0.27%) ~ 3.24s 3.26s p=0.273 n=6
Bind Time 0.94s (± 0.43%) 0.94s (± 0.00%) ~ 0.94s 0.94s p=0.405 n=6
Check Time 17.86s (± 0.52%) 17.91s (± 1.20%) ~ 17.75s 18.31s p=0.575 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 22.06s (± 0.43%) 22.10s (± 0.95%) ~ 21.95s 22.50s p=0.630 n=6
xstate - node (v16.17.1, x64)
Memory used 560,637k (± 0.03%) 560,553k (± 0.01%) ~ 560,514k 560,594k p=0.936 n=6
Parse Time 3.99s (± 0.41%) 3.99s (± 0.26%) ~ 3.97s 4.00s p=0.462 n=6
Bind Time 1.75s (± 0.48%) 1.76s (± 0.47%) ~ 1.76s 1.78s p=0.062 n=6
Check Time 3.06s (± 0.41%) 3.05s (± 0.25%) ~ 3.04s 3.06s p=0.328 n=6
Emit Time 0.09s (± 0.00%) 0.09s (± 0.00%) ~ 0.09s 0.09s p=1.000 n=6
Total Time 8.90s (± 0.35%) 8.89s (± 0.12%) ~ 8.88s 8.91s p=0.935 n=6
Angular - node (v14.21.3, x64)
Memory used 359,562k (± 0.01%) 359,549k (± 0.01%) ~ 359,495k 359,596k p=0.748 n=6
Parse Time 3.67s (± 0.76%) 3.66s (± 0.65%) ~ 3.63s 3.69s p=0.687 n=6
Bind Time 1.22s (± 0.67%) 1.21s (± 0.69%) ~ 1.20s 1.22s p=1.000 n=6
Check Time 10.06s (± 0.36%) 10.07s (± 0.17%) ~ 10.05s 10.09s p=0.373 n=6
Emit Time 8.33s (± 1.01%) 8.31s (± 0.36%) ~ 8.26s 8.35s p=0.630 n=6
Total Time 23.27s (± 0.51%) 23.26s (± 0.10%) ~ 23.23s 23.29s p=0.936 n=6
Compiler-Unions - node (v14.21.3, x64)
Memory used 188,480k (± 0.69%) 187,926k (± 0.02%) ~ 187,866k 187,960k p=0.173 n=6
Parse Time 1.61s (± 0.32%) 1.61s (± 0.39%) ~ 1.60s 1.62s p=0.386 n=6
Bind Time 0.84s (± 0.61%) 0.84s (± 0.65%) ~ 0.84s 0.85s p=0.640 n=6
Check Time 10.31s (± 0.49%) 10.35s (± 0.28%) ~ 10.32s 10.39s p=0.228 n=6
Emit Time 3.14s (± 1.50%) 3.13s (± 0.63%) ~ 3.11s 3.15s p=0.686 n=6
Total Time 15.91s (± 0.49%) 15.93s (± 0.23%) ~ 15.89s 15.99s p=1.000 n=6
Monaco - node (v14.21.3, x64)
Memory used 341,056k (± 0.00%) 341,044k (± 0.00%) ~ 341,030k 341,060k p=0.127 n=6
Parse Time 2.80s (± 0.57%) 2.80s (± 0.76%) ~ 2.77s 2.83s p=0.869 n=6
Bind Time 1.11s (± 0.80%) 1.11s (± 0.88%) ~ 1.10s 1.12s p=0.798 n=6
Check Time 8.23s (± 0.56%) 8.23s (± 0.21%) ~ 8.21s 8.25s p=0.371 n=6
Emit Time 4.69s (± 0.55%) 4.67s (± 0.56%) ~ 4.65s 4.72s p=0.256 n=6
Total Time 16.82s (± 0.45%) 16.81s (± 0.21%) ~ 16.78s 16.86s p=1.000 n=6
TFS - node (v14.21.3, x64)
Memory used 295,151k (± 0.00%) 295,152k (± 0.00%) ~ 295,144k 295,159k p=0.936 n=6
Parse Time 2.39s (± 0.61%) 2.40s (± 0.43%) ~ 2.38s 2.41s p=0.616 n=6
Bind Time 1.07s (± 1.50%) 1.07s (± 0.51%) ~ 1.06s 1.07s p=0.855 n=6
Check Time 7.63s (± 0.36%) 7.62s (± 0.76%) ~ 7.55s 7.69s p=0.573 n=6
Emit Time 4.33s (± 0.60%) 4.33s (± 0.45%) ~ 4.29s 4.34s p=0.935 n=6
Total Time 15.43s (± 0.14%) 15.41s (± 0.29%) ~ 15.37s 15.47s p=0.335 n=6
material-ui - node (v14.21.3, x64)
Memory used 475,882k (± 0.01%) 475,883k (± 0.01%) ~ 475,840k 475,934k p=1.000 n=6
Parse Time 3.32s (± 0.80%) 3.32s (± 0.50%) ~ 3.30s 3.35s p=1.000 n=6
Bind Time 1.00s (± 0.75%) 1.00s (± 0.82%) ~ 0.99s 1.01s p=0.306 n=6
Check Time 18.85s (± 0.77%) 18.81s (± 0.62%) ~ 18.66s 18.97s p=0.873 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 23.17s (± 0.69%) 23.13s (± 0.54%) ~ 22.98s 23.29s p=0.810 n=6
xstate - node (v14.21.3, x64)
Memory used 549,643k (± 0.00%) 549,638k (± 0.00%) ~ 549,619k 549,665k p=0.810 n=6
Parse Time 4.22s (± 0.30%) 4.22s (± 0.36%) ~ 4.19s 4.23s p=0.677 n=6
Bind Time 1.67s (± 0.31%) 1.67s (± 0.63%) ~ 1.65s 1.68s p=0.794 n=6
Check Time 3.16s (± 0.55%) 3.14s (± 0.69%) ~ 3.11s 3.17s p=0.076 n=6
Emit Time 0.09s (± 0.00%) 0.09s (± 0.00%) ~ 0.09s 0.09s p=1.000 n=6
Total Time 9.13s (± 0.27%) 9.10s (± 0.13%) -0.03s (- 0.35%) 9.09s 9.12s p=0.015 n=6
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-148-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.21.3, x64)
Scenarios
  • Angular - node (v18.10.0, x64)
  • Angular - node (v16.17.1, x64)
  • Angular - node (v14.21.3, x64)
  • Compiler-Unions - node (v18.10.0, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Compiler-Unions - node (v14.21.3, x64)
  • Monaco - node (v18.10.0, x64)
  • Monaco - node (v16.17.1, x64)
  • Monaco - node (v14.21.3, x64)
  • TFS - node (v18.10.0, x64)
  • TFS - node (v16.17.1, x64)
  • TFS - node (v14.21.3, x64)
  • material-ui - node (v18.10.0, x64)
  • material-ui - node (v16.17.1, x64)
  • material-ui - node (v14.21.3, x64)
  • xstate - node (v18.10.0, x64)
  • xstate - node (v16.17.1, x64)
  • xstate - node (v14.21.3, x64)
Benchmark Name Iterations
Current 54713 6
Baseline main 6

TSServer

Comparison Report - main..54713
Metric main 54713 Delta Best Worst p-value
Compiler-UnionsTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,543ms (± 0.70%) 2,544ms (± 0.51%) ~ 2,533ms 2,569ms p=0.873 n=6
Req 2 - geterr 5,539ms (± 0.40%) 5,539ms (± 0.44%) ~ 5,506ms 5,567ms p=0.810 n=6
Req 3 - references 338ms (± 1.17%) 337ms (± 0.63%) ~ 335ms 341ms p=1.000 n=6
Req 4 - navto 287ms (± 0.48%) 287ms (± 1.31%) ~ 283ms 294ms p=0.803 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 85ms (± 0.96%) 85ms (± 0.65%) ~ 84ms 85ms p=0.859 n=6
CompilerTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,639ms (± 0.92%) 2,649ms (± 0.52%) ~ 2,634ms 2,673ms p=0.873 n=6
Req 2 - geterr 4,283ms (± 0.32%) 4,289ms (± 0.70%) ~ 4,248ms 4,325ms p=0.575 n=6
Req 3 - references 349ms (± 0.49%) 348ms (± 0.65%) ~ 344ms 350ms p=0.415 n=6
Req 4 - navto 286ms (± 1.05%) 287ms (± 0.36%) ~ 286ms 289ms p=0.164 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 64ms (± 4.17%) 67ms (± 5.25%) ~ 62ms 70ms p=0.155 n=6
xstateTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 3,086ms (± 0.33%) 3,086ms (± 0.53%) ~ 3,068ms 3,117ms p=0.688 n=6
Req 2 - geterr 1,550ms (± 0.81%) 1,560ms (± 0.74%) ~ 1,542ms 1,573ms p=0.173 n=6
Req 3 - references 112ms (± 1.87%) 113ms (± 0.93%) ~ 111ms 114ms p=0.285 n=6
Req 4 - navto 358ms (± 0.41%) 357ms (± 0.33%) ~ 355ms 358ms p=0.250 n=6
Req 5 - completionInfo count 2,864 (± 0.00%) 2,864 (± 0.00%) ~ 2,864 2,864 p=1.000 n=6
Req 5 - completionInfo 369ms (± 2.18%) 375ms (± 2.66%) ~ 362ms 386ms p=0.419 n=6
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,647ms (± 0.33%) 2,656ms (± 0.57%) ~ 2,636ms 2,676ms p=0.298 n=6
Req 2 - geterr 5,994ms (± 0.46%) 5,999ms (± 0.22%) ~ 5,980ms 6,016ms p=0.936 n=6
Req 3 - references 353ms (± 0.64%) 352ms (± 0.65%) ~ 350ms 356ms p=0.572 n=6
Req 4 - navto 288ms (± 2.06%) 287ms (± 0.87%) ~ 283ms 289ms p=0.809 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 91ms (± 2.13%) 92ms (± 1.50%) ~ 89ms 93ms p=0.491 n=6
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,827ms (± 0.63%) 2,831ms (± 0.54%) ~ 2,802ms 2,846ms p=0.575 n=6
Req 2 - geterr 4,656ms (± 0.37%) 4,657ms (± 0.34%) ~ 4,640ms 4,680ms p=1.000 n=6
Req 3 - references 363ms (± 0.53%) 364ms (± 0.30%) ~ 363ms 366ms p=0.452 n=6
Req 4 - navto 283ms (± 0.70%) 284ms (± 0.37%) ~ 282ms 285ms p=0.358 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 67ms (± 0.94%) 68ms (± 0.81%) ~ 67ms 68ms p=0.201 n=6
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 3,220ms (± 0.56%) 3,219ms (± 0.61%) ~ 3,196ms 3,240ms p=0.810 n=6
Req 2 - geterr 1,728ms (± 0.96%) 1,718ms (± 0.32%) ~ 1,710ms 1,726ms p=0.298 n=6
Req 3 - references 126ms (± 7.00%) 126ms (± 6.15%) ~ 119ms 141ms p=0.933 n=6
Req 4 - navto 343ms (± 1.26%) 344ms (± 1.24%) ~ 339ms 351ms p=0.567 n=6
Req 5 - completionInfo count 2,864 (± 0.00%) 2,864 (± 0.00%) ~ 2,864 2,864 p=1.000 n=6
Req 5 - completionInfo 409ms (± 1.40%) 410ms (± 1.22%) ~ 403ms 416ms p=0.809 n=6
Compiler-UnionsTSServer - node (v14.21.3, x64)
Req 1 - updateOpen 2,776ms (± 0.25%) 2,777ms (± 0.86%) ~ 2,742ms 2,809ms p=0.936 n=6
Req 2 - geterr 6,174ms (± 0.33%) 6,185ms (± 0.74%) ~ 6,142ms 6,259ms p=1.000 n=6
Req 3 - references 364ms (± 0.38%) 365ms (± 0.67%) ~ 362ms 369ms p=0.459 n=6
Req 4 - navto 288ms (± 0.36%) 290ms (± 1.49%) ~ 286ms 298ms p=1.000 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 102ms (± 2.77%) 101ms (± 3.78%) ~ 94ms 104ms p=1.000 n=6
CompilerTSServer - node (v14.21.3, x64)
Req 1 - updateOpen 2,971ms (± 0.44%) 2,966ms (± 0.36%) ~ 2,947ms 2,977ms p=0.810 n=6
Req 2 - geterr 4,542ms (± 0.65%) 4,551ms (± 0.41%) ~ 4,514ms 4,565ms p=0.872 n=6
Req 3 - references 373ms (± 0.89%) 370ms (± 0.50%) ~ 368ms 373ms p=0.084 n=6
Req 4 - navto 297ms (± 0.41%) 298ms (± 0.30%) ~ 297ms 299ms p=0.362 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 78ms (± 2.91%) 76ms (± 0.68%) ~ 76ms 77ms p=0.247 n=6
xstateTSServer - node (v14.21.3, x64)
Req 1 - updateOpen 3,470ms (± 0.59%) 3,458ms (± 1.12%) ~ 3,382ms 3,489ms p=0.936 n=6
Req 2 - geterr 1,839ms (± 0.51%) 1,840ms (± 0.38%) ~ 1,828ms 1,847ms p=0.689 n=6
Req 3 - references 152ms (± 7.11%) 149ms (± 7.13%) ~ 138ms 161ms p=0.748 n=6
Req 4 - navto 406ms (± 1.62%) 409ms (± 1.96%) ~ 400ms 419ms p=0.575 n=6
Req 5 - completionInfo count 2,864 (± 0.00%) 2,864 (± 0.00%) ~ 2,864 2,864 p=1.000 n=6
Req 5 - completionInfo 439ms (± 1.26%) 434ms (± 1.88%) ~ 418ms 442ms p=0.375 n=6
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-148-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.21.3, x64)
Scenarios
  • Compiler-UnionsTSServer - node (v18.10.0, x64)
  • Compiler-UnionsTSServer - node (v16.17.1, x64)
  • Compiler-UnionsTSServer - node (v14.21.3, x64)
  • CompilerTSServer - node (v18.10.0, x64)
  • CompilerTSServer - node (v16.17.1, x64)
  • CompilerTSServer - node (v14.21.3, x64)
  • xstateTSServer - node (v18.10.0, x64)
  • xstateTSServer - node (v16.17.1, x64)
  • xstateTSServer - node (v14.21.3, x64)
Benchmark Name Iterations
Current 54713 6
Baseline main 6

Startup

Comparison Report - main..54713
Metric main 54713 Delta Best Worst p-value
tsc-startup - node (v16.17.1, x64)
Execution time 141.34ms (± 0.18%) 141.15ms (± 0.15%) -0.18ms (- 0.13%) 140.39ms 143.20ms p=0.000 n=600
tsserver-startup - node (v16.17.1, x64)
Execution time 220.31ms (± 0.19%) 220.04ms (± 0.20%) -0.27ms (- 0.12%) 219.06ms 227.07ms p=0.000 n=600
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time 221.79ms (± 0.17%) 221.49ms (± 0.17%) -0.29ms (- 0.13%) 220.66ms 230.69ms p=0.000 n=600
typescript-startup - node (v16.17.1, x64)
Execution time 203.61ms (± 0.17%) 203.39ms (± 0.16%) -0.22ms (- 0.11%) 202.65ms 208.29ms p=0.000 n=600
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-148-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v16.17.1, x64)
Scenarios
  • tsc-startup - node (v16.17.1, x64)
  • tsserver-startup - node (v16.17.1, x64)
  • tsserverlibrary-startup - node (v16.17.1, x64)
  • typescript-startup - node (v16.17.1, x64)
Benchmark Name Iterations
Current 54713 6
Baseline main 6

Developer Information:

Download Benchmark

@typescript-bot
Copy link
Collaborator

@gabritto Here are the results of running the top-repos suite comparing main and refs/pull/54713/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

Hey @gabritto, the results of running the DT tests are ready.
There were interesting changes:

Main only errors:

Package: qrcode
Error:

Error: /home/vsts/work/1/s/DefinitelyTyped-tools/packages/dtslint-runner/DefinitelyTyped/types/qrcode/test/qrcode-tests.ts:51:1
ERROR: 51:1  expect  TypeScript@local compile error: 
Unused '@ts-expect-error' directive.
ERROR: 54:1  expect  TypeScript@local compile error: 
Unused '@ts-expect-error' directive.
ERROR: 59:1  expect  TypeScript@local compile error: 
Unused '@ts-expect-error' directive.
ERROR: 62:1  expect  TypeScript@local compile error: 
Unused '@ts-expect-error' directive.

    at testTypesVersion (/home/vsts/work/1/s/DefinitelyTyped-tools/packages/dtslint-runner/node_modules/@definitelytyped/dtslint/dist/index.js:194:15)
    at async runTests (/home/vsts/work/1/s/DefinitelyTyped-tools/packages/dtslint-runner/node_modules/@definitelytyped/dtslint/dist/index.js:151:9)

You can check the log here.

Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

Looks good although I'd recommend moving the new function next to the existing one.

@@ -22721,6 +22718,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}
const filtered = contains(include, Ternary.False) ? getUnionType(types.filter((_, i) => include[i])) : target;
return filtered.flags & TypeFlags.Never ? target : filtered;

function getTypeOfPropertyOrIndexSignatureOfType(type: Type, name: __String): Type | undefined {
Copy link
Member

Choose a reason for hiding this comment

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

It might be less confusing to have this next to getTypeOfPropertyOrIndexSignatureOfType.
Well, initially more confusing for the reader, because they'll have to ask "Why are there two here?". But they'll be aware that there are two nearly identical things that need to be used in different situations.

@gabritto gabritto merged commit f647b11 into main Jun 20, 2023
@gabritto gabritto deleted the gabritto/fix54596 branch June 20, 2023 20:47
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
None yet
Development

Successfully merging this pull request may close these issues.

3 participants