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

Only pad initializer types for parameters without annotations and contextual signatures #59975

Conversation

Andarist
Copy link
Contributor

fixes #59936

@jakebailey
Copy link
Member

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 16, 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

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
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 30 30 ~ ~ ~ p=1.000 n=6
Symbols 62,153 62,153 ~ ~ ~ p=1.000 n=6
Types 50,242 50,242 ~ ~ ~ p=1.000 n=6
Memory used 192,447k (± 0.02%) 193,038k (± 0.80%) ~ 192,392k 196,196k p=0.298 n=6
Parse Time 1.30s (± 1.34%) 1.30s (± 1.02%) ~ 1.29s 1.32s p=0.454 n=6
Bind Time 0.71s 0.71s ~ ~ ~ p=1.000 n=6
Check Time 9.57s (± 0.57%) 9.57s (± 0.36%) ~ 9.52s 9.61s p=0.936 n=6
Emit Time 2.73s (± 0.93%) 2.72s (± 0.83%) ~ 2.68s 2.74s p=0.291 n=6
Total Time 14.32s (± 0.37%) 14.29s (± 0.37%) ~ 14.19s 14.34s p=0.744 n=6
angular-1 - node (v18.15.0, x64)
Errors 7 7 ~ ~ ~ p=1.000 n=6
Symbols 945,753 945,753 ~ ~ ~ p=1.000 n=6
Types 410,067 410,067 ~ ~ ~ p=1.000 n=6
Memory used 1,222,739k (± 0.00%) 1,222,741k (± 0.00%) ~ 1,222,694k 1,222,786k p=0.936 n=6
Parse Time 6.65s (± 0.49%) 6.69s (± 0.61%) ~ 6.64s 6.76s p=0.091 n=6
Bind Time 1.86s (± 0.48%) 1.86s (± 0.40%) ~ 1.85s 1.87s p=0.798 n=6
Check Time 31.13s (± 0.25%) 31.21s (± 0.37%) ~ 31.02s 31.35s p=0.199 n=6
Emit Time 15.07s (± 0.65%) 15.05s (± 0.39%) ~ 14.98s 15.12s p=0.873 n=6
Total Time 54.71s (± 0.29%) 54.81s (± 0.31%) ~ 54.61s 55.10s p=0.630 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,520,527 2,520,527 ~ ~ ~ p=1.000 n=6
Types 935,974 935,974 ~ ~ ~ p=1.000 n=6
Memory used 2,350,349k (± 0.00%) 2,350,394k (± 0.00%) +44k (+ 0.00%) 2,350,365k 2,350,418k p=0.037 n=6
Parse Time 9.27s (± 0.33%) 9.28s (± 0.35%) ~ 9.26s 9.33s p=0.571 n=6
Bind Time 2.14s (± 0.57%) 2.14s (± 0.69%) ~ 2.13s 2.16s p=0.391 n=6
Check Time 72.96s (± 0.52%) 73.34s (± 0.52%) ~ 72.62s 73.77s p=0.173 n=6
Emit Time 0.27s (± 2.98%) 0.28s (± 2.70%) ~ 0.27s 0.29s p=0.383 n=6
Total Time 84.64s (± 0.43%) 85.05s (± 0.43%) ~ 84.35s 85.44s p=0.149 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,245,952 1,245,953 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 264,213 264,212 -1 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 2,398,376k (± 0.03%) 2,397,621k (± 0.01%) -754k (- 0.03%) 2,397,327k 2,397,900k p=0.045 n=6
Parse Time 5.09s (± 0.64%) 5.11s (± 0.86%) ~ 5.03s 5.15s p=0.378 n=6
Bind Time 1.92s (± 0.33%) 1.92s (± 0.79%) ~ 1.90s 1.94s p=0.391 n=6
Check Time 34.74s (± 0.22%) 34.70s (± 0.54%) ~ 34.51s 34.97s p=0.873 n=6
Emit Time 3.03s (± 4.52%) 3.03s (± 2.92%) ~ 2.97s 3.21s p=0.872 n=6
Total Time 44.79s (± 0.36%) 44.77s (± 0.46%) ~ 44.58s 45.09s p=0.810 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,245,952 1,245,953 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 264,213 264,212 -1 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 2,471,829k (± 0.03%) 2,497,709k (± 2.54%) ~ 2,471,133k 2,627,420k p=0.689 n=6
Parse Time 6.35s (± 0.76%) 6.34s (± 0.66%) ~ 6.30s 6.41s p=0.689 n=6
Bind Time 2.05s (± 0.62%) 2.05s (± 0.65%) ~ 2.03s 2.07s p=0.935 n=6
Check Time 41.34s (± 0.75%) 41.48s (± 0.67%) ~ 41.25s 41.96s p=0.261 n=6
Emit Time 3.69s (± 3.14%) 3.69s (± 3.74%) ~ 3.55s 3.88s p=0.936 n=6
Total Time 53.46s (± 0.70%) 53.57s (± 0.42%) ~ 53.27s 53.95s p=0.298 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 259,885 259,886 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 106,140 106,139 -1 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 435,604k (± 0.01%) 435,589k (± 0.01%) ~ 435,507k 435,656k p=0.689 n=6
Parse Time 3.42s (± 0.67%) 3.43s (± 0.50%) ~ 3.41s 3.45s p=0.415 n=6
Bind Time 1.28s (± 1.35%) 1.30s (± 0.76%) +0.02s (+ 1.56%) 1.28s 1.31s p=0.037 n=6
Check Time 18.14s (± 0.19%) 18.17s (± 0.47%) ~ 18.04s 18.24s p=0.421 n=6
Emit Time 1.50s (± 1.72%) 1.53s (± 1.62%) ~ 1.50s 1.56s p=0.126 n=6
Total Time 24.34s (± 0.12%) 24.43s (± 0.29%) +0.09s (+ 0.37%) 24.31s 24.50s p=0.045 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 68 68 ~ ~ ~ p=1.000 n=6
Symbols 225,018 225,018 ~ ~ ~ p=1.000 n=6
Types 94,249 94,249 ~ ~ ~ p=1.000 n=6
Memory used 370,261k (± 0.02%) 370,258k (± 0.01%) ~ 370,203k 370,316k p=0.936 n=6
Parse Time 2.76s (± 0.85%) 2.77s (± 0.99%) ~ 2.72s 2.80s p=1.000 n=6
Bind Time 1.57s (± 0.66%) 1.57s (± 0.77%) ~ 1.56s 1.59s p=0.735 n=6
Check Time 15.74s (± 0.18%) 15.77s (± 0.28%) ~ 15.71s 15.83s p=0.259 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 20.08s (± 0.23%) 20.11s (± 0.24%) ~ 20.05s 20.17s p=0.470 n=6
vscode - node (v18.15.0, x64)
Errors 1 1 ~ ~ ~ p=1.000 n=6
Symbols 3,067,616 3,067,616 ~ ~ ~ p=1.000 n=6
Types 1,059,253 1,059,253 ~ ~ ~ p=1.000 n=6
Memory used 3,173,074k (± 0.00%) 3,173,005k (± 0.00%) ~ 3,172,962k 3,173,069k p=0.066 n=6
Parse Time 13.94s (± 0.29%) 13.95s (± 0.26%) ~ 13.92s 14.02s p=0.747 n=6
Bind Time 4.38s (± 1.98%) 4.38s (± 1.80%) ~ 4.34s 4.54s p=1.000 n=6
Check Time 81.62s (± 0.29%) 81.40s (± 0.32%) ~ 80.99s 81.63s p=0.173 n=6
Emit Time 22.22s (± 0.50%) 22.17s (± 0.46%) ~ 22.07s 22.31s p=0.423 n=6
Total Time 122.16s (± 0.23%) 121.90s (± 0.28%) ~ 121.35s 122.21s p=0.092 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 277,156 277,156 ~ ~ ~ p=1.000 n=6
Types 112,946 112,946 ~ ~ ~ p=1.000 n=6
Memory used 426,997k (± 0.03%) 426,880k (± 0.03%) ~ 426,728k 427,022k p=0.128 n=6
Parse Time 4.90s (± 0.61%) 4.90s (± 0.36%) ~ 4.88s 4.93s p=0.570 n=6
Bind Time 2.15s (± 0.81%) 2.13s (± 0.64%) ~ 2.11s 2.15s p=0.192 n=6
Check Time 21.81s (± 0.61%) 21.71s (± 0.23%) ~ 21.63s 21.76s p=0.173 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 28.85s (± 0.46%) 28.74s (± 0.21%) ~ 28.67s 28.81s p=0.173 n=6
xstate-main - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 531,582 531,582 ~ ~ ~ p=1.000 n=6
Types 181,676 181,676 ~ ~ ~ p=1.000 n=6
Memory used 463,742k (± 0.03%) 463,699k (± 0.01%) ~ 463,620k 463,792k p=0.810 n=6
Parse Time 3.13s (± 0.60%) 3.11s (± 0.84%) ~ 3.08s 3.15s p=0.295 n=6
Bind Time 1.11s (± 0.46%) 1.11s (± 0.37%) ~ 1.11s 1.12s p=0.595 n=6
Check Time 18.20s (± 0.22%) 18.21s (± 0.40%) ~ 18.08s 18.27s p=0.335 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 22.43s (± 0.17%) 22.44s (± 0.23%) ~ 22.35s 22.50s p=0.809 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 user tests with tsc comparing main and refs/pull/59975/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@Andarist Andarist changed the title Only pad initializer types for parameters without annotations Only pad initializer types for parameters without annotations and contextual signatures Sep 17, 2024
@jakebailey
Copy link
Member

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 24, 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

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
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 30 30 ~ ~ ~ p=1.000 n=6
Symbols 62,340 62,340 ~ ~ ~ p=1.000 n=6
Types 50,378 50,378 ~ ~ ~ p=1.000 n=6
Memory used 193,855k (± 0.94%) 193,860k (± 0.94%) ~ 192,651k 196,251k p=1.000 n=6
Parse Time 1.95s (± 0.60%) 1.95s (± 0.75%) ~ 1.94s 1.98s p=1.000 n=6
Bind Time 1.06s (± 1.10%) 1.06s (± 0.77%) ~ 1.05s 1.07s p=1.000 n=6
Check Time 14.01s (± 0.45%) 13.97s (± 0.34%) ~ 13.91s 14.03s p=0.419 n=6
Emit Time 4.02s (± 4.01%) 4.01s (± 1.53%) ~ 3.89s 4.07s p=0.332 n=6
Total Time 21.05s (± 0.72%) 20.99s (± 0.52%) ~ 20.80s 21.11s p=0.689 n=6
angular-1 - node (v18.15.0, x64)
Errors 7 7 ~ ~ ~ p=1.000 n=6
Symbols 947,102 947,102 ~ ~ ~ p=1.000 n=6
Types 410,738 410,738 ~ ~ ~ p=1.000 n=6
Memory used 1,223,989k (± 0.00%) 1,224,019k (± 0.00%) ~ 1,223,972k 1,224,056k p=0.078 n=6
Parse Time 6.60s (± 0.48%) 6.62s (± 0.71%) ~ 6.56s 6.69s p=0.739 n=6
Bind Time 1.87s (± 0.22%) 1.87s (± 0.28%) ~ 1.86s 1.87s p=0.595 n=6
Check Time 31.30s (± 0.25%) 31.27s (± 0.41%) ~ 31.08s 31.40s p=0.810 n=6
Emit Time 15.02s (± 0.46%) 15.04s (± 0.52%) ~ 14.98s 15.17s p=0.810 n=6
Total Time 54.79s (± 0.20%) 54.80s (± 0.22%) ~ 54.64s 54.93s p=0.936 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,521,651 2,521,651 ~ ~ ~ p=1.000 n=6
Types 936,037 936,037 ~ ~ ~ p=1.000 n=6
Memory used 2,351,790k (± 0.00%) 2,351,782k (± 0.00%) ~ 2,351,744k 2,351,842k p=0.873 n=6
Parse Time 11.03s (± 0.31%) 11.00s (± 0.30%) ~ 10.96s 11.05s p=0.226 n=6
Bind Time 2.56s (± 0.20%) 2.56s (± 0.40%) ~ 2.54s 2.57s p=0.242 n=6
Check Time 86.81s (± 0.35%) 86.70s (± 0.61%) ~ 86.27s 87.64s p=0.378 n=6
Emit Time 0.33s (± 2.50%) 0.33s (± 2.45%) ~ 0.32s 0.34s p=0.204 n=6
Total Time 100.73s (± 0.32%) 100.59s (± 0.51%) ~ 100.16s 101.50s p=0.378 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,250,019 1,250,020 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 264,952 264,951 -1 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 2,464,636k (± 5.96%) 2,464,033k (± 5.94%) ~ 2,403,129k 2,763,190k p=0.298 n=6
Parse Time 7.69s (± 0.93%) 7.64s (± 0.66%) ~ 7.58s 7.72s p=0.173 n=6
Bind Time 2.80s (± 0.79%) 2.81s (± 0.32%) ~ 2.80s 2.82s p=0.934 n=6
Check Time 51.34s (± 1.34%) 51.11s (± 0.75%) ~ 50.63s 51.59s p=0.378 n=6
Emit Time 4.34s (± 2.21%) 4.39s (± 1.54%) ~ 4.33s 4.52s p=0.936 n=6
Total Time 66.19s (± 1.12%) 65.95s (± 0.56%) ~ 65.46s 66.41s p=0.471 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,250,019 1,250,020 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 264,952 264,951 -1 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 2,478,650k (± 0.02%) 2,479,554k (± 0.03%) +904k (+ 0.04%) 2,478,444k 2,480,532k p=0.045 n=6
Parse Time 7.91s (± 0.53%) 7.87s (± 0.47%) ~ 7.83s 7.93s p=0.109 n=6
Bind Time 2.56s (± 0.32%) 2.54s (± 0.60%) ~ 2.53s 2.57s p=0.086 n=6
Check Time 51.74s (± 0.61%) 51.39s (± 0.68%) ~ 50.92s 51.93s p=0.128 n=6
Emit Time 4.37s (± 1.49%) 4.45s (± 4.02%) ~ 4.24s 4.73s p=0.423 n=6
Total Time 66.56s (± 0.60%) 66.27s (± 0.39%) ~ 66.01s 66.72s p=0.128 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 260,921 260,922 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Types 106,369 106,368 -1 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 436,555k (± 0.02%) 436,576k (± 0.03%) ~ 436,414k 436,832k p=1.000 n=6
Parse Time 4.24s (± 0.82%) 4.27s (± 0.64%) ~ 4.23s 4.29s p=0.191 n=6
Bind Time 1.60s (± 0.64%) 1.60s (± 0.85%) ~ 1.57s 1.61s p=0.591 n=6
Check Time 22.47s (± 0.33%) 22.42s (± 0.35%) ~ 22.31s 22.51s p=0.228 n=6
Emit Time 1.86s (± 1.16%) 1.86s (± 1.38%) ~ 1.82s 1.90s p=0.803 n=6
Total Time 30.18s (± 0.28%) 30.14s (± 0.31%) ~ 29.97s 30.25s p=0.810 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 68 68 ~ ~ ~ p=1.000 n=6
Symbols 225,916 225,916 ~ ~ ~ p=1.000 n=6
Types 94,414 94,414 ~ ~ ~ p=1.000 n=6
Memory used 370,882k (± 0.04%) 370,872k (± 0.02%) ~ 370,784k 370,931k p=0.630 n=6
Parse Time 3.43s (± 0.57%) 3.42s (± 0.57%) ~ 3.41s 3.46s p=0.418 n=6
Bind Time 1.92s (± 0.99%) 1.94s (± 1.51%) ~ 1.92s 1.99s p=0.220 n=6
Check Time 19.43s (± 0.36%) 19.49s (± 0.28%) ~ 19.43s 19.57s p=0.229 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 24.78s (± 0.27%) 24.86s (± 0.23%) +0.08s (+ 0.32%) 24.78s 24.92s p=0.045 n=6
vscode - node (v18.15.0, x64)
Errors 1 1 ~ ~ ~ p=1.000 n=6
Symbols 3,099,752 3,099,752 ~ ~ ~ p=1.000 n=6
Types 1,068,967 1,068,967 ~ ~ ~ p=1.000 n=6
Memory used 3,196,800k (± 0.00%) 3,196,763k (± 0.00%) ~ 3,196,713k 3,196,826k p=0.230 n=6
Parse Time 13.94s (± 0.32%) 13.96s (± 0.40%) ~ 13.90s 14.06s p=1.000 n=6
Bind Time 4.45s (± 2.44%) 4.38s (± 0.53%) ~ 4.35s 4.42s p=0.167 n=6
Check Time 82.30s (± 0.41%) 82.45s (± 0.47%) ~ 81.97s 83.05s p=0.575 n=6
Emit Time 22.39s (± 0.25%) 22.45s (± 0.31%) ~ 22.37s 22.54s p=0.199 n=6
Total Time 123.07s (± 0.32%) 123.24s (± 0.31%) ~ 122.71s 123.75s p=0.521 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 278,920 278,920 ~ ~ ~ p=1.000 n=6
Types 113,837 113,837 ~ ~ ~ p=1.000 n=6
Memory used 428,415k (± 0.02%) 428,373k (± 0.02%) ~ 428,278k 428,512k p=0.471 n=6
Parse Time 4.89s (± 0.29%) 4.90s (± 0.71%) ~ 4.84s 4.93s p=0.331 n=6
Bind Time 2.13s (± 1.06%) 2.13s (± 1.17%) ~ 2.09s 2.16s p=1.000 n=6
Check Time 21.84s (± 0.51%) 21.82s (± 0.47%) ~ 21.64s 21.95s p=0.809 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 28.85s (± 0.36%) 28.85s (± 0.39%) ~ 28.69s 29.02s p=1.000 n=6
xstate-main - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 540,027 540,027 ~ ~ ~ p=1.000 n=6
Types 181,292 181,292 ~ ~ ~ p=1.000 n=6
Memory used 483,493k (± 0.01%) 483,511k (± 0.01%) ~ 483,479k 483,552k p=0.689 n=6
Parse Time 4.01s (± 0.20%) 4.01s (± 0.27%) ~ 4.00s 4.03s p=0.666 n=6
Bind Time 1.42s (± 0.82%) 1.42s (± 1.33%) ~ 1.40s 1.45s p=1.000 n=6
Check Time 22.88s (± 0.33%) 22.81s (± 0.39%) ~ 22.66s 22.92s p=0.227 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 28.31s (± 0.25%) 28.24s (± 0.35%) ~ 28.10s 28.39s p=0.230 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 user tests with tsc comparing main and refs/pull/59975/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@jakebailey
Copy link
Member

