Skip to content

fix: property access on union types with generic conditionals with any#62467

Closed
mdm317 wants to merge 1 commit intomicrosoft:mainfrom
mdm317:fix-62466
Closed

fix: property access on union types with generic conditionals with any#62467
mdm317 wants to merge 1 commit intomicrosoft:mainfrom
mdm317:fix-62466

Conversation

@mdm317
Copy link
Copy Markdown

@mdm317 mdm317 commented Sep 19, 2025

Fixes #62466

@typescript-bot typescript-bot added the For Backlog Bug PRs that fix a backlog bug label Sep 19, 2025
@mdm317 mdm317 changed the title fix: property access on union types with generic conditionals fix: property access on union types with generic conditionals with any Sep 19, 2025
@RyanCavanaugh
Copy link
Copy Markdown
Member

@typescript-bot test it

@typescript-bot
Copy link
Copy Markdown
Collaborator

typescript-bot commented Sep 19, 2025

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
Copy Markdown
Collaborator

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

Everything looks the same!

You can check the log here.

@typescript-bot
Copy link
Copy Markdown
Collaborator

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

There were infrastructure failures potentially unrelated to your change:

  • 1 instance of "Git clone failed"

Otherwise...

Everything looks good!

@typescript-bot
Copy link
Copy Markdown
Collaborator

