TypeScript icon indicating copy to clipboard operation
TypeScript copied to clipboard

Use `missingType` in `--noUncheckedIndexedAccess` mode

Open ahejlsberg opened this issue 2 years ago • 11 comments

This implements what I discuss here. I borrwed tests from that PR. Thanks @Andarist.

Fixes #43614.

ahejlsberg avatar Nov 27 '22 15:11 ahejlsberg

@typescript-bot test this @typescript-bot user test this inline @typescript-bot run dt @typescript-bot perf test faster @typescript-bot test top100

ahejlsberg avatar Nov 27 '22 15:11 ahejlsberg

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

Update: The results are in!

typescript-bot avatar Nov 27 '22 15:11 typescript-bot

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

Update: The results are in!

typescript-bot avatar Nov 27 '22 15:11 typescript-bot

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

typescript-bot avatar Nov 27 '22 15:11 typescript-bot

Heya @ahejlsberg, I've started to run the abridged perf test suite on this PR at 61104d0fd6a37c3af1a763fa8867ae5ca9dfb9c1. You can monitor the build here.

Update: The results are in!

typescript-bot avatar Nov 27 '22 15:11 typescript-bot

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

typescript-bot avatar Nov 27 '22 15:11 typescript-bot

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

Everything looks good!

typescript-bot avatar Nov 27 '22 15:11 typescript-bot

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

Here they are:

Comparison Report - main..51653

Metric main 51653 Delta Best Worst
Angular - node (v16.17.1, x64)
Memory used 340,642k (± 0.01%) 340,607k (± 0.02%) -35k (- 0.01%) 340,403k 340,686k
Parse Time 1.90s (± 0.62%) 1.89s (± 0.73%) -0.02s (- 0.84%) 1.85s 1.92s
Bind Time 0.65s (± 0.51%) 0.65s (± 0.86%) -0.00s (- 0.31%) 0.63s 0.66s
Check Time 5.18s (± 0.51%) 5.17s (± 0.35%) -0.01s (- 0.10%) 5.13s 5.20s
Emit Time 5.13s (± 1.03%) 5.10s (± 0.84%) -0.03s (- 0.60%) 5.00s 5.20s
Total Time 12.87s (± 0.61%) 12.81s (± 0.40%) -0.06s (- 0.44%) 12.69s 12.93s
Compiler-Unions - node (v16.17.1, x64)
Memory used 187,674k (± 0.59%) 187,348k (± 0.51%) -326k (- 0.17%) 186,605k 189,975k
Parse Time 0.79s (± 0.42%) 0.79s (± 0.75%) +0.00s (+ 0.51%) 0.78s 0.81s
Bind Time 0.42s (± 0.53%) 0.42s (± 0.53%) -0.00s (- 0.48%) 0.41s 0.42s
Check Time 6.10s (± 0.89%) 6.10s (± 0.53%) -0.01s (- 0.10%) 6.03s 6.17s
Emit Time 1.94s (± 0.49%) 1.94s (± 0.71%) -0.00s (- 0.05%) 1.90s 1.97s
Total Time 9.25s (± 0.63%) 9.25s (± 0.38%) -0.00s (- 0.02%) 9.17s 9.31s
Monaco - node (v16.17.1, x64)
Memory used 319,814k (± 0.01%) 319,791k (± 0.01%) -23k (- 0.01%) 319,741k 319,867k
Parse Time 1.43s (± 0.35%) 1.42s (± 0.69%) -0.00s (- 0.28%) 1.40s 1.44s
Bind Time 0.59s (± 0.84%) 0.59s (± 0.75%) -0.00s (- 0.50%) 0.58s 0.60s
Check Time 4.90s (± 0.42%) 4.88s (± 0.31%) -0.03s (- 0.53%) 4.84s 4.92s
Emit Time 2.74s (± 0.66%) 2.73s (± 0.59%) -0.01s (- 0.29%) 2.69s 2.77s
Total Time 9.67s (± 0.36%) 9.62s (± 0.25%) -0.04s (- 0.43%) 9.58s 9.68s
TFS - node (v16.17.1, x64)
Memory used 282,278k (± 0.01%) 282,282k (± 0.01%) +5k (+ 0.00%) 282,226k 282,338k
Parse Time 1.17s (± 1.06%) 1.16s (± 1.01%) -0.01s (- 1.02%) 1.14s 1.19s
Bind Time 0.66s (± 3.65%) 0.66s (± 2.84%) +0.00s (+ 0.76%) 0.61s 0.69s
Check Time 4.75s (± 0.51%) 4.76s (± 0.38%) +0.01s (+ 0.27%) 4.70s 4.78s
Emit Time 2.73s (± 2.00%) 2.79s (± 1.99%) +0.07s (+ 2.50%) 2.67s 2.89s
Total Time 9.30s (± 0.88%) 9.38s (± 0.58%) +0.08s (+ 0.81%) 9.26s 9.50s
material-ui - node (v16.17.1, x64)
Memory used 435,275k (± 0.00%) 435,266k (± 0.00%) -9k (- 0.00%) 435,235k 435,297k
Parse Time 1.65s (± 0.41%) 1.65s (± 0.61%) -0.00s (- 0.06%) 1.61s 1.66s
Bind Time 0.50s (± 1.18%) 0.51s (± 0.74%) +0.00s (+ 0.20%) 0.50s 0.51s
Check Time 11.93s (± 0.97%) 11.89s (± 0.74%) -0.04s (- 0.29%) 11.67s 12.04s
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) 0.00s ( NaN%) 0.00s 0.00s
Total Time 14.08s (± 0.86%) 14.05s (± 0.67%) -0.03s (- 0.23%) 13.83s 14.21s
xstate - node (v16.17.1, x64)
Memory used 515,987k (± 0.01%) 516,086k (± 0.01%) +99k (+ 0.02%) 515,963k 516,236k
Parse Time 2.31s (± 0.53%) 2.31s (± 0.44%) -0.00s (- 0.22%) 2.29s 2.34s
Bind Time 0.83s (± 1.07%) 0.83s (± 1.06%) -0.00s (- 0.48%) 0.82s 0.86s
Check Time 1.37s (± 0.35%) 1.36s (± 0.69%) -0.01s (- 0.51%) 1.34s 1.38s
Emit Time 0.06s (± 0.00%) 0.06s (± 0.00%) 0.00s ( 0.00%) 0.06s 0.06s
Total Time 4.58s (± 0.35%) 4.56s (± 0.42%) -0.01s (- 0.33%) 4.52s 4.62s
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-131-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
  • Angular - node (v16.17.1, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Monaco - node (v16.17.1, x64)
  • TFS - node (v16.17.1, x64)
  • material-ui - node (v16.17.1, x64)
  • xstate - node (v16.17.1, x64)
Benchmark Name Iterations
Current 51653 10
Baseline main 10
Developer Information:

Download Benchmark

typescript-bot avatar Nov 27 '22 15:11 typescript-bot

Heya @ahejlsberg, I've run the RWC suite on this PR - assuming you're on the TS core team, you can view the resulting diff here.

typescript-bot avatar Nov 27 '22 15:11 typescript-bot

I love it when „in the next day or two” means „in the next half an hour” 😉

Andarist avatar Nov 27 '22 16:11 Andarist

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

Everything looks good!

typescript-bot avatar Nov 27 '22 17:11 typescript-bot