Skip to content
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

Narrow generic conditional and indexed access return types when checking return statements #56941

Draft
wants to merge 92 commits into
base: main
Choose a base branch
from

Conversation

gabritto
Copy link
Member

@gabritto gabritto commented Jan 3, 2024

Fixes #33912.
Fixes #33014.

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

gabritto commented Jan 3, 2024

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 3, 2024

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

Update: The results are in!

@typescript-bot

This comment was marked as outdated.

@gabritto
Copy link
Member Author

gabritto commented Jan 3, 2024

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 3, 2024

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 7, 2024

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
pack this ✅ Started ✅ Results

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 7, 2024

Hey @gabritto, 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/163836/artifacts?artifactName=tgz&fileId=FCAF4D861595C4CFC28691516AC6B69F642BE546875C2ED181BAFB43ABAF547E02&fileName=/typescript-5.7.0-insiders.20241007.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@5.7.0-pr-56941-53".;

@gabritto
Copy link
Member Author

gabritto commented Oct 7, 2024

Hey @gabritto, 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/163836/artifacts?artifactName=tgz&fileId=FCAF4D861595C4CFC28691516AC6B69F642BE546875C2ED181BAFB43ABAF547E02&fileName=/typescript-5.7.0-insiders.20241007.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@5.7.0-pr-56941-53".;

@Andarist the playground, as requested

@gabritto
Copy link
Member Author

gabritto commented Oct 8, 2024

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 8, 2024

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
test top400 ✅ Started 👀 Results
user test this ✅ Started 👀 Results
run dt ✅ Started ✅ Results
perf test this faster ✅ Started 👀 Results

@typescript-bot
Copy link
Collaborator

@gabritto Here are the results of running the user tests with tsc comparing main and refs/pull/56941/merge:

Something interesting changed - please have a look.

Details

adonis-framework

/mnt/ts_downloads/_/m/adonis-framework/tsconfig.json

  • [NEW] error TS2322: Type 'null' is not assignable to type 'string'.
    • /mnt/ts_downloads/_/m/adonis-framework/node_modules/adonis-framework/src/Request/index.js(600,75)

effect

tsconfig.json

tsconfig.build.json

tsconfig.base.json

puppeteer

packages/puppeteer-core/tsconfig.json

webpack

tsconfig.types.json

@typescript-bot
Copy link
Collaborator

