Skip to content

Conversation

@Andarist
Copy link
Contributor

@Andarist Andarist commented Sep 1, 2023

closes #55437

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Sep 1, 2023
@typescript-bot
Copy link
Collaborator

The TypeScript team hasn't accepted the linked issue #55437. If you can get it accepted, this PR will have a better chance of being reviewed.

@tannerlinsley
Copy link

I needed this just the other day.

@jakebailey
Copy link
Member

@typescript-bot test top200
@typescript-bot user test this
@typescript-bot run dt
@typescript-bot perf test this
@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 2, 2023

Heya @jakebailey, I've started to run the diff-based user code test suite on this PR at fa99df8. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 2, 2023

Heya @jakebailey, I've started to run the regular perf test suite on this PR at fa99df8. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 2, 2023

Heya @jakebailey, I've started to run the tarball bundle task on this PR at fa99df8. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 2, 2023

Heya @jakebailey, I've started to run the diff-based top-repos suite on this PR at fa99df8. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 2, 2023

Heya @jakebailey, I've started to run the parallelized Definitely Typed test suite on this PR at fa99df8. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 2, 2023

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/157276/artifacts?artifactName=tgz&fileId=1C95677BE2D01E9CA74F671EC87A746584ABE854757C1BB2E29AC7DFBD75EF7202&fileName=/typescript-5.3.0-insiders.20230902.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]".;

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the user test suite comparing main and refs/pull/55601/merge:

There were infrastructure failures potentially unrelated to your change:

  • 1 instance of "Unknown failure"
  • 2 instances of "Package install failed"

Otherwise...

Everything looks good!

@typescript-bot
Copy link
Collaborator

@jakebailey
The results of the perf run you requested are in!

Here they are:

Compiler

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Angular - node (v16.17.1, x64)
Memory used 300,277k (± 0.01%) 300,284k (± 0.01%) ~ 300,263k 300,312k p=0.574 n=6
Parse Time 3.00s (± 0.14%) 3.01s (± 0.25%) ~ 3.00s 3.02s p=0.100 n=6
Bind Time 0.93s (± 0.00%) 0.93s (± 0.44%) ~ 0.92s 0.93s p=0.405 n=6
Check Time 9.31s (± 0.18%) 9.33s (± 0.52%) ~ 9.29s 9.41s p=0.869 n=6
Emit Time 7.63s (± 0.15%) 7.63s (± 0.28%) ~ 7.60s 7.66s p=0.560 n=6
Total Time 20.87s (± 0.11%) 20.89s (± 0.33%) ~ 20.83s 21.01s p=1.000 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used 193,961k (± 0.01%) 193,925k (± 0.03%) ~ 193,856k 194,027k p=0.128 n=6
Parse Time 1.58s (± 0.26%) 1.58s (± 0.26%) ~ 1.57s 1.58s p=0.218 n=6
Bind Time 0.79s (± 0.69%) 0.80s (± 0.65%) ~ 0.79s 0.80s p=0.640 n=6
Check Time 9.94s (± 0.37%) 9.92s (± 0.39%) ~ 9.87s 9.96s p=0.512 n=6
Emit Time 2.74s (± 0.30%) 2.75s (± 0.38%) ~ 2.74s 2.76s p=0.101 n=6
Total Time 15.05s (± 0.26%) 15.04s (± 0.30%) ~ 14.97s 15.09s p=0.624 n=6
Monaco - node (v16.17.1, x64)
Memory used 347,181k (± 0.01%) 347,196k (± 0.00%) ~ 347,182k 347,209k p=0.568 n=6
Parse Time 2.69s (± 0.31%) 2.68s (± 0.38%) ~ 2.67s 2.70s p=0.788 n=6
Bind Time 0.99s (± 0.00%) 0.99s (± 0.00%) ~ 0.99s 0.99s p=1.000 n=6
Check Time 7.93s (± 0.42%) 7.93s (± 0.46%) ~ 7.88s 7.98s p=0.935 n=6
Emit Time 4.27s (± 0.24%) 4.27s (± 0.28%) ~ 4.25s 4.28s p=0.408 n=6
Total Time 15.87s (± 0.25%) 15.87s (± 0.23%) ~ 15.81s 15.90s p=0.871 n=6
TFS - node (v16.17.1, x64)
Memory used 301,177k (± 0.00%) 301,174k (± 0.01%) ~ 301,141k 301,190k p=0.810 n=6
Parse Time 2.18s (± 0.93%) 2.17s (± 0.79%) ~ 2.15s 2.19s p=0.285 n=6
Bind Time 1.11s (± 0.37%) 1.11s (± 0.00%) ~ 1.11s 1.11s p=0.405 n=6
Check Time 7.23s (± 0.32%) 7.22s (± 0.36%) ~ 7.20s 7.26s p=0.415 n=6
Emit Time 3.98s (± 0.52%) 3.98s (± 0.20%) ~ 3.97s 3.99s p=0.508 n=6
Total Time 14.49s (± 0.26%) 14.49s (± 0.25%) ~ 14.44s 14.54s p=0.935 n=6
material-ui - node (v16.17.1, x64)
Memory used 479,460k (± 0.00%) 479,471k (± 0.00%) ~ 479,463k 479,483k p=0.065 n=6
Parse Time 3.15s (± 0.17%) 3.15s (± 0.24%) ~ 3.14s 3.16s p=0.476 n=6
Bind Time 0.91s (± 0.00%) 0.91s (± 0.00%) ~ 0.91s 0.91s p=1.000 n=6
Check Time 17.78s (± 0.27%) 17.75s (± 0.21%) ~ 17.70s 17.79s p=0.293 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 21.84s (± 0.23%) 21.81s (± 0.18%) ~ 21.75s 21.85s p=0.373 n=6
xstate - node (v16.17.1, x64)
Memory used 542,846k (± 0.01%) 542,833k (± 0.01%) ~ 542,781k 542,925k p=0.471 n=6
Parse Time 3.69s (± 0.15%) 3.69s (± 0.14%) +0.01s (+ 0.23%) 3.69s 3.70s p=0.038 n=6
Bind Time 1.47s (± 3.58%) 1.45s (± 0.00%) ~ 1.45s 1.45s p=0.293 n=6
Check Time 3.17s (± 0.88%) 3.18s (± 0.32%) ~ 3.16s 3.19s p=0.720 n=6
Emit Time 0.08s (± 6.19%) 0.08s (± 9.79%) ~ 0.08s 0.10s p=0.752 n=6
Total Time 8.41s (± 0.74%) 8.40s (± 0.12%) ~ 8.39s 8.41s p=0.801 n=6
System info unknown
Hosts
  • node (v16.17.1, x64)
