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

Allow getLiteralTypeFromProperty to extract name types from unions #60994

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bgenia
Copy link

@bgenia bgenia commented Jan 18, 2025

Fixes #41700

Test is implemented using quick info comparison because I didn't find any other way to verify mapped type members. There is probably a better way of doing this.

@typescript-bot typescript-bot added the For Backlog Bug PRs that fix a backlog bug label Jan 18, 2025
@jakebailey
Copy link
Member

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 18, 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
Collaborator

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

Everything looks the same!

You can check the log here.

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@typescript-bot
Copy link
Collaborator

@jakebailey
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,390 62,390 ~ ~ ~ p=1.000 n=6
Types 50,395 50,395 ~ ~ ~ p=1.000 n=6
Memory used 196,290k (± 0.78%) 195,564k (± 1.05%) ~ 192,854k 196,941k p=0.261 n=6
Parse Time 1.61s (± 0.72%) 1.62s (± 1.03%) ~ 1.60s 1.64s p=0.410 n=6
Bind Time 0.88s (± 1.18%) 0.88s (± 0.59%) ~ 0.87s 0.88s p=0.142 n=6
Check Time 11.76s (± 0.44%) 11.80s (± 0.41%) ~ 11.76s 11.86s p=0.141 n=6
Emit Time 3.32s (± 1.32%) 3.38s (± 3.52%) ~ 3.25s 3.57s p=0.936 n=6
Total Time 17.57s (± 0.27%) 17.68s (± 0.72%) ~ 17.57s 17.85s p=0.126 n=6
angular-1 - node (v18.15.0, x64)
Errors 37 37 ~ ~ ~ p=1.000 n=6
Symbols 947,969 947,969 ~ ~ ~ p=1.000 n=6
Types 410,955 410,955 ~ ~ ~ p=1.000 n=6
Memory used 1,225,672k (± 0.00%) 1,225,695k (± 0.01%) ~ 1,225,607k 1,225,837k p=0.575 n=6
Parse Time 6.65s (± 1.03%) 6.64s (± 1.00%) ~ 6.56s 6.71s p=1.000 n=6
Bind Time 1.90s (± 0.62%) 1.89s (± 0.52%) ~ 1.88s 1.90s p=0.314 n=6
Check Time 31.99s (± 0.39%) 32.02s (± 0.29%) ~ 31.91s 32.18s p=1.000 n=6
Emit Time 15.20s (± 0.37%) 15.18s (± 0.30%) ~ 15.13s 15.25s p=0.687 n=6
Total Time 55.74s (± 0.26%) 55.74s (± 0.23%) ~ 55.61s 55.98s p=0.810 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,444,602 2,444,602 ~ ~ ~ p=1.000 n=6
Types 896,634 896,634 ~ ~ ~ p=1.000 n=6
Memory used 2,305,841k (± 0.00%) 2,305,852k (± 0.00%) ~ 2,305,739k 2,305,926k p=0.810 n=6
Parse Time 10.73s (± 0.30%) 10.70s (± 0.50%) ~ 10.59s 10.73s p=0.331 n=6
Bind Time 2.51s (± 0.76%) 2.51s (± 0.42%) ~ 2.50s 2.53s p=0.744 n=6
Check Time 87.27s (± 1.01%) 87.07s (± 0.27%) ~ 86.84s 87.49s p=0.936 n=6
Emit Time 0.34s (± 3.22%) 0.34s (± 3.01%) ~ 0.33s 0.36s p=0.546 n=6
Total Time 100.85s (± 0.85%) 100.62s (± 0.23%) ~ 100.40s 101.07s p=0.936 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,228,459 1,228,460 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 266,873 266,873 ~ ~ ~ p=1.000 n=6
Memory used 2,360,296k (± 0.01%) 2,359,850k (± 0.02%) ~ 2,359,149k 2,360,545k p=0.066 n=6
Parse Time 5.15s (± 1.02%) 5.21s (± 1.23%) ~ 5.13s 5.29s p=0.149 n=6
Bind Time 1.78s (± 0.85%) 1.79s (± 1.36%) ~ 1.75s 1.81s p=0.464 n=6
Check Time 35.25s (± 0.30%) 35.27s (± 0.24%) ~ 35.19s 35.38s p=0.936 n=6
Emit Time 2.98s (± 1.15%) 3.04s (± 3.41%) ~ 2.98s 3.25s p=0.332 n=6
Total Time 45.17s (± 0.28%) 45.31s (± 0.23%) ~ 45.20s 45.48s p=0.066 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,228,459 1,228,460 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 266,873 266,873 ~ ~ ~ p=1.000 n=6
Memory used 2,427,695k (± 0.02%) 2,427,358k (± 0.02%) ~ 2,426,862k 2,428,124k p=0.199 n=6
Parse Time 5.46s (± 0.99%) 5.46s (± 0.76%) ~ 5.40s 5.53s p=0.873 n=6
Bind Time 1.78s (± 1.61%) 1.81s (± 0.97%) ~ 1.78s 1.83s p=0.119 n=6
Check Time 35.32s (± 0.15%) 35.27s (± 0.21%) ~ 35.20s 35.36s p=0.370 n=6
Emit Time 3.06s (± 0.45%) 3.03s (± 1.21%) ~ 2.99s 3.09s p=0.092 n=6
Total Time 45.62s (± 0.20%) 45.57s (± 0.21%) ~ 45.46s 45.73s p=0.336 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 262,628 262,629 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 106,697 106,697 ~ ~ ~ p=1.000 n=6
Memory used 440,570k (± 0.01%) 440,571k (± 0.00%) ~ 440,546k 440,591k p=0.810 n=6
Parse Time 2.89s (± 0.92%) 2.88s (± 0.61%) ~ 2.86s 2.91s p=0.624 n=6
Bind Time 1.11s (± 0.89%) 1.11s ~ ~ ~ p=1.000 n=6
Check Time 15.86s (± 0.34%) 15.78s (± 0.08%) -0.08s (- 0.50%) 15.76s 15.79s p=0.016 n=6
Emit Time 1.29s (± 1.34%) 1.28s (± 1.25%) ~ 1.27s 1.31s p=0.463 n=6
Total Time 21.14s (± 0.19%) 21.06s (± 0.14%) -0.09s (- 0.42%) 21.02s 21.10s p=0.010 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 70 70 ~ ~ ~ p=1.000 n=6
Symbols 226,095 226,095 ~ ~ ~ p=1.000 n=6
Types 94,488 94,488 ~ ~ ~ p=1.000 n=6
Memory used 371,880k (± 0.06%) 371,652k (± 0.01%) -228k (- 0.06%) 371,617k 371,689k p=0.013 n=6
Parse Time 2.90s (± 1.20%) 2.90s (± 1.08%) ~ 2.86s 2.94s p=0.568 n=6
Bind Time 1.60s (± 1.42%) 1.58s (± 1.48%) ~ 1.55s 1.62s p=0.414 n=6
Check Time 16.49s (± 0.40%) 16.48s (± 0.40%) ~ 16.40s 16.58s p=0.810 n=6
Emit Time 0.00s (±154.76%) 0.00s ~ ~ ~ p=0.174 n=6
Total Time 21.00s (± 0.27%) 20.96s (± 0.31%) ~ 20.86s 21.03s p=0.375 n=6
vscode - node (v18.15.0, x64)
Errors 3 3 ~ ~ ~ p=1.000 n=6
Symbols 3,251,957 3,251,957 ~ ~ ~ p=1.000 n=6
Types 1,119,191 1,119,191 ~ ~ ~ p=1.000 n=6
Memory used 3,317,079k (± 0.01%) 3,317,203k (± 0.01%) ~ 3,316,790k 3,317,576k p=0.471 n=6
Parse Time 14.24s (± 0.75%) 14.22s (± 0.49%) ~ 14.13s 14.28s p=0.872 n=6
Bind Time 4.59s (± 0.40%) 4.58s (± 0.51%) ~ 4.53s 4.59s p=0.491 n=6
Check Time 89.12s (± 2.33%) 88.72s (± 1.54%) ~ 87.51s 90.59s p=0.810 n=6
Emit Time 27.94s (± 8.45%) 28.37s (± 2.75%) ~ 27.59s 29.16s p=0.575 n=6
Total Time 135.89s (± 1.31%) 135.88s (± 0.84%) ~ 133.83s 137.07s p=0.810 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 291,595 291,595 ~ ~ ~ p=1.000 n=6
Types 118,971 118,971 ~ ~ ~ p=1.000 n=6
Memory used 445,380k (± 0.03%) 445,411k (± 0.03%) ~ 445,199k 445,525k p=0.689 n=6
Parse Time 5.12s (± 1.16%) 5.10s (± 1.20%) ~ 5.04s 5.19s p=0.688 n=6
Bind Time 2.22s (± 0.64%) 2.20s (± 0.89%) ~ 2.18s 2.23s p=0.168 n=6
Check Time 23.43s (± 1.43%) 23.32s (± 0.33%) ~ 23.18s 23.42s p=0.809 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 30.77s (± 1.10%) 30.63s (± 0.35%) ~ 30.46s 30.74s p=0.689 n=6
xstate-main - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 555,050 555,050 ~ ~ ~ p=1.000 n=6
Types 186,115 186,115 ~ ~ ~ p=1.000 n=6
Memory used 494,015k (± 0.02%) 494,017k (± 0.01%) ~ 493,956k 494,120k p=0.748 n=6
Parse Time 3.41s (± 0.32%) 3.41s (± 0.88%) ~ 3.37s 3.44s p=0.935 n=6
Bind Time 1.18s (± 0.69%) 1.19s (± 0.63%) ~ 1.18s 1.20s p=0.120 n=6
Check Time 19.61s (± 0.32%) 19.57s (± 0.15%) ~ 19.53s 19.62s p=0.193 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 24.20s (± 0.26%) 24.17s (± 0.20%) ~ 24.12s 24.25s p=0.328 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

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

Everything looks good!

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
Status: Not started
Development

Successfully merging this pull request may close these issues.

Partial of a mapped type from a union of enums fails when these enums have common members
3 participants