Hey @gabritto, the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot
Copy link
Collaborator

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

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - node (v18.15.0, x64)
Errors 31 34 🔻+3 (+ 9.68%) ~ ~ p=0.001 n=6
Symbols 62,340 62,337 -3 (- 0.00%) ~ ~ p=0.001 n=6
Types 50,379 50,270 -109 (- 0.22%) ~ ~ p=0.001 n=6
Memory used 193,461k (± 0.76%) 192,895k (± 0.02%) ~ 192,854k 192,950k p=0.378 n=6
Parse Time 1.31s (± 0.80%) 1.30s (± 0.80%) ~ 1.29s 1.32s p=1.000 n=6
Bind Time 0.72s 0.72s ~ ~ ~ p=1.000 n=6
Check Time 9.72s (± 0.37%) 9.81s (± 0.46%) +0.09s (+ 0.89%) 9.75s 9.87s p=0.013 n=6
Emit Time 2.72s (± 0.60%) 2.73s (± 0.64%) ~ 2.70s 2.74s p=1.000 n=6
Total Time 14.48s (± 0.31%) 14.56s (± 0.29%) +0.09s (+ 0.61%) 14.51s 14.62s p=0.025 n=6
angular-1 - node (v18.15.0, x64)
Errors 33 37 🔻+4 (+12.12%) ~ ~ p=0.001 n=6
Symbols 947,886 947,433 -453 (- 0.05%) ~ ~ p=0.001 n=6
Types 410,840 410,174 -666 (- 0.16%) ~ ~ p=0.001 n=6
Memory used 1,224,591k (± 0.00%) 1,224,575k (± 0.00%) ~ 1,224,544k 1,224,618k p=0.521 n=6
Parse Time 6.66s (± 0.86%) 6.68s (± 0.43%) ~ 6.63s 6.71s p=0.469 n=6
Bind Time 1.88s (± 0.34%) 1.88s (± 0.29%) ~ 1.88s 1.89s p=0.201 n=6
Check Time 31.81s (± 0.54%) 31.92s (± 0.24%) ~ 31.83s 32.02s p=0.066 n=6
Emit Time 15.16s (± 0.21%) 15.25s (± 0.33%) +0.09s (+ 0.59%) 15.20s 15.32s p=0.013 n=6
Total Time 55.52s (± 0.29%) 55.73s (± 0.15%) +0.22s (+ 0.39%) 55.61s 55.87s p=0.045 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,529,678 2,483,577 -46,101 (- 1.82%) ~ ~ p=0.001 n=6
Types 916,161 914,328 -1,833 (- 0.20%) ~ ~ p=0.001 n=6
Memory used 2,340,972k (± 0.00%) 2,331,581k (± 0.00%) -9,390k (- 0.40%) 2,331,504k 2,331,653k p=0.005 n=6
Parse Time 9.35s (± 0.19%) 9.40s (± 0.19%) +0.04s (+ 0.46%) 9.37s 9.41s p=0.010 n=6
Bind Time 2.16s (± 0.38%) 2.17s (± 0.63%) ~ 2.14s 2.18s p=0.325 n=6
Check Time 75.79s (± 0.50%) 75.79s (± 0.58%) ~ 75.38s 76.49s p=0.936 n=6
Emit Time 0.28s (± 1.99%) 0.28s (± 2.88%) ~ 0.27s 0.29s p=0.088 n=6
Total Time 87.59s (± 0.45%) 87.64s (± 0.50%) ~ 87.25s 88.35s p=0.936 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,258,109 1,257,801 -308 (- 0.02%) ~ ~ p=0.001 n=6
Types 266,266 264,052 -2,214 (- 0.83%) ~ ~ p=0.001 n=6
Memory used 2,422,541k (± 0.02%) 2,423,612k (± 0.02%) +1,071k (+ 0.04%) 2,422,901k 2,424,298k p=0.013 n=6
Parse Time 5.20s (± 0.59%) 5.22s (± 0.83%) ~ 5.17s 5.28s p=0.575 n=6
Bind Time 1.93s (± 0.28%) 1.93s (± 0.54%) ~ 1.91s 1.94s p=0.663 n=6
Check Time 35.59s (± 0.46%) 35.67s (± 0.37%) ~ 35.56s 35.87s p=0.229 n=6
Emit Time 3.03s (± 1.73%) 3.03s (± 1.17%) ~ 2.99s 3.09s p=0.936 n=6
Total Time 45.76s (± 0.36%) 45.85s (± 0.40%) ~ 45.71s 46.09s p=0.378 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,258,109 1,257,801 -308 (- 0.02%) ~ ~ p=0.001 n=6
Types 266,266 264,052 -2,214 (- 0.83%) ~ ~ p=0.001 n=6
Memory used 2,619,353k (±11.20%) 2,673,490k (±10.40%) +54,136k (+ 2.07%) 2,500,195k 3,219,793k p=0.045 n=6
Parse Time 6.66s (± 2.32%) 6.61s (± 2.52%) ~ 6.48s 6.93s p=0.336 n=6
Bind Time 2.16s (± 1.13%) 2.17s (± 2.14%) ~ 2.08s 2.22s p=0.520 n=6
Check Time 43.10s (± 0.45%) 43.29s (± 0.47%) ~ 42.96s 43.44s p=0.173 n=6
Emit Time 3.50s (± 1.30%) 3.51s (± 1.48%) ~ 3.44s 3.60s p=0.470 n=6
Total Time 55.41s (± 0.47%) 55.59s (± 0.48%) ~ 55.23s 56.00s p=0.378 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 261,786 262,003 +217 (+ 0.08%) ~ ~ p=0.001 n=6
Types 106,508 105,961 -547 (- 0.51%) ~ ~ p=0.001 n=6
Memory used 438,794k (± 0.03%) 439,261k (± 0.01%) +467k (+ 0.11%) 439,161k 439,331k p=0.005 n=6
Parse Time 3.55s (± 0.58%) 3.56s (± 0.49%) ~ 3.53s 3.57s p=0.626 n=6
Bind Time 1.31s (± 1.04%) 1.32s (± 1.34%) ~ 1.28s 1.33s p=0.198 n=6
Check Time 18.93s (± 0.52%) 19.04s (± 0.80%) ~ 18.82s 19.28s p=0.198 n=6
Emit Time 1.53s (± 1.27%) 1.54s (± 0.96%) ~ 1.52s 1.56s p=0.618 n=6
Total Time 25.32s (± 0.48%) 25.45s (± 0.61%) ~ 25.24s 25.71s p=0.173 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 68 70 +2 (+ 2.94%) ~ ~ p=0.001 n=6
Symbols 225,919 225,824 -95 (- 0.04%) ~ ~ p=0.001 n=6
Types 94,415 93,856 -559 (- 0.59%) ~ ~ p=0.001 n=6
Memory used 371,086k (± 0.01%) 371,247k (± 0.02%) +160k (+ 0.04%) 371,195k 371,430k p=0.005 n=6
Parse Time 2.90s (± 1.24%) 2.89s (± 1.76%) ~ 2.84s 2.95s p=0.935 n=6
Bind Time 1.58s (± 0.65%) 1.59s (± 1.15%) ~ 1.57s 1.62s p=0.503 n=6
Check Time 16.36s (± 0.20%) 16.50s (± 0.31%) +0.14s (+ 0.89%) 16.44s 16.59s p=0.005 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 20.84s (± 0.26%) 20.99s (± 0.23%) +0.15s (+ 0.71%) 20.93s 21.03s p=0.005 n=6
vscode - node (v18.15.0, x64)
Errors 3 10 🔻+7 (+233.33%) ~ ~ p=0.001 n=6
Symbols 3,113,197 3,110,044 -3,153 (- 0.10%) ~ ~ p=0.001 n=6
Types 1,073,140 1,070,441 -2,699 (- 0.25%) ~ ~ p=0.001 n=6
Memory used 3,206,565k (± 0.01%) 3,209,828k (± 0.00%) +3,263k (+ 0.10%) 3,209,673k 3,209,942k p=0.005 n=6
Parse Time 13.95s (± 0.34%) 14.01s (± 0.27%) +0.06s (+ 0.43%) 13.97s 14.07s p=0.043 n=6
Bind Time 4.37s (± 0.45%) 4.43s (± 2.05%) ~ 4.38s 4.61s p=0.067 n=6
Check Time 85.45s (± 1.77%) 86.04s (± 1.98%) ~ 84.36s 87.94s p=0.423 n=6
Emit Time 24.71s (± 9.50%) 23.97s (± 9.40%) ~ 22.31s 26.96s p=0.575 n=6
Total Time 128.49s (± 2.76%) 128.45s (± 2.75%) ~ 125.07s 133.10s p=0.810 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 285,172 284,951 -221 (- 0.08%) ~ ~ p=0.001 n=6
Types 115,780 115,641 -139 (- 0.12%) ~ ~ p=0.001 n=6
Memory used 434,990k (± 0.01%) 435,083k (± 0.03%) ~ 434,882k 435,284k p=0.230 n=6
Parse Time 5.03s (± 0.87%) 4.98s (± 1.15%) ~ 4.90s 5.04s p=0.258 n=6
Bind Time 2.15s (± 1.84%) 2.18s (± 0.81%) ~ 2.15s 2.20s p=0.291 n=6
Check Time 22.68s (± 0.44%) 22.74s (± 0.54%) ~ 22.61s 22.96s p=0.377 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 29.86s (± 0.40%) 29.90s (± 0.55%) ~ 29.68s 30.15s p=0.630 n=6
xstate-main - node (v18.15.0, x64)
Errors 3 4 🔻+1 (+33.33%) ~ ~ p=0.001 n=6
Symbols 540,222 539,846 -376 (- 0.07%) ~ ~ p=0.001 n=6
Types 181,145 180,882 -263 (- 0.15%) ~ ~ p=0.001 n=6
Memory used 483,836k (± 0.01%) 484,476k (± 0.01%) +640k (+ 0.13%) 484,423k 484,542k p=0.005 n=6
Parse Time 4.17s (± 1.02%) 4.17s (± 0.28%) ~ 4.16s 4.19s p=0.569 n=6
Bind Time 1.46s (± 0.94%) 1.46s (± 0.72%) ~ 1.44s 1.47s p=0.804 n=6
Check Time 23.57s (± 0.19%) 23.63s (± 0.27%) ~ 23.55s 23.74s p=0.226 n=6
Emit Time 0.00s (±154.76%) 0.00s (±244.70%) ~ 0.00s 0.01s p=0.595 n=6
Total Time 29.20s (± 0.24%) 29.26s (± 0.22%) ~ 29.18s 29.37s p=0.148 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

@gabritto Here are the results of running the top 400 repos with tsc comparing main and refs/pull/56941/merge:

Something interesting changed - please have a look.

Details

antvis/G2

2 of 3 projects failed to build with the old tsc and were ignored

tsconfig.json

cheeriojs/cheerio

2 of 3 projects failed to build with the old tsc and were ignored

tsconfig.typedoc.json

  • error TS2322: Type 'boolean' is not assignable to type 'string | number | Document | Element | CDATA | Text | Comment | ProcessingInstruction | ChildNode[] | ... 6 more ... | undefined'.

