Skip to content

Conversation

@Andarist
Copy link
Contributor

fixes#60789

@typescript-bottypescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Dec 17, 2024
@gabritto
Copy link
Member

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 17, 2024

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

CommandStatusResults
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/60795/merge:

Everything looks good!

@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
MetricbaselineprDeltaBestWorstp-value
Compiler-Unions - node (v18.15.0, x64)
Errors3434~~~p=1.000 n=6
Symbols62,36362,363~~~p=1.000 n=6
Types50,39550,395~~~p=1.000 n=6
Memory used193,677k (± 0.76%)193,082k (± 0.07%)~193,008k193,350kp=1.000 n=6
Parse Time1.31s (± 0.57%)1.30s (± 0.97%)~1.29s1.32sp=0.115 n=6
Bind Time0.72s0.72s~~~p=1.000 n=6
Check Time9.76s (± 0.45%)9.78s (± 0.26%)~9.76s9.83sp=0.373 n=6
Emit Time2.72s (± 1.49%)2.73s (± 0.51%)~2.70s2.74sp=0.565 n=6
Total Time14.51s (± 0.43%)14.53s (± 0.16%)~14.50s14.56sp=0.936 n=6
angular-1 - node (v18.15.0, x64)
Errors3737~~~p=1.000 n=6
Symbols947,936947,936~~~p=1.000 n=6
Types410,955410,955~~~p=1.000 n=6
Memory used1,225,832k (± 0.00%)1,225,817k (± 0.00%)~1,225,759k1,225,866kp=0.575 n=6
Parse Time6.66s (± 0.69%)6.64s (± 0.51%)~6.60s6.68sp=0.468 n=6
Bind Time1.88s (± 0.29%)1.89s (± 0.22%)~1.88s1.89sp=0.282 n=6
Check Time31.90s (± 0.27%)31.97s (± 0.23%)~31.85s32.04sp=0.173 n=6
Emit Time15.18s (± 0.62%)15.19s (± 0.35%)~15.12s15.24sp=0.747 n=6
Total Time55.63s (± 0.17%)55.69s (± 0.20%)~55.53s55.84sp=0.336 n=6
mui-docs - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols2,448,6172,448,617~~~p=1.000 n=6
Types896,282896,282~~~p=1.000 n=6
Memory used2,320,401k (± 0.00%)2,320,426k (± 0.00%)~2,320,369k2,320,464kp=0.173 n=6
Parse Time9.40s (± 0.16%)9.41s (± 0.25%)~9.37s9.43sp=0.566 n=6
Bind Time2.24s (± 0.36%)2.25s (± 0.24%)~2.24s2.25sp=0.441 n=6
Check Time73.44s (± 0.63%)73.43s (± 0.42%)~73.04s73.81sp=0.810 n=6
Emit Time0.28s (± 2.26%)0.29s (± 2.85%)~0.28s0.30sp=0.177 n=6
Total Time85.37s (± 0.55%)85.37s (± 0.35%)~84.99s85.74sp=0.810 n=6
self-build-src - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,225,3901,225,392+2 (+ 0.00%)~~p=0.001 n=6
Types266,584266,584~~~p=1.000 n=6
Memory used2,475,670k (± 7.59%)2,354,436k (± 0.03%)~2,353,546k2,355,328kp=0.575 n=6
Parse Time5.25s (± 1.45%)5.23s (± 0.42%)~5.20s5.26sp=0.518 n=6
Bind Time1.78s (± 0.98%)1.78s (± 1.12%)~1.76s1.81sp=1.000 n=6
Check Time35.10s (± 0.63%)35.26s (± 0.38%)~35.08s35.44sp=0.173 n=6
Emit Time2.95s (± 2.48%)2.97s (± 1.51%)~2.90s3.04sp=0.421 n=6
Total Time45.08s (± 0.47%)45.25s (± 0.37%)~45.06s45.49sp=0.128 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,225,3901,225,392+2 (+ 0.00%)~~p=0.001 n=6
Types266,584266,584~~~p=1.000 n=6
Memory used3,029,128k (± 9.76%)2,908,581k (±12.86%)~2,424,626k3,150,792kp=1.000 n=6
Parse Time7.00s (± 1.38%)6.95s (± 1.77%)~6.77s7.11sp=0.575 n=6
Bind Time2.14s (± 1.71%)2.15s (± 1.33%)~2.10s2.19sp=0.806 n=6
Check Time42.90s (± 0.49%)42.83s (± 0.80%)~42.36s43.28sp=0.748 n=6
Emit Time3.49s (± 1.80%)3.45s (± 2.27%)~3.37s3.56sp=0.298 n=6
Total Time55.53s (± 0.51%)55.37s (± 0.84%)~54.66s55.88sp=0.575 n=6
self-compiler - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols262,278262,280+2 (+ 0.00%)~~p=0.001 n=6
Types106,628106,628~~~p=1.000 n=6
Memory used439,877k (± 0.01%)439,917k (± 0.01%)~439,864k440,027kp=0.298 n=6
Parse Time3.53s (± 1.21%)3.53s (± 0.97%)~3.47s3.57sp=0.517 n=6
Bind Time1.32s (± 0.39%)1.32s (± 0.96%)~1.31s1.34sp=0.931 n=6
Check Time18.96s (± 0.44%)18.94s (± 0.37%)~18.82s19.03sp=0.809 n=6
Emit Time1.53s (± 0.99%)1.53s (± 0.76%)~1.52s1.55sp=0.868 n=6
Total Time25.33s (± 0.32%)25.32s (± 0.39%)~25.20s25.45sp=0.936 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors7070~~~p=1.000 n=6
Symbols226,062226,062~~~p=1.000 n=6
Types94,48894,488~~~p=1.000 n=6
Memory used371,644k (± 0.03%)371,606k (± 0.01%)~371,562k371,652kp=0.936 n=6
Parse Time2.89s (± 0.58%)2.89s (± 0.60%)~2.87s2.92sp=0.867 n=6
Bind Time1.58s (± 0.48%)1.58s (± 1.86%)~1.54s1.63sp=0.620 n=6
Check Time16.49s (± 0.22%)16.51s (± 0.63%)~16.38s16.65sp=1.000 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time20.96s (± 0.20%)20.99s (± 0.43%)~20.84s21.09sp=0.518 n=6
vscode - node (v18.15.0, x64)
Errors33~~~p=1.000 n=6
Symbols3,220,1083,220,108~~~p=1.000 n=6
Types1,107,8481,107,853+5 (+ 0.00%)~~p=0.001 n=6
Memory used3,286,380k (± 0.01%)3,286,563k (± 0.01%)~3,286,129k3,286,945kp=0.298 n=6
Parse Time14.19s (± 0.36%)14.19s (± 0.80%)~14.06s14.37sp=0.873 n=6
Bind Time4.55s (± 1.41%)4.54s (± 0.85%)~4.48s4.60sp=0.683 n=6
Check Time87.63s (± 1.35%)86.93s (± 0.28%)~86.71s87.28sp=0.128 n=6
Emit Time28.40s (± 1.86%)28.28s (± 2.65%)~27.40s29.29sp=0.689 n=6
Total Time134.78s (± 0.97%)133.94s (± 0.65%)~132.81s135.11sp=0.298 n=6
webpack - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols291,463291,463~~~p=1.000 n=6
Types118,920118,920~~~p=1.000 n=6
Memory used445,205k (± 0.03%)445,107k (± 0.02%)~445,009k445,211kp=0.230 n=6
Parse Time4.09s (± 1.02%)4.09s (± 1.15%)~4.04s4.16sp=1.000 n=6
Bind Time1.78s (± 1.20%)1.78s (± 0.68%)~1.76s1.79sp=0.622 n=6
Check Time18.77s (± 0.38%)18.72s (± 0.65%)~18.50s18.83sp=0.748 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time24.64s (± 0.35%)24.59s (± 0.58%)~24.33s24.72sp=0.688 n=6
xstate-main - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols552,233552,233~~~p=1.000 n=6
Types184,971184,971~~~p=1.000 n=6
Memory used492,401k (± 0.00%)492,387k (± 0.01%)~492,343k492,473kp=0.378 n=6
Parse Time3.43s (± 0.93%)3.42s (± 0.73%)~3.40s3.46sp=0.570 n=6
Bind Time1.18s (± 0.99%)1.17s (± 0.88%)~1.15s1.18sp=0.117 n=6
Check Time19.45s (± 0.36%)19.42s (± 0.42%)~19.32s19.52sp=0.574 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time24.06s (± 0.21%)24.01s (± 0.30%)~23.93s24.13sp=0.261 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)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

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/60795/merge:

Everything looks good!

@gabritto
Copy link
Member

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 18, 2024

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

CommandStatusResults
pack this✅ Started✅ Results

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 18, 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/164425/artifacts?artifactName=tgz&fileId=854838C8C1BC0A3E52BA95C06664905DE93FF91DAF52B7D70630FEA7698FFC8002&fileName=/typescript-5.8.0-insiders.20241218.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]".;

@gabritto
Copy link
Member

gabritto commented Dec 18, 2024

I'm now slightly curious about what it would take to fix this example: https://www.typescriptlang.org/play/?ts=5.8.0-dev.20241218#code/GYVwdgxgLglg9mABAIwIYBMA8AVRBTADyjzHQGdFwBrMOAdzAD4AKAgLkWwEoOA3OGOkQBvAFCJEMYIlaIAhAF5KpPMBhg86LiPETEEBGSiIAnh2EBfREoIBuXRd14ANmTw69+w8bOIwIZ2dEAB9ldFV1TWtEO0QAejjEAFEAJxS4FI4AAwIsyQpaYzBUNPoogAs8FLwHUUdRUEhYBEQAczg4LFxCYlIKSxC-AKDQ8HC1DXQWdk4eRH5BD0lpWUUwiMntMU8DMCNTcysbewlHCRc3JYld-d9-QMGxjajj+MSAdQyqMmzc-L8Suk6BUqjVTnUgA
I used it as an example of why you should use union types explicitly in #56941, but at some point I might have to update that example to not use unknown, as that is a special type we sometimes know to break into a union.

@gabrittogabritto merged commit 0dda037 into microsoft:mainDec 18, 2024
32 checks passed
@AndaristAndarist deleted the improve-negated-unknown-narrowing-by-type-predicate branch December 19, 2024 11:23
@microsoftmicrosoft locked as resolved and limited conversation to collaborators Oct 15, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

For Uncommitted BugPR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Negated{} and null | undefined predicates on unknown should still narrow

3 participants

@Andarist@gabritto@typescript-bot