Scenarios
  • Angular - node (v16.17.1, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Monaco - node (v16.17.1, x64)
  • TFS - node (v16.17.1, x64)
  • material-ui - node (v16.17.1, x64)
  • xstate - node (v16.17.1, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

tsserver

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,489ms (± 0.11%) 2,487ms (± 0.18%) ~ 2,482ms 2,494ms p=0.422 n=6
Req 2 - geterr 5,948ms (± 0.35%) 5,939ms (± 0.59%) ~ 5,911ms 6,003ms p=0.378 n=6
Req 3 - references 343ms (± 0.43%) 345ms (± 1.51%) ~ 341ms 355ms p=1.000 n=6
Req 4 - navto 278ms (± 0.73%) 279ms (± 0.99%) ~ 277ms 283ms p=0.591 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 81ms (± 8.47%) 80ms (± 8.01%) ~ 76ms 92ms p=0.739 n=6
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,634ms (± 0.68%) 2,629ms (± 0.81%) ~ 2,603ms 2,661ms p=0.521 n=6
Req 2 - geterr 4,771ms (± 0.14%) 4,777ms (± 0.24%) ~ 4,767ms 4,793ms p=0.422 n=6
Req 3 - references 351ms (± 0.23%) 351ms (± 0.16%) ~ 350ms 351ms p=0.859 n=6
Req 4 - navto 270ms (± 0.20%) 271ms (± 0.98%) ~ 269ms 276ms p=0.476 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 78ms (± 3.27%) 79ms (± 0.52%) ~ 79ms 80ms p=0.673 n=6
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,712ms (± 0.19%) 2,706ms (± 0.24%) ~ 2,699ms 2,718ms p=0.109 n=6
Req 2 - geterr 1,937ms (± 2.44%) 1,960ms (± 1.85%) ~ 1,888ms 1,986ms p=0.471 n=6
Req 3 - references 138ms (± 2.44%) 140ms (± 1.46%) ~ 136ms 142ms p=0.412 n=6
Req 4 - navto 353ms (± 0.34%) 352ms (± 0.29%) ~ 351ms 354ms p=0.180 n=6
Req 5 - completionInfo count 2,071 (± 0.00%) 2,071 (± 0.00%) ~ 2,071 2,071 p=1.000 n=6
Req 5 - completionInfo 321ms (± 1.75%) 323ms (± 1.51%) ~ 313ms 326ms p=0.870 n=6
System info unknown
Hosts
  • node (v16.17.1, x64)
Scenarios
  • CompilerTSServer - node (v16.17.1, x64)
  • Compiler-UnionsTSServer - node (v16.17.1, x64)
  • xstateTSServer - node (v16.17.1, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Startup

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
tsc-startup - node (v16.17.1, x64)
Execution time 156.27ms (± 0.17%) 156.26ms (± 0.17%) ~ 154.34ms 159.97ms p=0.579 n=600
tsserver-startup - node (v16.17.1, x64)
Execution time 230.31ms (± 0.14%) 230.97ms (± 0.14%) +0.65ms (+ 0.28%) 229.37ms 237.98ms p=0.000 n=600
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time 235.15ms (± 0.14%) 236.12ms (± 0.17%) +0.97ms (+ 0.41%) 234.53ms 244.92ms p=0.000 n=600
typescript-startup - node (v16.17.1, x64)
Execution time 236.52ms (± 0.13%) 236.53ms (± 0.16%) ~ 234.86ms 247.37ms p=0.702 n=600
System info unknown
Hosts
  • node (v16.17.1, x64)
Scenarios
  • tsc-startup - node (v16.17.1, x64)
  • tsserver-startup - node (v16.17.1, x64)
  • tsserverlibrary-startup - node (v16.17.1, x64)
  • typescript-startup - node (v16.17.1, 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-repos suite comparing main and refs/pull/55601/merge:

Everything looks good!

@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.

@DanielRosenwasser
Copy link
Member

This doesn't really work for assertion functions right?

Can you add a few tests around that?

function throws(): never {
    throw new Error();
}

export function foo() {
    throws();
    return 42;
}

export function bar() {
    var x;
    x = 1;
    if (Math.random()) {
        throws();
        return x;
    }
    x = 2;
    return x;
}

@Andarist
Copy link
Contributor Author

Andarist commented Sep 7, 2023

Should I just codify the current results in the test suite or would you expect those cases to work differently? It would be possible to achieve different results for them, right? I'm not sure if that's totally desirable from your PoV though.

@jakebailey
Copy link
Member

@typescript-bot test it
@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Nov 17, 2025

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

Command Status Results
pack this ✅ Started ✅ 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, 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/166559/artifacts?artifactName=tgz&fileId=9449D9679D8F1BD99D98157B0718506EFCDBD692B072CE8F2200793DC770240502&fileName=/typescript-6.0.0-insiders.20251117.tgz"
    }
}

and then running npm install.

@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/55601/merge:

There were infrastructure failures potentially unrelated to your change:

  • 1 instance of "Git clone failed"

Otherwise...

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 1 1 ~ ~ ~ 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 194,542k (± 1.01%) 193,852k (± 0.95%) ~ 192,630k 196,258k p=0.336 n=6
Parse Time 1.30s (± 0.75%) 1.30s (± 0.79%) ~ 1.29s 1.31s p=0.784 n=6
Bind Time 0.72s (± 0.71%) 0.72s (± 0.57%) ~ 0.72s 0.73s p=0.595 n=6
Check Time 9.92s (± 0.32%) 9.92s (± 0.28%) ~ 9.87s 9.94s p=0.872 n=6
Emit Time 2.73s (± 0.82%) 2.73s (± 0.63%) ~ 2.70s 2.75s p=0.805 n=6
Total Time 14.68s (± 0.26%) 14.67s (± 0.27%) ~ 14.62s 14.73s p=0.572 n=6
angular-1 - node (v18.15.0, x64)
Errors 2 2 ~ ~ ~ p=1.000 n=6
Symbols 956,047 956,047 ~ ~ ~ p=1.000 n=6
Types 415,881 415,881 ~ ~ ~ p=1.000 n=6
Memory used 1,255,011k (± 0.00%) 1,255,003k (± 0.01%) ~ 1,254,820k 1,255,208k p=0.873 n=6
Parse Time 6.53s (± 0.71%) 6.54s (± 0.79%) ~ 6.48s 6.60s p=0.809 n=6
Bind Time 1.88s (± 0.44%) 1.88s (± 0.27%) ~ 1.88s 1.89s p=0.533 n=6
Check Time 32.41s (± 0.36%) 32.36s (± 0.12%) ~ 32.30s 32.42s p=0.108 n=6
Emit Time 14.86s (± 0.23%) 14.89s (± 0.20%) ~ 14.86s 14.93s p=0.254 n=6
Total Time 55.69s (± 0.27%) 55.68s (± 0.11%) ~ 55.59s 55.76s p=0.423 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,665,841 2,665,841 ~ ~ ~ p=1.000 n=6
Types 922,464 922,464 ~ ~ ~ p=1.000 n=6
Memory used 2,980,595k (± 0.00%) 2,980,611k (± 0.00%) ~ 2,980,392k 2,980,798k p=0.810 n=6
Parse Time 10.13s (± 0.21%) 10.14s (± 0.91%) ~ 9.98s 10.25s p=0.371 n=6
Bind Time 2.62s (± 1.12%) 2.62s (± 0.46%) ~ 2.61s 2.64s p=0.871 n=6
Check Time 110.03s (± 1.30%) 109.39s (± 0.82%) ~ 108.42s 111.08s p=0.575 n=6
Emit Time 0.37s (± 2.64%) 0.37s (± 2.76%) ~ 0.36s 0.39s p=0.933 n=6
Total Time 123.15s (± 1.19%) 122.53s (± 0.74%) ~ 121.56s 124.23s p=0.471 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,237,141 1,237,173 +32 (+ 0.00%) ~ ~ p=0.001 n=6
Types 259,801 259,806 +5 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,974,157k (± 9.98%) 3,096,343k (± 0.02%) 🔻+122,186k (+ 4.11%) 3,096,010k 3,097,307k p=0.005 n=6
Parse Time 8.13s (± 1.76%) 8.21s (± 0.82%) ~ 8.15s 8.33s p=0.378 n=6
Bind Time 2.68s (± 0.81%) 2.66s (± 1.03%) ~ 2.63s 2.71s p=0.373 n=6
Check Time 53.33s (± 0.48%) 53.20s (± 0.27%) ~ 53.06s 53.47s p=0.230 n=6
Emit Time 4.38s (± 4.58%) 4.28s (± 1.07%) ~ 4.20s 4.32s p=0.230 n=6
Total Time 68.52s (± 0.28%) 68.38s (± 0.22%) ~ 68.16s 68.57s p=0.109 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,237,141 1,237,173 +32 (+ 0.00%) ~ ~ p=0.001 n=6
Types 259,801 259,806 +5 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,552,426k (±11.58%) 2,552,645k (± 7.31%) ~ 2,430,845k 2,793,986k p=0.575 n=6
Parse Time 5.30s (± 1.40%) 5.33s (± 0.67%) ~ 5.28s 5.38s p=0.093 n=6
Bind Time 1.81s (± 1.38%) 1.80s (± 0.93%) ~ 1.79s 1.83s p=0.367 n=6
Check Time 35.46s (± 0.61%) 35.31s (± 0.80%) ~ 34.89s 35.55s p=0.630 n=6
Emit Time 3.02s (± 1.30%) 3.05s (± 1.27%) ~ 2.99s 3.11s p=0.128 n=6
Total Time 45.58s (± 0.57%) 45.50s (± 0.65%) ~ 45.09s 45.82s p=0.936 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 262,364 262,374 +10 (+ 0.00%) ~ ~ p=0.001 n=6
Types 103,960 103,965 +5 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 440,558k (± 0.01%) 440,605k (± 0.01%) ~ 440,527k 440,679k p=0.296 n=6
Parse Time 2.83s (± 0.57%) 2.83s (± 0.39%) ~ 2.81s 2.84s p=1.000 n=6
Bind Time 1.13s (± 0.56%) 1.14s (± 0.72%) ~ 1.13s 1.15s p=0.177 n=6
Check Time 16.08s (± 0.48%) 15.98s (± 0.28%) -0.10s (- 0.62%) 15.92s 16.05s p=0.020 n=6
Emit Time 1.31s (± 1.24%) 1.32s (± 1.72%) ~ 1.29s 1.35s p=1.000 n=6
Total Time 21.35s (± 0.42%) 21.26s (± 0.27%) -0.10s (- 0.44%) 21.19s 21.35s p=0.045 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 72 72 ~ ~ ~ p=1.000 n=6
Symbols 225,386 225,386 ~ ~ ~ p=1.000 n=6
Types 94,304 94,304 ~ ~ ~ p=1.000 n=6
Memory used 370,118k (± 0.04%) 370,100k (± 0.04%) ~ 370,012k 370,391k p=0.689 n=6
Parse Time 2.83s (± 0.91%) 2.83s (± 1.40%) ~ 2.77s 2.87s p=1.000 n=6
Bind Time 1.61s (± 0.86%) 1.61s (± 1.07%) ~ 1.58s 1.63s p=0.738 n=6
Check Time 16.58s (± 0.62%) 16.57s (± 0.44%) ~ 16.43s 16.63s p=0.873 n=6
Emit Time 0.00s 0.00s (±244.70%) ~ 0.00s 0.01s p=0.405 n=6
Total Time 21.02s (± 0.55%) 21.01s (± 0.35%) ~ 20.89s 21.09s p=0.936 n=6
vscode - node (v18.15.0, x64)
Errors 11 11 ~ ~ ~ p=1.000 n=6
Symbols 4,036,761 4,036,761 ~ ~ ~ p=1.000 n=6
Types 1,269,463 1,269,463 ~ ~ ~ p=1.000 n=6
Memory used 3,819,064k (± 0.00%) 3,819,037k (± 0.01%) ~ 3,818,648k 3,819,383k p=1.000 n=6
Parse Time 15.47s (± 0.16%) 15.45s (± 0.83%) ~ 15.30s 15.66s p=0.688 n=6
Bind Time 5.06s (± 0.61%) 5.07s (± 1.06%) ~ 5.02s 5.14s p=0.935 n=6
Check Time 108.16s (± 6.22%) 106.97s (± 4.95%) ~ 102.78s 114.34s p=0.810 n=6
Emit Time 47.55s (±25.13%) 46.62s (±15.53%) ~ 38.53s 57.71s p=0.936 n=6
Total Time 176.24s (± 5.15%) 174.11s (± 6.44%) ~ 161.86s 192.76s p=0.575 n=6
webpack - node (v18.15.0, x64)
Errors 40 40 ~ ~ ~ p=1.000 n=6
Symbols 379,737 379,737 ~ ~ ~ p=1.000 n=6
Types 166,566 166,566 ~ ~ ~ p=1.000 n=6
Memory used 539,403k (± 0.02%) 539,385k (± 0.02%) ~ 539,300k 539,602k p=0.810 n=6
Parse Time 4.63s (± 0.78%) 4.63s (± 0.71%) ~ 4.59s 4.67s p=0.809 n=6
Bind Time 1.96s (± 2.15%) 1.97s (± 1.10%) ~ 1.94s 2.00s p=0.810 n=6
Check Time 22.93s (± 0.45%) 22.87s (± 0.16%) ~ 22.82s 22.91s p=0.261 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 29.51s (± 0.45%) 29.46s (± 0.17%) ~ 29.41s 29.55s p=0.630 n=6
xstate-main - node (v18.15.0, x64)
Errors 30 30 ~ ~ ~ p=1.000 n=6
Symbols 690,485 690,485 ~ ~ ~ p=1.000 n=6
Types 208,757 208,757 ~ ~ ~ p=1.000 n=6
Memory used 586,652k (± 0.03%) 586,692k (± 0.03%) ~ 586,413k 586,872k p=0.689 n=6
Parse Time 4.20s (± 0.65%) 4.20s (± 0.99%) ~ 4.14s 4.25s p=0.936 n=6
Bind Time 1.35s (± 1.27%) 1.37s (± 1.42%) ~ 1.34s 1.39s p=0.122 n=6
Check Time 20.60s (± 2.04%) 20.50s (± 1.14%) ~ 20.31s 20.93s p=0.873 n=6
Emit Time 0.00s 0.00s (±244.70%) ~ 0.00s 0.01s p=0.405 n=6
Total Time 26.15s (± 1.68%) 26.07s (± 0.91%) ~ 25.90s 26.49s 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
Collaborator

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

Something interesting changed - please have a look.

Details

TanStack/query

76 of 116 projects failed to build with the old tsc and were ignored

packages/react-query-persist-client/tsconfig.legacy.json

packages/react-query-persist-client/tsconfig.json

packages/react-query-next-experimental/tsconfig.legacy.json

packages/react-query-next-experimental/tsconfig.json

packages/react-query-devtools/tsconfig.legacy.json

packages/react-query-devtools/tsconfig.json

packages/react-query/tsconfig.prod.json

@Andarist
Copy link
Contributor Author

The above break is expected. This is the Thrower:

      function Thrower() {
        throw new Promise(() => {
          // Never resolve
        })

        // @ts-expect-error
        return null
      }

When considering the unreachable return statement, its type becomes () => null and that's a valid JSX component function. With this change, it's now () => void and that's not a valid component function.

Function declarations and method declarations outside of object literals are not allowed to infer never as their return type (see mayReturnNever and its callers). So everything checks out. I'll fix the code in that repository - the usage of // @ts-expect-error already shows this is trying to work around things. The proper fix is to just annotate the return type with never and remove that unreachable code.

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

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Waiting on reviewers

Development

Successfully merging this pull request may close these issues.

Unreachable returns badly break return type inference

6 participants