GrapesJS/grapesjs

1 of 3 projects failed to build with the old tsc and were ignored

packages/core/tsconfig.json

honojs/hono

7 of 8 projects failed to build with the old tsc and were ignored

tsconfig.json

ionic-team/stencil

39 of 42 projects failed to build with the old tsc and were ignored

scripts/tsconfig.json

jupyterlab/jupyterlab

46 of 59 projects failed to build with the old tsc and were ignored

examples/filebrowser/src/tsconfig.json

examples/console/src/tsconfig.json

microsoft/vscode

5 of 53 projects failed to build with the old tsc and were ignored

src/tsconfig.tsec.json

src/tsconfig.monaco.json

nextauthjs/next-auth

23 of 44 projects failed to build with the old tsc and were ignored

packages/adapter-pg/tsconfig.json

tailwindlabs/headlessui

2 of 5 projects failed to build with the old tsc and were ignored

packages/@headlessui-vue/tsconfig.json

video-dev/hls.js

tsconfig.json

vuejs/devtools-v6

7 of 8 projects failed to build with the old tsc and were ignored

packages/api/tsconfig.json

vuejs/vue

7 of 8 projects failed to build with the old tsc and were ignored

tsconfig.json

@gabritto
Copy link
Member Author

gabritto commented Oct 9, 2024

@gabritto Here are the results of running the user tests with tsc comparing main and refs/pull/56941/merge:

Something interesting changed - please have a look.

Details

  • adonis-framework: one of the conditional return expression branches has an error type, such that, if you check the whole expression, it has error type and it masks the error on the other branch that has type null.
  • effect: error just moved to the specific conditional return expression branch that caused the old error
  • webpack: breaking change, the cast that wraps the whole conditional expression is ignored, will fix fixed.
  • puppeteer: similar to adonis-framework, one of the conditional return expression branches has any type, so the whole expression has type any and it masks the error on the other branch that has non-any type.

@gabritto
Copy link
Member Author

gabritto commented Oct 9, 2024

@gabritto Here are the results of running the top 400 repos with tsc comparing main and refs/pull/56941/merge:

Something interesting changed - please have a look.

Details

antvis/G2

Good error, any masking.

cheeriojs/cheerio

Good error, error type masking.

GrapesJS/grapesjs

Theoretically correct error, any masking, but probably inconsequential, cast is needed.

honojs/hono

Error position changed from expression to conditional branches, need to move the @ts-expect-error comment.

ionic-team/stencil

Good error, any masking.

jupyterlab/jupyterlab

Seem like existing errors.

microsoft/vscode

src/tsconfig.tsec.json

nextauthjs/next-auth

Good error, any masking.

tailwindlabs/headlessui

Theoretically correct error, any masking, but probably inconsequential, cast is needed.

video-dev/hls.js

???

vuejs/devtools-v6

Error position changed from expression to conditional branches, need to move the @ts-expect-error comment.

vuejs/vue

Error position changed from expression to conditional branches, need to move the @ts-expect-error comment.

@gabritto
Copy link
Member Author

gabritto commented Oct 9, 2024

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 9, 2024

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
test top400 ✅ Started 👀 Results
user test this ✅ Started 👀 Results
run dt ✅ Started ✅ Results
perf test this faster ✅ Started 👀 Results

@typescript-bot
Copy link
Collaborator

@gabritto Here are the results of running the user tests with tsc comparing main and refs/pull/56941/merge:

Something interesting changed - please have a look.

Details

adonis-framework

/mnt/ts_downloads/_/m/adonis-framework/tsconfig.json

  • [NEW] error TS2322: Type 'null' is not assignable to type 'string'.
    • /mnt/ts_downloads/_/m/adonis-framework/node_modules/adonis-framework/src/Request/index.js(600,75)

effect

tsconfig.json

tsconfig.build.json

tsconfig.base.json

puppeteer

packages/puppeteer-core/tsconfig.json

@typescript-bot
Copy link
Collaborator

