Skip to content

Produce union types when instantiating generic contextual types - #65617

Open
Anders Hejlsberg (ahejlsberg) wants to merge 5 commits into
mainfrom
fix-64690
Open

Anders Hejlsberg (ahejlsberg) wants to merge 5 commits into
mainfrom
fix-64690

Conversation

@ahejlsberg

Copy link
Copy Markdown
Member

With this PR we produce union types (instead of picking particular inference candidates) when instantiating generic contextual types that were inferred from return types. This is consistent with preserving as much information as possible in contextual types.

Fixes #64690.

Copilot AI balanced review requested due to automatic review settings November 21, 2026 01:37
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Nov 21, 2026
@typescript-automation typescript-automation Bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Nov 21, 2026
@ahejlsberg

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) test it

@typescript-automation

typescript-automation Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The inference changes affect contravariant candidates, literal widening, and unions, requiring compiler-suite validation of recursive constraints, binding patterns, and boolean contexts that cannot be run in this review environment.

No open issues 🎉

What changed in this PR

This PR updates the compiler’s return-derived contextual inference to preserve candidates as union types, addressing #64690’s regression where ok([]) inferred a readonly tuple incompatible with the declared union return type.

Changes:

  • Use return-type inference priority when constructing contextual return mappings.
  • Apply constraint filtering to combined return-priority flags and exclude never from the preferred contextual-type path.
  • Add a regression test and baselines showing mutable [] inference.
File Description
tsc/​testdata/​tests/​cases/​compiler/​contextualReturnTypeInferenceUnions.ts Adds the regression case for #64690.
tsc/​testdata/​baselines/​reference/​compiler/​contextualReturnTypeInferenceUnions.types Records the expected Ok<[]> inference.
tsc/​testdata/​baselines/​reference/​compiler/​contextualReturnTypeInferenceUnions.symbols Records symbols for the regression test.
tsc/​internal/​checker/​inference.go Recognizes return-type priority within combined flags during constraint filtering.
tsc/​internal/​checker/​checker.go Updates contextual return inference priority and handling of never.

Review effort: Balanced

@typescript-automation

Copy link
Copy Markdown
Contributor

Anders Hejlsberg (@ahejlsberg) Here are the results of running the user tests with tsc comparing baseline and pr:

Something interesting changed - please have a look.

Details

webpack

tsconfig.json

  • [NEW] error TS2353: Object literal may only specify known properties, and 'intercept' does not exist in type 'FakeHook<Pick<AsyncSeriesHook<T, UnsetAdditionalOptions>, "name" | "tap" | "tapAsync" | "tapPromise">>'.

tsconfig.types.json

  • [NEW] error TS2353: Object literal may only specify known properties, and 'intercept' does not exist in type 'FakeHook<Pick<AsyncSeriesHook<T, UnsetAdditionalOptions>, "name" | "tap" | "tapAsync" | "tapPromise">>'.

tsconfig.types.test.json

  • [NEW] error TS2353: Object literal may only specify known properties, and 'intercept' does not exist in type 'FakeHook<Pick<AsyncSeriesHook<T, UnsetAdditionalOptions>, "name" | "tap" | "tapAsync" | "tapPromise">>'.

@typescript-automation

Copy link
Copy Markdown
Contributor

Hey Anders Hejlsberg (@ahejlsberg), the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-automation

Copy link
Copy Markdown
Contributor