@RyanCavanaugh
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 34 34 ~ ~ ~ p=1.000 n=6
Symbols 62,370 62,370 ~ ~ ~ p=1.000 n=6
Types 50,386 50,386 ~ ~ ~ p=1.000 n=6
Memory used 193,394k (± 0.76%) 194,065k (± 0.93%) ~ 192,791k 196,450k p=0.378 n=6
Parse Time 1.30s (± 0.94%) 1.30s (± 0.31%) ~ 1.30s 1.31s p=0.109 n=6
Bind Time 0.72s 0.72s ~ ~ ~ p=1.000 n=6
Check Time 9.76s (± 0.56%) 9.73s (± 0.15%) ~ 9.71s 9.75s p=0.334 n=6
Emit Time 2.75s (± 0.93%) 2.75s (± 0.44%) ~ 2.74s 2.77s p=0.871 n=6
Total Time 14.53s (± 0.32%) 14.51s (± 0.15%) ~ 14.48s 14.54s p=0.573 n=6
angular-1 - node (v18.15.0, x64)
Errors 1 1 ~ ~ ~ p=1.000 n=6
Symbols 948,914 948,912 -2 (- 0.00%) ~ ~ p=0.001 n=6
Types 410,884 410,884 ~ ~ ~ p=1.000 n=6
Memory used 1,245,561k (± 0.00%) 1,245,555k (± 0.00%) ~ 1,245,510k 1,245,601k p=0.936 n=6
Parse Time 6.56s (± 0.83%) 6.58s (± 0.77%) ~ 6.51s 6.64s p=0.572 n=6
Bind Time 1.88s (± 0.27%) 1.88s (± 0.29%) ~ 1.87s 1.88s p=0.640 n=6
Check Time 32.12s (± 0.37%) 32.15s (± 0.33%) ~ 31.96s 32.23s p=0.873 n=6
Emit Time 14.81s (± 0.29%) 14.80s (± 0.51%) ~ 14.69s 14.88s p=1.000 n=6
Total Time 55.37s (± 0.21%) 55.40s (± 0.20%) ~ 55.27s 55.53s p=0.810 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,543,258 2,543,258 ~ ~ ~ p=1.000 n=6
Types 902,717 902,717 ~ ~ ~ p=1.000 n=6
Memory used 2,828,966k (± 0.00%) 2,829,120k (± 0.00%) +154k (+ 0.01%) 2,828,911k 2,829,207k p=0.031 n=6
Parse Time 8.75s (± 0.54%) 8.75s (± 0.62%) ~ 8.69s 8.82s p=1.000 n=6
Bind Time 2.20s (± 0.73%) 2.19s (± 0.88%) ~ 2.16s 2.22s p=0.625 n=6
Check Time 86.86s (± 1.27%) 87.38s (± 1.79%) ~ 86.41s 90.50s p=0.298 n=6
Emit Time 0.59s (±120.28%) 0.30s (± 1.79%) ~ 0.30s 0.31s p=0.663 n=6
Total Time 98.41s (± 1.05%) 98.63s (± 1.60%) ~ 97.71s 101.80s p=0.936 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,237,083 1,237,083 ~ ~ ~ p=1.000 n=6
Types 259,748 259,748 ~ ~ ~ p=1.000 n=6
Memory used 2,485,832k (±11.92%) 2,607,086k (±11.38%) ~ 2,364,319k 3,092,062k p=0.378 n=6
Parse Time 5.16s (± 0.82%) 5.16s (± 1.16%) ~ 5.09s 5.26s p=0.810 n=6
Bind Time 1.76s (± 0.76%) 1.79s (± 1.83%) ~ 1.75s 1.84s p=0.121 n=6
Check Time 35.12s (± 0.56%) 35.00s (± 0.82%) ~ 34.68s 35.48s p=0.298 n=6
Emit Time 3.01s (± 1.34%) 3.00s (± 1.06%) ~ 2.97s 3.06s p=0.575 n=6
Total Time 45.05s (± 0.48%) 44.95s (± 0.68%) ~ 44.68s 45.51s 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,237,083 1,237,083 ~ ~ ~ p=1.000 n=6
Types 259,748 259,748 ~ ~ ~ p=1.000 n=6
Memory used 3,159,833k (± 0.05%) 3,158,174k (± 0.02%) -1,660k (- 0.05%) 3,157,424k 3,159,279k p=0.031 n=6
Parse Time 6.84s (± 0.69%) 6.84s (± 0.60%) ~ 6.79s 6.89s p=1.000 n=6
Bind Time 2.16s (± 1.67%) 2.14s (± 1.04%) ~ 2.11s 2.16s p=0.121 n=6
Check Time 42.62s (± 0.39%) 42.57s (± 0.27%) ~ 42.43s 42.76s p=0.748 n=6
Emit Time 3.46s (± 2.77%) 3.54s (± 2.87%) ~ 3.40s 3.64s p=0.261 n=6
Total Time 55.08s (± 0.26%) 55.07s (± 0.34%) ~ 54.84s 55.35s p=0.936 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 262,423 262,423 ~ ~ ~ p=1.000 n=6
Types 103,918 103,918 ~ ~ ~ p=1.000 n=6
Memory used 440,526k (± 0.01%) 440,487k (± 0.00%) ~ 440,466k 440,514k p=0.093 n=6
Parse Time 4.35s (± 1.02%) 4.33s (± 0.65%) ~ 4.28s 4.36s p=0.418 n=6
Bind Time 1.63s (± 0.72%) 1.63s (± 0.50%) ~ 1.62s 1.64s p=0.315 n=6
Check Time 23.55s (± 0.44%) 23.47s (± 0.34%) ~ 23.37s 23.56s p=0.198 n=6
Emit Time 1.90s (± 0.61%) 1.89s (± 1.28%) ~ 1.86s 1.92s p=0.568 n=6
Total Time 31.43s (± 0.48%) 31.33s (± 0.28%) ~ 31.20s 31.41s p=0.149 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 72 72 ~ ~ ~ p=1.000 n=6
Symbols 225,367 225,367 ~ ~ ~ p=1.000 n=6
Types 94,290 94,290 ~ ~ ~ p=1.000 n=6
Memory used 370,064k (± 0.02%) 370,148k (± 0.05%) ~ 370,006k 370,499k p=0.689 n=6
Parse Time 3.53s (± 0.79%) 3.51s (± 1.21%) ~ 3.46s 3.57s p=0.470 n=6
Bind Time 1.96s (± 1.40%) 1.97s (± 0.75%) ~ 1.96s 1.99s p=0.225 n=6
Check Time 20.39s (± 0.24%) 20.40s (± 0.28%) ~ 20.33s 20.50s p=0.747 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 25.88s (± 0.23%) 25.89s (± 0.24%) ~ 25.82s 25.96s p=0.748 n=6
vscode - node (v18.15.0, x64)
Errors 1 1 ~ ~ ~ p=1.000 n=6
Symbols 3,880,234 3,880,234 ~ ~ ~ p=1.000 n=6
Types 1,221,282 1,221,282 ~ ~ ~ p=1.000 n=6
Memory used 3,697,367k (± 0.00%) 3,697,327k (± 0.00%) ~ 3,697,122k 3,697,566k p=0.688 n=6
Parse Time 18.71s (± 0.67%) 18.73s (± 0.32%) ~ 18.65s 18.82s p=0.810 n=6
Bind Time 6.05s (± 1.11%) 6.02s (± 0.66%) ~ 5.98s 6.09s p=0.336 n=6
Check Time 123.69s (± 3.86%) 125.17s (± 3.47%) ~ 121.13s 132.31s p=0.471 n=6
Emit Time 38.56s (± 8.63%) 39.69s (± 9.62%) ~ 37.07s 45.60s p=0.423 n=6
Total Time 187.01s (± 2.68%) 189.62s (± 2.42%) ~ 183.87s 194.29s p=0.336 n=6
webpack - node (v18.15.0, x64)
Errors 37 37 ~ ~ ~ p=1.000 n=6
Symbols 361,435 361,429 -6 (- 0.00%) ~ ~ p=0.001 n=6
Types 158,724 158,722 -2 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 515,839k (± 0.02%) 515,906k (± 0.02%) ~ 515,777k 516,104k p=0.378 n=6
Parse Time 4.43s (± 0.37%) 4.44s (± 0.34%) ~ 4.42s 4.46s p=0.088 n=6
Bind Time 1.92s (± 1.35%) 1.91s (± 2.44%) ~ 1.87s 1.99s p=0.629 n=6
Check Time 21.87s (± 0.40%) 21.86s (± 0.51%) ~ 21.69s 22.00s p=0.936 n=6
Emit Time 0.00s 0.00s (±154.76%) ~ 0.00s 0.01s p=0.174 n=6
Total Time 28.21s (± 0.26%) 28.22s (± 0.58%) ~ 27.99s 28.41s p=1.000 n=6
xstate-main - node (v18.15.0, x64)
Errors 30 30 ~ ~ ~ p=1.000 n=6
Symbols 672,791 672,791 ~ ~ ~ p=1.000 n=6
Types 201,962 201,962 ~ ~ ~ p=1.000 n=6
Memory used 574,863k (± 0.02%) 574,939k (± 0.02%) ~ 574,721k 575,009k p=0.092 n=6
Parse Time 4.15s (± 0.91%) 4.19s (± 0.92%) ~ 4.14s 4.25s p=0.092 n=6
Bind Time 1.34s (± 1.61%) 1.32s (± 1.59%) ~ 1.30s 1.35s p=0.105 n=6
Check Time 20.63s (± 1.92%) 20.41s (± 1.60%) ~ 20.21s 21.07s p=0.422 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 26.13s (± 1.55%) 25.93s (± 1.25%) ~ 25.75s 26.58s p=0.810 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
Copy Markdown
Collaborator

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

Everything looks good!

@mdm317 mdm317 marked this pull request as ready for review September 20, 2025 07:34
@typescript-bot
Copy link
Copy Markdown
Collaborator

With 6.0 out as the final release vehicle for this codebase, we're closing all PRs that don't fit the merge criteria for post-6.0 patches. If you think this was a mistake and this PR fits the post-6.0 patch criteria, please post to the 6.0 iteration issue with details (specifically, which PR and which patch criteria it satisfies).

Next steps for PRs:

  • For crash bugfixes or language service improvements, PRs are currently accepted at the typescript-go repo
  • Changes to type system behavior should wait until after 7.0, at which point mainline TypeScript development will resume in this repository with the Go codebase
  • Library file updates (lib.d.ts etc) continue to live in this repo or the DOM Generator repo as appropriate

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

Labels

For Backlog Bug PRs that fix a backlog bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Common fields of union not resolved for generic conditional with any branch

3 participants