Hey @gabritto, the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot
Copy link
Collaborator

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

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - node (v18.15.0, x64)
Errors 31 34 🔻+3 (+ 9.68%) ~ ~ p=0.001 n=6
Symbols 62,340 62,337 -3 (- 0.00%) ~ ~ p=0.001 n=6
Types 50,379 50,270 -109 (- 0.22%) ~ ~ p=0.001 n=6
Memory used 192,868k (± 0.07%) 194,163k (± 0.96%) +1,295k (+ 0.67%) 192,867k 196,587k p=0.020 n=6
Parse Time 1.32s (± 0.80%) 1.31s (± 0.93%) ~ 1.29s 1.32s p=0.282 n=6
Bind Time 0.72s 0.72s (± 0.57%) ~ 0.72s 0.73s p=0.405 n=6
Check Time 9.72s (± 0.19%) 9.79s (± 0.32%) +0.07s (+ 0.70%) 9.75s 9.84s p=0.006 n=6
Emit Time 2.72s (± 1.65%) 2.73s (± 1.03%) ~ 2.70s 2.78s p=0.871 n=6
Total Time 14.48s (± 0.39%) 14.54s (± 0.30%) +0.06s (+ 0.45%) 14.49s 14.59s p=0.030 n=6
angular-1 - node (v18.15.0, x64)
Errors 33 37 🔻+4 (+12.12%) ~ ~ p=0.001 n=6
Symbols 947,886 947,433 -453 (- 0.05%) ~ ~ p=0.001 n=6
Types 410,840 410,174 -666 (- 0.16%) ~ ~ p=0.001 n=6
Memory used 1,224,577k (± 0.00%) 1,224,512k (± 0.00%) -65k (- 0.01%) 1,224,465k 1,224,545k p=0.005 n=6
Parse Time 6.67s (± 0.69%) 6.69s (± 0.19%) ~ 6.67s 6.70s p=0.368 n=6
Bind Time 1.88s (± 0.27%) 1.89s (± 0.27%) +0.01s (+ 0.53%) 1.88s 1.89s p=0.018 n=6
Check Time 31.77s (± 0.35%) 31.98s (± 0.44%) ~ 31.80s 32.13s p=0.054 n=6
Emit Time 15.14s (± 0.23%) 15.25s (± 0.22%) +0.11s (+ 0.72%) 15.22s 15.30s p=0.005 n=6
Total Time 55.47s (± 0.17%) 55.82s (± 0.28%) +0.35s (+ 0.62%) 55.62s 55.99s p=0.005 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,529,690 2,483,589 -46,101 (- 1.82%) ~ ~ p=0.001 n=6
Types 916,156 914,323 -1,833 (- 0.20%) ~ ~ p=0.001 n=6
Memory used 2,341,207k (± 0.00%) 2,331,806k (± 0.00%) -9,401k (- 0.40%) 2,331,711k 2,331,928k p=0.005 n=6
Parse Time 11.18s (± 0.84%) 11.19s (± 0.56%) ~ 11.09s 11.28s p=0.810 n=6
Bind Time 2.61s (± 0.74%) 2.60s (± 0.80%) ~ 2.58s 2.64s p=0.871 n=6
Check Time 90.45s (± 0.56%) 91.26s (± 2.51%) ~ 89.54s 95.60s p=0.936 n=6
Emit Time 0.35s (± 3.32%) 0.34s (± 2.42%) ~ 0.33s 0.35s p=0.438 n=6
Total Time 104.60s (± 0.51%) 105.40s (± 2.21%) ~ 103.65s 109.81s p=0.936 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,258,109 1,257,801 -308 (- 0.02%) ~ ~ p=0.001 n=6
Types 266,266 264,052 -2,214 (- 0.83%) ~ ~ p=0.001 n=6
Memory used 2,422,418k (± 0.02%) 2,423,355k (± 0.01%) +937k (+ 0.04%) 2,422,897k 2,423,685k p=0.013 n=6
Parse Time 5.20s (± 0.70%) 5.23s (± 0.85%) ~ 5.17s 5.28s p=0.471 n=6
Bind Time 1.93s (± 0.21%) 1.93s ~ ~ ~ p=0.405 n=6
Check Time 35.51s (± 0.32%) 35.60s (± 0.19%) ~ 35.49s 35.69s p=0.092 n=6
Emit Time 3.02s (± 1.49%) 2.99s (± 0.81%) ~ 2.95s 3.01s p=0.173 n=6
Total Time 45.66s (± 0.38%) 45.76s (± 0.22%) ~ 45.64s 45.90s p=0.261 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,258,109 1,257,801 -308 (- 0.02%) ~ ~ p=0.001 n=6
Types 266,266 264,052 -2,214 (- 0.83%) ~ ~ p=0.001 n=6
Memory used 2,495,739k (± 0.01%) 2,497,510k (± 0.01%) +1,771k (+ 0.07%) 2,497,261k 2,497,726k p=0.005 n=6
Parse Time 5.38s (± 1.01%) 5.39s (± 0.86%) ~ 5.33s 5.45s p=1.000 n=6
Bind Time 1.73s (± 0.37%) 1.75s (± 0.48%) +0.01s (+ 0.87%) 1.74s 1.76s p=0.009 n=6
Check Time 35.81s (± 0.35%) 36.06s (± 0.17%) +0.25s (+ 0.69%) 35.99s 36.15s p=0.005 n=6
Emit Time 3.05s (± 1.57%) 3.03s (± 1.07%) ~ 2.99s 3.07s p=0.374 n=6
Total Time 45.99s (± 0.28%) 46.22s (± 0.13%) +0.23s (+ 0.51%) 46.14s 46.31s p=0.008 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 261,786 262,003 +217 (+ 0.08%) ~ ~ p=0.001 n=6
Types 106,508 105,961 -547 (- 0.51%) ~ ~ p=0.001 n=6
Memory used 438,797k (± 0.01%) 439,340k (± 0.01%) +544k (+ 0.12%) 439,278k 439,387k p=0.005 n=6
Parse Time 3.57s (± 0.84%) 3.53s (± 1.08%) ~ 3.49s 3.58s p=0.106 n=6
Bind Time 1.31s (± 1.71%) 1.32s (± 0.64%) ~ 1.30s 1.32s p=1.000 n=6
Check Time 18.97s (± 0.58%) 19.00s (± 0.26%) ~ 18.91s 19.04s p=0.199 n=6
Emit Time 1.54s (± 0.34%) 1.52s (± 1.05%) ~ 1.51s 1.55s p=0.082 n=6
Total Time 25.40s (± 0.43%) 25.37s (± 0.21%) ~ 25.31s 25.45s p=0.936 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 68 70 +2 (+ 2.94%) ~ ~ p=0.001 n=6
Symbols 225,919 225,824 -95 (- 0.04%) ~ ~ p=0.001 n=6
Types 94,415 93,856 -559 (- 0.59%) ~ ~ p=0.001 n=6
Memory used 371,111k (± 0.01%) 371,247k (± 0.01%) +136k (+ 0.04%) 371,171k 371,287k p=0.008 n=6
Parse Time 2.90s (± 0.86%) 2.91s (± 1.89%) ~ 2.84s 2.98s p=0.810 n=6
Bind Time 1.59s (± 1.64%) 1.59s (± 1.17%) ~ 1.57s 1.62s p=1.000 n=6
Check Time 16.34s (± 0.25%) 16.51s (± 0.22%) +0.17s (+ 1.06%) 16.47s 16.56s p=0.005 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 20.83s (± 0.35%) 21.02s (± 0.32%) +0.18s (+ 0.89%) 20.92s 21.11s p=0.008 n=6
vscode - node (v18.15.0, x64)
Errors 3 10 🔻+7 (+233.33%) ~ ~ p=0.001 n=6
Symbols 3,113,500 3,110,339 -3,161 (- 0.10%) ~ ~ p=0.001 n=6
Types 1,073,221 1,070,519 -2,702 (- 0.25%) ~ ~ p=0.001 n=6
Memory used 3,206,893k (± 0.01%) 3,210,338k (± 0.00%) +3,445k (+ 0.11%) 3,210,209k 3,210,473k p=0.005 n=6
Parse Time 14.05s (± 0.50%) 14.04s (± 0.62%) ~ 13.87s 14.11s p=1.000 n=6
Bind Time 4.43s (± 0.35%) 4.43s (± 0.56%) ~ 4.40s 4.45s p=0.742 n=6
Check Time 87.19s (± 2.02%) 86.07s (± 1.68%) ~ 85.01s 88.06s p=0.378 n=6
Emit Time 23.95s (± 8.83%) 24.08s (± 9.29%) ~ 22.57s 27.01s p=0.810 n=6
Total Time 129.62s (± 2.69%) 128.62s (± 2.80%) ~ 126.09s 133.50s p=0.575 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 285,191 284,970 -221 (- 0.08%) ~ ~ p=0.001 n=6
Types 115,771 115,632 -139 (- 0.12%) ~ ~ p=0.001 n=6
Memory used 435,287k (± 0.03%) 435,274k (± 0.02%) ~ 435,171k 435,393k p=1.000 n=6
Parse Time 5.04s (± 0.75%) 5.03s (± 0.65%) ~ 4.99s 5.07s p=0.807 n=6
Bind Time 2.15s (± 1.28%) 2.17s (± 0.50%) ~ 2.16s 2.19s p=0.061 n=6
Check Time 22.79s (± 0.87%) 22.63s (± 0.32%) ~ 22.55s 22.74s p=0.109 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 29.97s (± 0.63%) 29.84s (± 0.27%) ~ 29.77s 29.98s p=0.149 n=6
xstate-main - node (v18.15.0, x64)
Errors 3 4 🔻+1 (+33.33%) ~ ~ p=0.001 n=6
Symbols 540,222 539,846 -376 (- 0.07%) ~ ~ p=0.001 n=6
Types 181,145 180,882 -263 (- 0.15%) ~ ~ p=0.001 n=6
Memory used 483,907k (± 0.02%) 484,475k (± 0.01%) +568k (+ 0.12%) 484,396k 484,557k p=0.005 n=6
Parse Time 4.17s (± 0.59%) 4.17s (± 0.66%) ~ 4.14s 4.21s p=0.934 n=6
Bind Time 1.45s (± 0.80%) 1.46s (± 1.03%) ~ 1.45s 1.48s p=0.182 n=6
Check Time 23.58s (± 0.39%) 23.70s (± 0.23%) +0.13s (+ 0.53%) 23.61s 23.76s p=0.020 n=6
Emit Time 0.01s (±109.43%) 0.00s (±244.70%) ~ 0.00s 0.01s p=0.282 n=6
Total Time 29.21s (± 0.29%) 29.35s (± 0.26%) +0.14s (+ 0.46%) 29.22s 29.45s p=0.023 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@gabritto
Copy link
Member Author