Anders Hejlsberg (@ahejlsberg)
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 - native
Errors 41 41 ~ ~ ~ p=1.000 n=20
Symbols 88,381 88,381 ~ ~ ~ p=1.000 n=20
Types 79,149 79,149 ~ ~ ~ p=1.000 n=20
Memory Used 106,280k (± 0.03%) 106,298k (± 0.02%) ~ 106,160k 106,414k p=0.498 n=20
Memory Allocs 1,045,703 (± 0.01%) 1,045,733 (± 0.01%) ~ 1,045,566 1,045,956 p=0.349 n=20
Config Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Parse Time 0.037s (± 2.76%) 0.037s (± 3.06%) ~ 0.033s 0.040s p=0.695 n=20
Bind Time 0.012s (± 8.98%) 0.012s (± 8.26%) ~ 0.010s 0.016s p=0.443 n=20
Check Time 0.378s (± 0.68%) 0.376s (± 0.48%) ~ 0.370s 0.382s p=0.240 n=20
Emit Time 0.215s (± 0.52%) 0.217s (± 0.88%) ~ 0.211s 0.224s p=0.225 n=20
Total Time 0.648s (± 0.36%) 0.648s (± 0.43%) ~ 0.635s 0.659s p=0.865 n=20
angular-1 - native
Errors 63 63 ~ ~ ~ p=1.000 n=20
Symbols 753,865 753,731 -134 (- 0.02%) ~ ~ p=0.000 n=20
Types 546,772 546,699 -73 (- 0.01%) ~ ~ p=0.000 n=20
Memory Used 642,235k (± 0.01%) 642,614k (± 0.01%) +376k (+ 0.06%) 642,353k 643,058k p=0.000 n=20
Memory Allocs 8,306,726 (± 0.02%) 8,314,949 (± 0.10%) ~ 8,303,200 8,373,392 p=0.070 n=20
Config Time 0.013s (± 1.11%) 0.013s (± 0.80%) ~ 0.013s 0.014s p=0.174 n=20
Parse Time 0.206s (± 2.43%) 0.210s (± 2.10%) ~ 0.196s 0.225s p=0.210 n=20
Bind Time 0.063s (±10.43%) 0.057s (± 5.71%) ~ 0.051s 0.073s p=0.089 n=20
Check Time 1.098s (± 0.93%) 1.109s (± 0.90%) ~ 1.078s 1.142s p=0.202 n=20
Emit Time 0.736s (± 0.82%) 0.735s (± 0.97%) ~ 0.695s 0.761s p=0.498 n=20
Total Time 2.134s (± 0.65%) 2.140s (± 0.75%) ~ 2.070s 2.207s p=0.701 n=20
arktype - native
Errors 0 0 ~ ~ ~ p=1.000 n=20
Symbols 676,789 676,779 -10 (- 0.00%) ~ ~ p=0.000 n=20
Types 937,638 937,629 -9 (- 0.00%) ~ ~ p=0.000 n=20
Memory Used 473,899k (± 0.01%) 473,822k (± 0.01%) -70k (- 0.01%) 473,582k 473,983k p=0.011 n=20
Memory Allocs 11,786,878 (± 0.01%) 11,788,526 (± 0.01%) +993 (+ 0.01%) 11,785,245 11,800,456 p=0.027 n=20
Config Time 0.002s 0.002s ~ ~ ~ p=1.000 n=20
Parse Time 0.067s (± 3.26%) 0.067s (± 2.75%) ~ 0.060s 0.076s p=0.952 n=20
Bind Time 0.020s (± 7.32%) 0.020s (±10.51%) ~ 0.017s 0.032s p=0.249 n=20
Check Time 1.465s (± 0.48%) 1.461s (± 0.63%) ~ 1.429s 1.501s p=0.441 n=20
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Total Time 1.594s (± 0.38%) 1.595s (± 0.51%) ~ 1.566s 1.631s p=0.955 n=20
class-transformer - native
Errors 0 0 ~ ~ ~ p=1.000 n=20
Symbols 45,378 45,378 ~ ~ ~ p=1.000 n=20
Types 7,565 7,565 ~ ~ ~ p=1.000 n=20
Memory Used 27,702k (± 0.02%) 27,695k (± 0.02%) ~ 27,680k 27,723k p=0.071 n=20
Memory Allocs 231,633 (± 0.05%) 231,624 (± 0.03%) ~ 231,365 232,136 p=0.546 n=20
Config Time 0.001s 0.001s ~ ~ ~ p=1.000 n=20
Parse Time 0.016s (± 3.73%) 0.017s (± 3.64%) ~ 0.015s 0.019s p=0.320 n=20
Bind Time 0.005s (±13.72%) 0.006s (±11.72%) ~ 0.004s 0.008s p=0.550 n=20
Check Time 0.015s (± 6.53%) 0.015s (± 7.09%) ~ 0.013s 0.021s p=0.285 n=20
Emit Time 0.013s (± 6.03%) 0.014s (± 6.70%) ~ 0.012s 0.019s p=0.106 n=20
Total Time 0.053s (± 1.36%) 0.053s (± 1.49%) ~ 0.050s 0.056s p=0.289 n=20
effect - native
Errors 12 12 ~ ~ ~ p=1.000 n=20
Symbols 1,234,348 1,234,257 -91 (- 0.01%) ~ ~ p=0.000 n=20
Types 892,415 892,036 -379 (- 0.04%) ~ ~ p=0.000 n=20
Memory Used 940,416k (± 0.01%) 940,293k (± 0.01%) ~ 939,746k 940,845k p=0.154 n=20
Memory Allocs 11,707,138 (± 0.05%) 11,702,541 (± 0.02%) ~ 11,696,659 11,714,407 p=0.245 n=20
Config Time 0.006s 0.006s ~ ~ ~ p=1.000 n=20
Parse Time 0.327s (± 1.19%) 0.333s (± 1.44%) +0.006s (+ 1.69%) 0.308s 0.352s p=0.036 n=20
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Check Time 1.809s (± 0.50%) 1.815s (± 0.46%) ~ 1.786s 1.850s p=0.245 n=20
Emit Time 0.983s (± 2.74%) 0.942s (± 3.24%) 🟩-0.045s (- 4.61%) 0.795s 1.058s p=0.021 n=20
Total Time 3.304s (± 0.71%) 3.268s (± 0.84%) -0.040s (- 1.21%) 3.131s 3.401s p=0.030 n=20
mui-docs - native
Errors 11,405 11,405 ~ ~ ~ p=1.000 n=20
Symbols 3,692,413 3,692,413 ~ ~ ~ p=1.000 n=20
Types 1,351,476 1,351,476 ~ ~ ~ p=1.000 n=20
Memory Used 1,652,680k (± 0.08%) 1,653,150k (± 0.07%) ~ 1,647,632k 1,657,774k p=0.701 n=20
Memory Allocs 24,329,441 (± 0.07%) 24,335,342 (± 0.07%) ~ 24,285,950 24,453,771 p=0.841 n=20
Config Time 0.016s (± 0.65%) 0.016s (± 1.21%) ~ 0.015s 0.016s p=0.090 n=20
Parse Time 0.543s (± 1.65%) 0.547s (± 1.67%) ~ 0.497s 0.584s p=0.522 n=20
Bind Time 0.002s (±14.85%) 0.003s (±14.20%) ~ 0.002s 0.005s p=0.518 n=20
Check Time 5.459s (± 0.52%) 5.453s (± 0.44%) ~ 5.372s 5.599s p=0.729 n=20
Emit Time 0.578s (± 5.47%) 0.607s (± 6.51%) ~ 0.490s 0.740s p=0.312 n=20
Total Time 7.543s (± 0.75%) 7.554s (± 0.57%) ~ 7.326s 7.665s p=0.927 n=20
sentry - native
Errors 1 1 ~ ~ ~ p=1.000 n=20
Symbols 4,781,608 4,781,644 +36 (+ 0.00%) ~ ~ p=0.000 n=20
Types 2,590,379 2,590,383 +4 (+ 0.00%) ~ ~ p=0.000 n=20
Memory Used 2,791,753k (± 0.02%) 2,791,287k (± 0.04%) ~ 2,788,728k 2,795,825k p=0.498 n=20
Memory Allocs 73,730,900 (± 0.06%) 73,759,283 (± 0.06%) ~ 73,627,973 73,952,465 p=0.475 n=20
Config Time 0.044s (± 0.65%) 0.044s (± 0.64%) ~ 0.043s 0.045s p=0.125 n=20
Parse Time 0.987s (± 1.86%) 0.967s (± 1.81%) ~ 0.911s 1.048s p=0.123 n=20
Bind Time 0.284s (± 9.81%) 0.330s (±10.67%) ~ 0.253s 0.462s p=0.055 n=20
Check Time 13.175s (± 0.39%) 13.145s (± 0.48%) ~ 12.932s 13.341s p=0.568 n=20
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Total Time 14.558s (± 0.36%) 14.558s (± 0.42%) ~ 14.402s 14.832s p=0.841 n=20
social-app - native
Errors 0 0 ~ ~ ~ p=1.000 n=20
Symbols 1,838,936 1,838,865 -71 (- 0.00%) ~ ~ p=0.000 n=20
Types 1,146,790 1,146,817 +27 (+ 0.00%) ~ ~ p=0.000 n=20
Memory Used 938,357k (± 0.02%) 938,452k (± 0.02%) ~ 937,721k 939,248k p=0.368 n=20
Memory Allocs 13,250,647 (± 0.14%) 13,264,222 (± 0.15%) ~ 13,207,898 13,367,157 p=0.202 n=20
Config Time 0.013s (± 1.45%) 0.013s (± 1.65%) ~ 0.013s 0.014s p=0.097 n=20
Parse Time 0.345s (± 2.45%) 0.340s (± 2.15%) ~ 0.322s 0.385s p=0.595 n=20
Bind Time 0.076s (± 6.28%) 0.080s (± 9.05%) ~ 0.066s 0.128s p=0.468 n=20
Check Time 2.877s (± 0.40%) 2.874s (± 0.44%) ~ 2.823s 2.911s p=0.869 n=20
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Total Time 3.334s (± 0.38%) 3.332s (± 0.38%) ~ 3.294s 3.398s p=0.985 n=20
strada-build-src - native
Errors 0 0 ~ ~ ~ p=1.000 n=20
Symbols 1,182,450 1,182,420 -30 (- 0.00%) ~ ~ p=0.000 n=20
Types 435,363 435,448 +85 (+ 0.02%) ~ ~ p=0.000 n=20
Memory Used 1,168,462k (± 0.38%) 1,170,213k (± 0.35%) ~ 1,158,461k 1,192,079k p=0.648 n=20
Memory Allocs 39,929,876 (± 0.07%) 39,945,734 (± 0.06%) ~ 39,837,085 40,046,437 p=0.674 n=20
Config Time 0.005s (± 7.47%) 0.005s (± 9.21%) ~ 0.003s 0.007s p=0.854 n=20
Parse Time 0.289s (± 1.72%) 0.288s (± 1.42%) ~ 0.267s 0.302s p=0.768 n=20
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Check Time 1.714s (± 0.38%) 1.714s (± 0.47%) ~ 1.680s 1.750s p=0.985 n=20
Emit Time 0.302s (± 2.49%) 0.300s (± 2.76%) ~ 0.268s 0.346s p=0.409 n=20
Total Time 20.471s (± 0.26%) 20.456s (± 0.24%) ~ 20.250s 20.660s p=0.756 n=20
strada-compiler - native
Errors 0 0 ~ ~ ~ p=1.000 n=20
Symbols 262,140 262,136 -4 (- 0.00%) ~ ~ p=0.000 n=20
Types 195,066 195,074 +8 (+ 0.00%) ~ ~ p=0.000 n=20
Memory Used 221,055k (± 0.02%) 221,407k (± 0.02%) +339k (+ 0.15%) 221,179k 221,593k p=0.000 n=20
Memory Allocs 1,885,083 (± 0.02%) 1,884,915 (± 0.02%) ~ 1,883,472 1,886,250 p=0.430 n=20
Config Time 0.001s 0.001s ~ ~ ~ p=1.000 n=20
Parse Time 0.103s (± 3.10%) 0.102s (± 3.47%) ~ 0.087s 0.114s p=0.330 n=20
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Check Time 0.834s (± 0.40%) 0.834s (± 0.54%) ~ 0.819s 0.852s p=0.674 n=20
Emit Time 0.090s (± 3.90%) 0.091s (± 3.98%) ~ 0.081s 0.105s p=0.498 n=20
Total Time 1.075s (± 0.51%) 1.076s (± 0.46%) ~ 1.054s 1.093s p=0.668 n=20
t3code-server - native
Errors 0 0 ~ ~ ~ p=1.000 n=20
Symbols 4,344,903 4,344,905 +2 (+ 0.00%) ~ ~ p=0.000 n=20
Types 3,038,847 3,038,855 +8 (+ 0.00%) ~ ~ p=0.000 n=20
Memory Used 2,392,274k (± 0.01%) 2,393,149k (± 0.02%) +818k (+ 0.03%) 2,392,040k 2,397,530k p=0.015 n=20
Memory Allocs 36,889,779 (± 0.03%) 36,897,107 (± 0.03%) ~ 36,845,098 36,948,349 p=0.064 n=20
Config Time 0.006s (± 2.52%) 0.006s (± 2.43%) ~ 0.005s 0.006s p=0.571 n=20
Parse Time 0.546s (± 2.43%) 0.548s (± 1.95%) ~ 0.489s 0.580s p=0.674 n=20
Bind Time 0.152s (±10.99%) 0.154s (± 9.51%) ~ 0.134s 0.235s p=0.956 n=20
Check Time 12.169s (± 0.36%) 12.181s (± 0.56%) ~ 11.942s 12.447s p=0.622 n=20
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Total Time 12.888s (± 0.38%) 12.906s (± 0.58%) ~ 12.654s 13.191s p=0.622 n=20
tanstack-router - native
Errors 0 3 🔻NaN (+ ∞%) ~ ~ p=0.000 n=20
Symbols 567,192 567,259 +67 (+ 0.01%) ~ ~ p=0.000 n=20
Types 395,857 395,492 -365 (- 0.09%) ~ ~ p=0.000 n=20
Memory Used 314,493k (± 0.01%) 310,972k (± 0.01%) -3,521k (- 1.12%) 310,846k 311,115k p=0.000 n=20
Memory Allocs 4,147,567 (± 0.08%) 3,964,204 (± 0.03%) 🟩-182,215 (- 4.39%) 3,959,926 3,968,847 p=0.000 n=20
Config Time 0.002s (± 5.35%) 0.002s ~ ~ ~ p=1.000 n=20
Parse Time 0.081s (± 3.90%) 0.082s (± 3.88%) ~ 0.070s 0.094s p=0.891 n=20
Bind Time 0.026s (±13.82%) 0.026s (±12.67%) ~ 0.020s 0.041s p=0.938 n=20
Check Time 1.008s (± 0.50%) 0.999s (± 0.67%) -0.009s (- 0.89%) 0.980s 1.027s p=0.048 n=20
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Total Time 1.143s (± 0.59%) 1.113s (± 0.47%) -0.030s (- 2.61%) 1.094s 1.132s p=0.000 n=20
ts-pre-modules - native
Errors 87 87 ~ ~ ~ p=1.000 n=20
Symbols 230,300 230,300 ~ ~ ~ p=1.000 n=20
Types 180,492 180,510 +18 (+ 0.01%) ~ ~ p=0.000 n=20
Memory Used 190,436k (± 0.02%) 190,413k (± 0.02%) ~ 190,272k 190,501k p=0.231 n=20
Memory Allocs 1,284,209 (± 0.01%) 1,284,329 (± 0.01%) ~ 1,283,836 1,285,126 p=0.245 n=20
Config Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Parse Time 0.070s (± 3.29%) 0.074s (± 3.07%) 🔻+0.003s (+ 4.65%) 0.065s 0.081s p=0.035 n=20
Bind Time 0.029s (± 8.27%) 0.027s (± 7.82%) ~ 0.021s 0.039s p=0.163 n=20
Check Time 0.535s (± 0.64%) 0.540s (± 0.66%) ~ 0.525s 0.558s p=0.169 n=20
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Total Time 0.646s (± 0.48%) 0.653s (± 0.67%) +0.006s (+ 0.93%) 0.637s 0.675s p=0.020 n=20
vscode - native
Errors 0 0 ~ ~ ~ p=1.000 n=20
Symbols 8,676,077 8,676,025 -52 (- 0.00%) ~ ~ p=0.000 n=20
Types 5,033,057 5,033,089 +32 (+ 0.00%) ~ ~ p=0.000 n=20
Memory Used 5,788,939k (± 0.01%) 5,789,008k (± 0.01%) ~ 5,786,171k 5,791,958k p=0.756 n=20
Memory Allocs 64,167,521 (± 0.01%) 64,183,525 (± 0.02%) +11,246 (+ 0.02%) 64,155,164 64,263,220 p=0.017 n=20
Config Time 0.046s (± 0.69%) 0.047s (± 0.50%) +0.000s (+ 0.00%) 0.046s 0.047s p=0.041 n=20
Parse Time 1.716s (± 1.60%) 1.750s (± 2.07%) ~ 1.589s 1.907s p=0.114 n=20
Bind Time 0.537s (± 8.91%) 0.519s (± 8.15%) ~ 0.461s 0.769s p=0.202 n=20
Check Time 13.679s (± 0.76%) 13.681s (± 0.61%) ~ 13.218s 13.947s p=0.985 n=20
Emit Time 4.483s (± 7.04%) 4.265s (± 7.25%) ~ 3.693s 5.518s p=0.294 n=20
Total Time 20.531s (± 1.41%) 20.329s (± 1.28%) ~ 19.818s 21.278s p=0.349 n=20
webpack - native
Errors 647 648 +1 (+ 0.15%) ~ ~ p=0.000 n=20
Symbols 920,711 920,708 -3 (- 0.00%) ~ ~ p=0.000 n=20
Types 627,543 627,609 +66 (+ 0.01%) ~ ~ p=0.000 n=20
Memory Used 741,902k (± 0.01%) 741,843k (± 0.01%) ~ 741,527k 742,186k p=0.330 n=20
Memory Allocs 6,369,272 (± 0.05%) 6,373,280 (± 0.08%) ~ 6,360,534 6,401,356 p=0.388 n=20
Config Time 0.007s (± 2.82%) 0.007s (± 3.43%) ~ 0.006s 0.007s p=0.351 n=20
Parse Time 0.241s (± 2.76%) 0.243s (± 2.32%) ~ 0.223s 0.270s p=0.546 n=20
Bind Time 0.073s (±12.51%) 0.068s (±11.39%) ~ 0.053s 0.101s p=0.467 n=20
Check Time 3.068s (± 0.30%) 3.067s (± 0.34%) ~ 3.023s 3.118s p=0.891 n=20
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Total Time 3.424s (± 0.40%) 3.420s (± 0.40%) ~ 3.351s 3.466s p=0.956 n=20
xstate-main - native
Errors 1 1 ~ ~ ~ p=1.000 n=20
Symbols 4,089,749 4,089,751 +2 (+ 0.00%) ~ ~ p=0.000 n=20
Types 4,206,415 4,206,420 +5 (+ 0.00%) ~ ~ p=0.000 n=20
Memory Used 2,246,760k (± 0.01%) 2,246,770k (± 0.01%) ~ 2,246,021k 2,247,490k p=0.841 n=20
Memory Allocs 45,020,531 (± 0.02%) 45,015,561 (± 0.01%) ~ 44,991,159 45,042,260 p=0.546 n=20
Config Time 0.004s (± 2.64%) 0.004s (± 3.68%) ~ 0.003s 0.004s p=0.414 n=20
Parse Time 0.201s (± 2.15%) 0.201s (± 1.76%) ~ 0.183s 0.214s p=0.829 n=20
Bind Time 0.063s (±11.80%) 0.058s (± 9.33%) ~ 0.049s 0.097s p=0.433 n=20
Check Time 8.435s (± 0.25%) 8.452s (± 0.28%) ~ 8.354s 8.565s p=0.349 n=20
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Total Time 8.711s (± 0.21%) 8.722s (± 0.27%) ~ 8.616s 8.836s p=0.452 n=20
System info unknown
Hosts
  • native
Scenarios
  • Compiler-Unions - native
  • angular-1 - native
  • arktype - native
  • class-transformer - native
  • effect - native
  • mui-docs - native
  • sentry - native
  • social-app - native
  • strada-build-src - native
  • strada-compiler - native
  • t3code-server - native
  • tanstack-router - native
  • ts-pre-modules - native
  • vscode - native
  • webpack - native
  • xstate-main - native
Benchmark Name Iterations
Current pr 20
Baseline baseline 20

Developer Information:

Download Benchmarks

@jakebailey

Copy link
Copy Markdown
Member

Looks like some new errors in those benchmarks.

@ahejlsberg

Copy link
Copy Markdown
Member Author

Jake Bailey (@jakebailey) It needed a merge from main.

@typescript-automation

Copy link
Copy Markdown
Contributor

Anders Hejlsberg (@ahejlsberg) Here are the results of running the top 400 repos with tsc comparing baseline and pr:

Everything looks good!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team For Milestone Bug PRs that fix a bug with a specific milestone

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

TS2322: const type parameter infers readonly [], rejected through a union return type (7.1.0-dev regression from typescript-go#4591)

3 participants