Maybe I'm misunderstanding it, but isn't this sorta kinda a revert of #59183 but only in the parameter case? Is this too targeted? Or am I misunderstanding?

I do want to make progress on this and #59924 to fix the regressions, though.

@jakebailey
Copy link
Member

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 25, 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 Sep 25, 2024

Hey @jakebailey, 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/163707/artifacts?artifactName=tgz&fileId=47229EAAA24F14EBCB7C609277AE51963A02A909545BDE010EE6663B7DF70E1802&fileName=/typescript-5.7.0-insiders.20240925.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/[email protected]".;

@Andarist
Copy link
Contributor Author

Maybe I'm misunderstanding it, but isn't this sorta kinda a revert of #59183 but only in the parameter case? Is this too targeted? Or am I misunderstanding?

It's not a revert. Previously object literal types were contextually-typed by their corresponding patterns.

So in a situation like this:

function test({ a = 1 } = {}) {}

The type of this {} ended up to be { a?: number }. Since #59183 that's no longer the case - its type stays as {}. This fact/difference isn't particularly observable to the user but the signature computed based on it can be quite different. The signature is meant to be (_: { a?: number }) => void.

Since the type of the initializer expressions changed in #59183, Anders introduced "object padding" for those initializer types - a way to go from the initializer type to a parameter type using the available binding pattern information. Such mechanism was already used for tuple types. So this was a way to unify the algorithm for both object and array patterns in parameter positions.

That new object padding introduced regressions but only because it didn't cover some cases (see #59924 ) and because it's too eager in some other cases (like this one here).

TLDR: it's not a revert, it's just an extension of those changes

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: Done
Development

Successfully merging this pull request may close these issues.

Binding element incorrectly reported as having any type in JS with JSDoc starting with 5.6.2
3 participants