gabritto commented Oct 9, 2024

@typescript-bot perf test this faster

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 9, 2024

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
perf test this faster ✅ Started 👀 Results

@typescript-bot
Copy link
Collaborator

@gabritto Here are the results of running the top 400 repos with tsc comparing main and refs/pull/56941/merge:

Something interesting changed - please have a look.

Details

antvis/G2

2 of 3 projects failed to build with the old tsc and were ignored

tsconfig.json

cheeriojs/cheerio

2 of 3 projects failed to build with the old tsc and were ignored

tsconfig.typedoc.json

  • error TS2322: Type 'boolean' is not assignable to type 'string | number | Document | Element | CDATA | Text | Comment | ProcessingInstruction | ChildNode[] | ... 6 more ... | undefined'.

GrapesJS/grapesjs

1 of 3 projects failed to build with the old tsc and were ignored

packages/core/tsconfig.json

honojs/hono

7 of 8 projects failed to build with the old tsc and were ignored

tsconfig.json

ionic-team/stencil

39 of 42 projects failed to build with the old tsc and were ignored

scripts/tsconfig.json

jupyterlab/jupyterlab

46 of 59 projects failed to build with the old tsc and were ignored

examples/filebrowser/src/tsconfig.json

examples/console/src/tsconfig.json

microsoft/vscode

5 of 53 projects failed to build with the old tsc and were ignored

src/tsconfig.tsec.json

src/tsconfig.monaco.json

nextauthjs/next-auth

23 of 44 projects failed to build with the old tsc and were ignored

packages/adapter-pg/tsconfig.json

tailwindlabs/headlessui

2 of 5 projects failed to build with the old tsc and were ignored

packages/@headlessui-vue/tsconfig.json

video-dev/hls.js

tsconfig.json

vuejs/devtools-v6

7 of 8 projects failed to build with the old tsc and were ignored

packages/api/tsconfig.json

vuejs/vue

7 of 8 projects failed to build with the old tsc and were ignored

tsconfig.json

@typescript-bot
Copy link
Collaborator

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

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - node (v18.15.0, x64)
Errors 31 34 🔻+3 (+ 9.68%) ~ ~ p=0.001 n=6
Symbols 62,340 62,337 -3 (- 0.00%) ~ ~ p=0.001 n=6
Types 50,379 50,270 -109 (- 0.22%) ~ ~ p=0.001 n=6
Memory used 194,047k (± 0.94%) 194,743k (± 0.99%) ~ 192,861k 196,523k p=0.128 n=6
Parse Time 1.31s (± 1.01%) 1.31s (± 0.62%) ~ 1.30s 1.32s p=0.865 n=6
Bind Time 0.72s 0.72s ~ ~ ~ p=1.000 n=6
Check Time 9.74s (± 0.48%) 9.79s (± 0.46%) ~ 9.71s 9.85s p=0.172 n=6
Emit Time 2.71s (± 1.61%) 2.73s (± 0.83%) ~ 2.70s 2.76s p=0.332 n=6
Total Time 14.47s (± 0.48%) 14.55s (± 0.30%) ~ 14.49s 14.61s p=0.077 n=6
angular-1 - node (v18.15.0, x64)
Errors 33 37 🔻+4 (+12.12%) ~ ~ p=0.001 n=6
Symbols 947,886 947,433 -453 (- 0.05%) ~ ~ p=0.001 n=6
Types 410,840 410,174 -666 (- 0.16%) ~ ~ p=0.001 n=6
Memory used 1,224,571k (± 0.00%) 1,224,559k (± 0.00%) ~ 1,224,522k 1,224,619k p=0.630 n=6
Parse Time 6.67s (± 0.94%) 6.63s (± 1.03%) ~ 6.56s 6.75s p=0.521 n=6
Bind Time 1.88s (± 0.22%) 1.88s (± 0.27%) ~ 1.88s 1.89s p=0.114 n=6
Check Time 31.85s (± 0.15%) 31.92s (± 0.64%) ~ 31.71s 32.28s p=0.810 n=6
Emit Time 15.15s (± 0.42%) 15.20s (± 0.22%) ~ 15.14s 15.23s p=0.089 n=6
Total Time 55.55s (± 0.20%) 55.63s (± 0.43%) ~ 55.39s 56.03s p=0.748 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,529,690 2,483,589 -46,101 (- 1.82%) ~ ~ p=0.001 n=6
Types 916,156 914,323 -1,833 (- 0.20%) ~ ~ p=0.001 n=6
Memory used 2,340,940k (± 0.00%) 2,331,546k (± 0.00%) -9,395k (- 0.40%) 2,331,506k 2,331,594k p=0.005 n=6
Parse Time 9.38s (± 0.53%) 9.37s (± 0.26%) ~ 9.34s 9.40s p=0.376 n=6
Bind Time 2.17s (± 0.41%) 2.17s (± 0.38%) ~ 2.15s 2.17s p=0.654 n=6
Check Time 75.93s (± 0.48%) 75.75s (± 0.65%) ~ 75.03s 76.58s p=0.298 n=6
Emit Time 0.28s (± 1.99%) 0.28s (± 2.70%) ~ 0.27s 0.29s p=0.476 n=6
Total Time 87.75s (± 0.42%) 87.56s (± 0.57%) ~ 86.80s 88.36s p=0.336 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,258,109 1,257,801 -308 (- 0.02%) ~ ~ p=0.001 n=6
Types 266,266 264,052 -2,214 (- 0.83%) ~ ~ p=0.001 n=6
Memory used 2,422,485k (± 0.02%) 2,423,385k (± 0.03%) +900k (+ 0.04%) 2,422,028k 2,424,491k p=0.045 n=6
Parse Time 5.18s (± 1.03%) 5.22s (± 1.13%) ~ 5.14s 5.32s p=0.470 n=6
Bind Time 1.92s (± 0.54%) 1.94s (± 0.65%) +0.02s (+ 0.87%) 1.92s 1.95s p=0.048 n=6
Check Time 35.51s (± 0.45%) 35.77s (± 0.09%) +0.27s (+ 0.75%) 35.72s 35.80s p=0.045 n=6
Emit Time 3.00s (± 1.33%) 3.02s (± 2.15%) ~ 2.90s 3.09s p=0.294 n=6
Total Time 45.61s (± 0.49%) 45.95s (± 0.17%) +0.34s (+ 0.75%) 45.88s 46.07s p=0.045 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,258,109 1,257,801 -308 (- 0.02%) ~ ~ p=0.001 n=6
Types 266,266 264,052 -2,214 (- 0.83%) ~ ~ p=0.001 n=6
Memory used 2,858,916k (±13.77%) 2,860,646k (±13.76%) ~ 2,500,313k 3,221,604k p=0.298 n=6
Parse Time 6.73s (± 2.86%) 6.77s (± 3.07%) ~ 6.52s 7.01s p=0.748 n=6
Bind Time 2.12s (± 2.41%) 2.20s (± 5.51%) ~ 2.11s 2.44s p=0.149 n=6
Check Time 43.14s (± 0.31%) 43.32s (± 0.33%) ~ 43.12s 43.48s p=0.093 n=6
Emit Time 3.49s (± 1.34%) 3.59s (± 5.22%) ~ 3.41s 3.94s p=0.261 n=6
Total Time 55.48s (± 0.41%) 55.87s (± 0.38%) +0.39s (+ 0.71%) 55.61s 56.17s p=0.020 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 261,786 262,003 +217 (+ 0.08%) ~ ~ p=0.001 n=6
Types 106,508 105,961 -547 (- 0.51%) ~ ~ p=0.001 n=6
Memory used 438,756k (± 0.02%) 439,299k (± 0.01%) +543k (+ 0.12%) 439,258k 439,335k p=0.005 n=6
Parse Time 3.53s (± 0.57%) 3.51s (± 0.74%) ~ 3.48s 3.55s p=0.086 n=6
Bind Time 1.30s (± 1.26%) 1.31s (± 0.89%) ~ 1.29s 1.32s p=0.868 n=6
Check Time 18.90s (± 0.21%) 18.95s (± 0.45%) ~ 18.79s 19.03s p=0.109 n=6
Emit Time 1.54s (± 0.71%) 1.53s (± 0.76%) ~ 1.52s 1.55s p=0.244 n=6
Total Time 25.27s (± 0.13%) 25.30s (± 0.35%) ~ 25.12s 25.36s p=0.077 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 68 70 +2 (+ 2.94%) ~ ~ p=0.001 n=6
Symbols 225,919 225,824 -95 (- 0.04%) ~ ~ p=0.001 n=6
Types 94,415 93,856 -559 (- 0.59%) ~ ~ p=0.001 n=6
Memory used 371,093k (± 0.01%) 371,234k (± 0.01%) +141k (+ 0.04%) 371,211k 371,269k p=0.005 n=6
Parse Time 2.92s (± 1.26%) 2.91s (± 0.51%) ~ 2.89s 2.93s p=1.000 n=6
Bind Time 1.59s (± 0.56%) 1.59s (± 0.93%) ~ 1.57s 1.60s p=1.000 n=6
Check Time 16.36s (± 0.24%) 16.45s (± 0.22%) +0.09s (+ 0.56%) 16.39s 16.50s p=0.012 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 20.87s (± 0.30%) 20.95s (± 0.17%) ~ 20.91s 20.99s p=0.063 n=6
vscode - node (v18.15.0, x64)
Errors 3 10 🔻+7 (+233.33%) ~ ~ p=0.001 n=6
Symbols 3,113,741 3,110,580 -3,161 (- 0.10%) ~ ~ p=0.001 n=6
Types 1,073,294 1,070,592 -2,702 (- 0.25%) ~ ~ p=0.001 n=6
Memory used 3,207,033k (± 0.00%) 3,210,373k (± 0.00%) +3,340k (+ 0.10%) 3,210,094k 3,210,514k p=0.005 n=6
Parse Time 14.03s (± 0.31%) 14.06s (± 0.44%) ~ 13.96s 14.14s p=0.261 n=6
Bind Time 4.52s (± 2.59%) 4.44s (± 0.47%) ~ 4.41s 4.46s p=0.169 n=6
Check Time 86.44s (± 2.15%) 85.49s (± 1.58%) ~ 84.50s 88.20s p=0.128 n=6
Emit Time 24.25s (± 8.58%) 24.16s (± 9.35%) ~ 22.55s 27.13s p=0.936 n=6
Total Time 129.24s (± 2.93%) 128.15s (± 2.44%) ~ 126.11s 133.65s p=0.173 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 285,191 284,970 -221 (- 0.08%) ~ ~ p=0.001 n=6
Types 115,771 115,632 -139 (- 0.12%) ~ ~ p=0.001 n=6
Memory used 435,237k (± 0.04%) 435,380k (± 0.03%) ~ 435,233k 435,568k p=0.093 n=6
Parse Time 5.03s (± 1.01%) 5.01s (± 1.75%) ~ 4.85s 5.10s p=0.936 n=6
Bind Time 2.16s (± 0.70%) 2.15s (± 1.12%) ~ 2.13s 2.19s p=0.368 n=6
Check Time 22.75s (± 0.47%) 22.77s (± 0.52%) ~ 22.65s 22.96s p=0.936 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 29.95s (± 0.28%) 29.94s (± 0.47%) ~ 29.71s 30.10s p=0.870 n=6
xstate-main - node (v18.15.0, x64)
Errors 3 4 🔻+1 (+33.33%) ~ ~ p=0.001 n=6
Symbols 540,222 539,846 -376 (- 0.07%) ~ ~ p=0.001 n=6
Types 181,145 180,882 -263 (- 0.15%) ~ ~ p=0.001 n=6
Memory used 483,922k (± 0.02%) 484,372k (± 0.03%) +450k (+ 0.09%) 484,144k 484,543k p=0.005 n=6
Parse Time 4.18s (± 0.50%) 4.17s (± 0.65%) ~ 4.13s 4.21s p=0.570 n=6
Bind Time 1.46s (± 0.91%) 1.44s (± 0.85%) ~ 1.43s 1.46s p=0.063 n=6
Check Time 23.60s (± 0.24%) 24.00s (± 1.80%) +0.40s (+ 1.70%) 23.66s 24.64s p=0.006 n=6
Emit Time 0.00s 0.01s (±109.43%) ~ 0.00s 0.01s p=0.071 n=6
Total Time 29.24s (± 0.16%) 29.62s (± 1.42%) +0.38s (+ 1.30%) 29.29s 30.23s p=0.010 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@gabritto
Copy link
Member Author

gabritto commented Oct 9, 2024

@typescript-bot perf test this faster

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 9, 2024

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
perf test this faster ✅ Started 👀 Results

@typescript-bot
Copy link
Collaborator

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

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - node (v18.15.0, x64)
Errors 31 34 🔻+3 (+ 9.68%) ~ ~ p=0.001 n=6
Symbols 62,340 62,337 -3 (- 0.00%) ~ ~ p=0.001 n=6
Types 50,379 50,270 -109 (- 0.22%) ~ ~ p=0.001 n=6
Memory used 195,924k (± 0.73%) 195,420k (± 0.95%) ~ 193,033k 196,798k p=0.689 n=6
Parse Time 1.61s (± 1.40%) 1.60s (± 1.15%) ~ 1.58s 1.63s p=0.216 n=6
Bind Time 0.86s (± 1.71%) 0.87s (± 1.52%) ~ 0.85s 0.89s p=0.279 n=6
Check Time 11.76s (± 0.29%) 11.81s (± 0.65%) ~ 11.73s 11.92s p=0.296 n=6
Emit Time 3.30s (± 0.35%) 3.33s (± 3.33%) ~ 3.25s 3.55s p=0.686 n=6
Total Time 17.54s (± 0.36%) 17.61s (± 0.75%) ~ 17.48s 17.82s p=0.332 n=6
angular-1 - node (v18.15.0, x64)
Errors 33 37 🔻+4 (+12.12%) ~ ~ p=0.001 n=6
Symbols 947,886 947,433 -453 (- 0.05%) ~ ~ p=0.001 n=6
Types 410,840 410,174 -666 (- 0.16%) ~ ~ p=0.001 n=6
Memory used 1,224,595k (± 0.00%) 1,224,547k (± 0.00%) ~ 1,224,514k 1,224,602k p=0.054 n=6
Parse Time 6.66s (± 0.64%) 6.64s (± 0.86%) ~ 6.57s 6.72s p=0.683 n=6
Bind Time 1.88s (± 0.22%) 1.89s (± 0.62%) ~ 1.88s 1.91s p=0.056 n=6
Check Time 31.88s (± 0.55%) 31.91s (± 0.44%) ~ 31.70s 32.13s p=0.630 n=6
Emit Time 15.15s (± 0.34%) 15.25s (± 0.36%) +0.10s (+ 0.67%) 15.16s 15.33s p=0.024 n=6
Total Time 55.56s (± 0.40%) 55.69s (± 0.32%) ~ 55.50s 56.00s p=0.378 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,529,690 2,483,589 -46,101 (- 1.82%) ~ ~ p=0.001 n=6
Types 916,156 914,323 -1,833 (- 0.20%) ~ ~ p=0.001 n=6
Memory used 2,340,956k (± 0.00%) 2,331,551k (± 0.00%) -9,404k (- 0.40%) 2,331,520k 2,331,592k p=0.005 n=6
Parse Time 9.42s (± 0.39%) 9.38s (± 0.46%) ~ 9.33s 9.43s p=0.293 n=6
Bind Time 2.17s (± 0.48%) 2.17s (± 0.68%) ~ 2.15s 2.19s p=0.510 n=6
Check Time 76.10s (± 0.31%) 75.75s (± 0.48%) ~ 75.33s 76.33s p=0.078 n=6
Emit Time 0.28s (± 2.95%) 0.29s (± 3.77%) ~ 0.28s 0.30s p=0.053 n=6
Total Time 87.96s (± 0.29%) 87.59s (± 0.46%) ~ 87.12s 88.25s p=0.093 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,258,109 1,257,801 -308 (- 0.02%) ~ ~ p=0.001 n=6
Types 266,266 264,052 -2,214 (- 0.83%) ~ ~ p=0.001 n=6
Memory used 2,422,177k (± 0.02%) 2,423,243k (± 0.02%) +1,066k (+ 0.04%) 2,422,725k 2,423,852k p=0.031 n=6
Parse Time 5.21s (± 0.71%) 5.22s (± 1.13%) ~ 5.14s 5.29s p=0.872 n=6
Bind Time 1.92s (± 0.63%) 1.94s (± 0.85%) ~ 1.91s 1.96s p=0.215 n=6
Check Time 35.57s (± 0.61%) 35.74s (± 0.44%) ~ 35.50s 35.93s p=0.261 n=6
Emit Time 3.11s (± 4.47%) 3.00s (± 1.20%) ~ 2.97s 3.06s p=0.053 n=6
Total Time 45.82s (± 0.28%) 45.91s (± 0.32%) ~ 45.67s 46.07s p=0.298 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,258,109 1,257,801 -308 (- 0.02%) ~ ~ p=0.001 n=6
Types 266,266 264,052 -2,214 (- 0.83%) ~ ~ p=0.001 n=6
Memory used 2,619,150k (±11.21%) 2,740,456k (±13.55%) ~ 2,499,279k 3,221,051k p=0.128 n=6
Parse Time 6.62s (± 2.35%) 6.64s (± 2.95%) ~ 6.50s 6.91s p=0.575 n=6
Bind Time 2.15s (± 1.25%) 2.15s (± 1.27%) ~ 2.11s 2.18s p=0.935 n=6
Check Time 43.07s (± 0.20%) 43.37s (± 0.51%) +0.30s (+ 0.70%) 43.07s 43.74s p=0.031 n=6
Emit Time 3.59s (± 5.91%) 3.56s (± 3.41%) ~ 3.42s 3.73s p=1.000 n=6
Total Time 55.44s (± 0.42%) 55.73s (± 0.53%) ~ 55.32s 56.16s p=0.066 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 261,786 262,003 +217 (+ 0.08%) ~ ~ p=0.001 n=6
Types 106,508 105,961 -547 (- 0.51%) ~ ~ p=0.001 n=6
Memory used 438,531k (± 0.01%) 439,199k (± 0.01%) +667k (+ 0.15%) 439,146k 439,264k p=0.005 n=6
Parse Time 2.90s (± 0.51%) 2.91s (± 0.56%) ~ 2.89s 2.93s p=0.413 n=6
Bind Time 1.10s 1.09s (± 0.50%) ~ 1.09s 1.10s p=0.071 n=6
Check Time 15.73s (± 0.26%) 15.75s (± 0.55%) ~ 15.65s 15.85s p=0.872 n=6
Emit Time 1.31s (± 2.28%) 1.31s (± 1.24%) ~ 1.29s 1.33s p=1.000 n=6
Total Time 21.04s (± 0.26%) 21.07s (± 0.46%) ~ 20.95s 21.20s p=0.810 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 68 70 +2 (+ 2.94%) ~ ~ p=0.001 n=6
Symbols 225,919 225,824 -95 (- 0.04%) ~ ~ p=0.001 n=6
Types 94,415 93,856 -559 (- 0.59%) ~ ~ p=0.001 n=6
Memory used 371,072k (± 0.01%) 371,202k (± 0.02%) +129k (+ 0.03%) 371,128k 371,282k p=0.005 n=6
Parse Time 2.89s (± 0.89%) 2.89s (± 0.96%) ~ 2.86s 2.92s p=0.871 n=6
Bind Time 1.59s (± 0.95%) 1.58s (± 1.33%) ~ 1.55s 1.60s p=0.324 n=6
Check Time 16.35s (± 0.44%) 16.47s (± 0.54%) +0.12s (+ 0.74%) 16.35s 16.61s p=0.037 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 20.83s (± 0.42%) 20.94s (± 0.33%) +0.11s (+ 0.54%) 20.88s 21.07s p=0.045 n=6
vscode - node (v18.15.0, x64)
Errors 3 10 🔻+7 (+233.33%) ~ ~ p=0.001 n=6
Symbols 3,113,741 3,110,580 -3,161 (- 0.10%) ~ ~ p=0.001 n=6
Types 1,073,294 1,070,592 -2,702 (- 0.25%) ~ ~ p=0.001 n=6
Memory used 3,206,907k (± 0.01%) 3,210,202k (± 0.01%) +3,295k (+ 0.10%) 3,210,044k 3,210,504k p=0.005 n=6
Parse Time 14.03s (± 0.40%) 14.01s (± 0.49%) ~ 13.93s 14.12s p=0.470 n=6
Bind Time 4.44s (± 0.50%) 4.52s (± 2.87%) ~ 4.40s 4.71s p=0.295 n=6
Check Time 85.84s (± 1.38%) 85.95s (± 1.83%) ~ 84.44s 87.98s p=0.936 n=6
Emit Time 25.57s (± 8.59%) 26.34s (± 6.91%) ~ 22.65s 27.48s p=0.575 n=6
Total Time 129.89s (± 2.24%) 130.82s (± 2.00%) ~ 126.31s 133.46s p=0.575 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 285,191 284,970 -221 (- 0.08%) ~ ~ p=0.001 n=6
Types 115,771 115,632 -139 (- 0.12%) ~ ~ p=0.001 n=6
Memory used 435,172k (± 0.02%) 435,316k (± 0.02%) +144k (+ 0.03%) 435,174k 435,394k p=0.045 n=6
Parse Time 5.01s (± 0.71%) 5.00s (± 1.65%) ~ 4.87s 5.07s p=0.688 n=6
Bind Time 2.13s (± 1.55%) 2.15s (± 1.02%) ~ 2.13s 2.19s p=0.560 n=6
Check Time 22.59s (± 0.36%) 22.68s (± 0.47%) ~ 22.57s 22.86s p=0.173 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 29.73s (± 0.43%) 29.83s (± 0.34%) ~ 29.75s 30.03s p=0.199 n=6
xstate-main - node (v18.15.0, x64)
Errors 3 4 🔻+1 (+33.33%) ~ ~ p=0.001 n=6
Symbols 540,222 539,846 -376 (- 0.07%) ~ ~ p=0.001 n=6
Types 181,145 180,882 -263 (- 0.15%) ~ ~ p=0.001 n=6
Memory used 483,851k (± 0.01%) 484,482k (± 0.01%) +631k (+ 0.13%) 484,441k 484,555k p=0.005 n=6
Parse Time 4.18s (± 0.57%) 4.17s (± 0.40%) ~ 4.15s 4.19s p=0.413 n=6
Bind Time 1.47s (± 0.51%) 1.46s (± 0.67%) ~ 1.45s 1.47s p=0.102 n=6
Check Time 23.68s (± 0.27%) 23.71s (± 0.29%) ~ 23.66s 23.84s p=0.872 n=6
Emit Time 0.00s (±244.70%) 0.01s (±77.38%) ~ 0.00s 0.01s p=0.112 n=6
Total Time 29.33s (± 0.20%) 29.35s (± 0.26%) ~ 29.29s 29.49s p=1.000 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@gabritto
Copy link
Member Author

Conditional return expression state of affairs

Summary of error changes in user tests + top400:

Total error changes New errors likely to be bugs Theoretically correct but unlikely to be bugs Change in error position
21 10 6 5

Representative reduced examples:

New errors likely to be bugs:
cheerio:

const rboolean =
  /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i;

declare function getAttr(
  elem: any,
  name: string | undefined,
  xmlMode?: boolean,
): Record<string, string> | string | undefined;

function getProp(
  el: Element,
  name: string,
  xmlMode?: boolean,
): string | undefined | Element[keyof Element] {
  return name in el
    ? // @ts-expect-error TS doesn't like us accessing the value directly here.
      el[name]
    : !xmlMode && rboolean.test(name)
      ? getAttr(el, name, false) !== undefined
      : getAttr(el, name, xmlMode);
}

playground

vscode:

interface IExpression {
	[pattern: string]: boolean;
}

function patternListToIExpression(...patterns: string[]): IExpression {
	return patterns.length ?
		patterns.reduce((glob, cur) => { glob[cur] = true; return glob; }, Object.create(null)) :
		undefined;
}

playground

New errors unlikely to be bugs:
vscode

type ContextKeyValue = null | undefined | boolean | number | string
	| Array<null | undefined | boolean | number | string>
	| Record<string, null | undefined | boolean | number | string>;

interface IContext {
	getValue<T extends ContextKeyValue = ContextKeyValue>(key: string): T | undefined;
}

class OverlayContext implements IContext {
  private parent!: IContext;
  private overlay!: ReadonlyMap<string, any>;

	getValue<T>(key: string): T | undefined {
		return this.overlay.has(key)
      ? this.overlay.get(key)
      : this.parent.getValue(key); // The type of this call is `ContextKeyValue`, which is not assignable to `T`.
	}
}

playground

Position change:
vue

interface VNode {
  componentInstance?: { _node: VNode };
}
interface VNodeWithData extends VNode {
  data: object;
}

function locateNode(vnode: VNode | VNodeWithData): VNodeWithData {
  // @ts-expect-error
  return vnode.componentInstance // Error currently happens on this line and is supressed
    ? locateNode(vnode.componentInstance._node)
    : vnode // With change, error shifts to this line
}

playground

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
4 participants