Skip to content

Conversation

@Andarist
Copy link
Contributor

closes #51612

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

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

@sandersn sandersn requested review from ahejlsberg and weswigham March 9, 2023 18:07
@typescript-bot typescript-bot removed the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Mar 9, 2023
@typescript-bot typescript-bot added the For Backlog Bug PRs that fix a backlog bug label Mar 9, 2023
Copy link
Member

@weswigham weswigham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had #20126 which was pretty functional a long time ago, which we basically only didn't take because nobody could be bothered to care about it without a backing issue (myself included), but that seems to be an even more general version of this (or at least relied on a similar partial inferencing mechanism), since these kinds of partial inferences that you combine later are applicable beyond reverse mapped types.

@Andarist Andarist requested a review from weswigham April 18, 2023 11:52
@Andarist Andarist changed the title Infer reverse mapped types based on inferences made for its concrete properties Infer type parameters from indexes on those parameters Apr 19, 2023
@Andarist Andarist force-pushed the infer-concrete-properties-of-reverse-mapped-types branch from cbceb63 to c90fb20 Compare December 1, 2025 06:16
@jakebailey
Copy link
Member

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 1, 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

typescript-bot commented Dec 1, 2025

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/166633/artifacts?artifactName=tgz&fileId=E5F9CEBCCB3B4DBB52F1F9642B36C892BB89227CBD41EAD91C6DBFD5FA8129EC02&fileName=/typescript-6.0.0-insiders.20251201.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

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

There were interesting changes:

Branch only errors:

Package: rdfjs__data-model
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/rdfjs__data-model/rdfjs__data-model-tests.ts
  76:5  error  TypeScript@local compile error: 
Unused '@ts-expect-error' directive  @definitelytyped/expect

✖ 1 problem (1 error, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:199:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@[email protected][email protected]/node_modules/@definitelytyped/dtslint/dist/index.js:191:20)

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

There were infrastructure failures potentially unrelated to your change:

  • 1 instance of "Git clone failed"

Otherwise...

Something interesting changed - please have a look.

Details

webpack

tsconfig.types.test.json

  • [NEW] error TS2345: Argument of type 'Comparator<Record<string | number | symbol, number>>' is not assignable to parameter of type '(a: { connection: ModuleGraphConnection; sourceOrder: number; rangeStart: number | undefined; defer?: boolean | undefined; }, b: { connection: ModuleGraphConnection; sourceOrder: number; rangeStart: number | undefined; defer?: boolean | undefined; }) => number'.

tsconfig.types.json

  • [NEW] error TS2345: Argument of type 'Comparator<Record<string | number | symbol, number>>' is not assignable to parameter of type '(a: { connection: ModuleGraphConnection; sourceOrder: number; rangeStart: number | undefined; defer?: boolean | undefined; }, b: { connection: ModuleGraphConnection; sourceOrder: number; rangeStart: number | undefined; defer?: boolean | undefined; }) => number'.

tsconfig.json

  • [NEW] error TS2345: Argument of type 'Comparator<Record<string | number | symbol, number>>' is not assignable to parameter of type '(a: { connection: ModuleGraphConnection; sourceOrder: number; rangeStart: number | undefined; defer?: boolean | undefined; }, b: { connection: ModuleGraphConnection; sourceOrder: number; rangeStart: number | undefined; defer?: boolean | undefined; }) => number'.

@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,407 +37 (+ 0.06%) ~ ~ p=0.001 n=6
Types 50,386 50,458 +72 (+ 0.14%) ~ ~ p=0.001 n=6
Memory used 193,848k (± 0.96%) 195,223k (± 0.90%) +1,375k (+ 0.71%) 192,768k 196,435k p=0.031 n=6
Parse Time 1.30s (± 0.79%) 1.29s (± 0.76%) ~ 1.28s 1.31s p=0.091 n=6
Bind Time 0.75s (± 0.54%) 0.75s ~ ~ ~ p=0.405 n=6
Check Time 9.90s (± 0.24%) 9.97s (± 0.33%) +0.06s (+ 0.64%) 9.90s 9.99s p=0.028 n=6
Emit Time 2.74s (± 0.80%) 2.75s (± 0.36%) ~ 2.74s 2.76s p=0.324 n=6
Total Time 14.69s (± 0.24%) 14.76s (± 0.24%) +0.07s (+ 0.44%) 14.69s 14.78s p=0.015 n=6
angular-1 - node (v18.15.0, x64)
Errors 2 2 ~ ~ ~ p=1.000 n=6
Symbols 956,047 949,829 -6,218 (- 0.65%) ~ ~ p=0.001 n=6
Types 415,881 411,890 -3,991 (- 0.96%) ~ ~ p=0.001 n=6
Memory used 1,255,005k (± 0.01%) 1,246,583k (± 0.00%) -8,423k (- 0.67%) 1,246,533k 1,246,651k p=0.005 n=6
Parse Time 6.54s (± 0.71%) 6.54s (± 0.68%) ~ 6.49s 6.61s p=0.872 n=6
Bind Time 1.96s (± 0.42%) 1.96s (± 0.32%) ~ 1.95s 1.97s p=0.432 n=6
Check Time 32.31s (± 0.23%) 32.36s (± 0.36%) ~ 32.19s 32.48s p=0.377 n=6
Emit Time 14.90s (± 0.15%) 14.90s (± 0.27%) ~ 14.83s 14.95s p=0.746 n=6
Total Time 55.70s (± 0.17%) 55.76s (± 0.13%) ~ 55.62s 55.84s p=0.470 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,722,088 2,720,094 -1,994 (- 0.07%) ~ ~ p=0.001 n=6
Types 937,484 936,130 -1,354 (- 0.14%) ~ ~ p=0.001 n=6
Memory used 3,050,965k (± 0.00%) 3,047,175k (± 0.00%) -3,790k (- 0.12%) 3,047,019k 3,047,309k p=0.005 n=6
Parse Time 8.55s (± 0.19%) 8.53s (± 0.20%) ~ 8.51s 8.55s p=0.121 n=6
Bind Time 2.32s (± 0.79%) 2.32s (± 0.65%) ~ 2.29s 2.33s p=1.000 n=6
Check Time 93.09s (± 0.30%) 92.55s (± 0.36%) -0.55s (- 0.59%) 92.19s 93.02s p=0.031 n=6
Emit Time 0.31s (± 1.68%) 0.31s (± 2.04%) ~ 0.30s 0.32s p=0.386 n=6
Total Time 104.27s (± 0.26%) 103.71s (± 0.33%) -0.56s (- 0.54%) 103.35s 104.16s p=0.030 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,251,545 1,251,990 +445 (+ 0.04%) ~ ~ p=0.001 n=6
Types 259,756 260,698 +942 (+ 0.36%) ~ ~ p=0.001 n=6
Memory used 2,514,131k (±11.84%) 2,455,118k (± 6.07%) ~ 2,393,577k 2,759,564k p=0.066 n=6
Parse Time 5.20s (± 1.01%) 5.15s (± 1.05%) ~ 5.05s 5.20s p=0.471 n=6
Bind Time 1.82s (± 1.70%) 1.82s (± 1.08%) ~ 1.80s 1.85s p=1.000 n=6
Check Time 35.45s (± 0.49%) 35.34s (± 0.61%) ~ 34.97s 35.62s p=0.423 n=6
Emit Time 2.97s (± 1.80%) 2.98s (± 1.85%) ~ 2.89s 3.04s p=0.748 n=6
Total Time 45.46s (± 0.39%) 45.30s (± 0.50%) ~ 44.90s 45.57s p=0.297 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,251,545 1,251,990 +445 (+ 0.04%) ~ ~ p=0.001 n=6
Types 259,756 260,698 +942 (+ 0.36%) ~ ~ p=0.001 n=6
Memory used 3,067,155k (± 9.63%) 3,068,699k (± 9.65%) +1,544k (+ 0.05%) 2,463,786k 3,190,055k p=0.045 n=6
Parse Time 6.77s (± 1.87%) 6.78s (± 0.45%) ~ 6.72s 6.81s p=0.873 n=6
Bind Time 2.25s (± 0.54%) 2.25s (± 0.67%) ~ 2.23s 2.27s p=0.687 n=6
Check Time 43.13s (± 0.40%) 43.23s (± 0.16%) ~ 43.15s 43.34s p=0.378 n=6
Emit Time 3.52s (± 1.55%) 3.53s (± 1.78%) ~ 3.46s 3.61s p=0.630 n=6
Total Time 55.68s (± 0.60%) 55.78s (± 0.15%) ~ 55.64s 55.87s p=0.575 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 264,177 264,370 +193 (+ 0.07%) ~ ~ p=0.001 n=6
Types 103,979 104,380 +401 (+ 0.39%) ~ ~ p=0.001 n=6
Memory used 443,207k (± 0.03%) 443,453k (± 0.01%) +247k (+ 0.06%) 443,409k 443,506k p=0.005 n=6
Parse Time 3.52s (± 0.31%) 3.49s (± 0.93%) ~ 3.46s 3.54s p=0.250 n=6
Bind Time 1.36s (± 1.20%) 1.37s (± 0.75%) ~ 1.36s 1.39s p=0.241 n=6
Check Time 19.18s (± 0.36%) 19.16s (± 0.53%) ~ 19.08s 19.30s p=0.810 n=6
Emit Time 1.54s (± 0.53%) 1.54s (± 1.28%) ~ 1.52s 1.57s p=0.323 n=6
Total Time 25.61s (± 0.25%) 25.57s (± 0.29%) ~ 25.50s 25.67s p=0.296 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 72 72 ~ ~ ~ p=1.000 n=6
Symbols 225,386 225,487 +101 (+ 0.04%) ~ ~ p=0.001 n=6
Types 94,304 94,669 +365 (+ 0.39%) ~ ~ p=0.001 n=6
Memory used 370,104k (± 0.05%) 370,356k (± 0.02%) ~ 370,241k 370,476k p=0.066 n=6
Parse Time 2.83s (± 0.69%) 2.83s (± 0.66%) ~ 2.79s 2.84s p=0.869 n=6
Bind Time 1.63s (± 1.31%) 1.64s (± 0.92%) ~ 1.62s 1.66s p=0.401 n=6
Check Time 16.52s (± 0.21%) 16.64s (± 0.41%) +0.11s (+ 0.69%) 16.53s 16.73s p=0.013 n=6
Emit Time 0.00s 0.00s (±154.76%) ~ 0.00s 0.01s p=0.174 n=6
Total Time 20.98s (± 0.11%) 21.11s (± 0.35%) +0.13s (+ 0.60%) 20.98s 21.20s p=0.019 n=6
vscode - node (v18.15.0, x64)
Errors 11 11 ~ ~ ~ p=1.000 n=6
Symbols 4,070,590 4,070,058 -532 (- 0.01%) ~ ~ p=0.001 n=6
Types 1,282,214 1,281,724 -490 (- 0.04%) ~ ~ p=0.001 n=6
Memory used 3,856,455k (± 0.00%) 3,855,629k (± 0.00%) -827k (- 0.02%) 3,855,480k 3,855,781k p=0.005 n=6
Parse Time 15.68s (± 0.44%) 15.67s (± 0.31%) ~ 15.62s 15.73s p=0.871 n=6
Bind Time 5.28s (± 0.58%) 5.27s (± 0.58%) ~ 5.23s 5.31s p=0.745 n=6
Check Time 113.65s (± 3.60%) 111.55s (± 0.92%) ~ 110.13s 113.31s p=0.575 n=6
Emit Time 44.05s (±12.03%) 39.02s (± 0.65%) ~ 38.73s 39.46s p=0.066 n=6
Total Time 178.65s (± 3.34%) 171.51s (± 0.57%) 🟩-7.14s (- 4.00%) 170.28s 173.17s p=0.031 n=6
webpack - node (v18.15.0, x64)
Errors 40 41 +1 (+ 2.50%) ~ ~ p=0.001 n=6
Symbols 380,434 379,240 -1,194 (- 0.31%) ~ ~ p=0.001 n=6
Types 166,705 165,734 -971 (- 0.58%) ~ ~ p=0.001 n=6
Memory used 540,329k (± 0.02%) 539,502k (± 0.03%) -827k (- 0.15%) 539,220k 539,741k p=0.005 n=6
Parse Time 4.69s (± 0.35%) 4.68s (± 0.40%) ~ 4.65s 4.70s p=0.466 n=6
Bind Time 2.03s (± 0.72%) 2.02s (± 0.60%) ~ 2.01s 2.04s p=0.408 n=6
Check Time 22.92s (± 0.26%) 22.91s (± 0.25%) ~ 22.81s 22.97s p=0.936 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 29.64s (± 0.21%) 29.62s (± 0.24%) ~ 29.51s 29.71s p=0.470 n=6
xstate-main - node (v18.15.0, x64)
Errors 30 30 ~ ~ ~ p=1.000 n=6
Symbols 690,397 690,376 -21 (- 0.00%) ~ ~ p=0.001 n=6
Types 208,790 209,009 +219 (+ 0.10%) ~ ~ p=0.001 n=6
Memory used 586,137k (± 0.03%) 586,118k (± 0.03%) ~ 585,944k 586,308k p=0.810 n=6
Parse Time 4.18s (± 0.84%) 4.18s (± 0.51%) ~ 4.14s 4.20s p=0.809 n=6
Bind Time 1.42s (± 0.53%) 1.42s (± 1.50%) ~ 1.40s 1.45s p=1.000 n=6
Check Time 20.75s (± 1.56%) 20.59s (± 1.68%) ~ 20.33s 21.26s p=0.520 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 26.35s (± 1.14%) 26.19s (± 1.41%) ~ 25.91s 26.91s p=0.298 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/53017/merge:

Something interesting changed - please have a look.

Details

tldraw/tldraw

30 of 34 projects failed to build with the old tsc and were ignored

templates/branching-chat/tsconfig.json

  • error TS2345: Argument of type '{ x: number; y: number; id: TLShapeId; typeName: "shape"; type: "node"; rotation: number; index: IndexKey; parentId: TLParentId; isLocked: boolean; opacity: TLOpacityType; props: { ...; }; meta: JsonObject; }' is not assignable to parameter of type 'null | undefined'.

@jakebailey
Copy link
Member

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 2, 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

typescript-bot commented Dec 2, 2025

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/166648/artifacts?artifactName=tgz&fileId=A5C9819FA08C4C8EB063C5869BCF715A23EC7D7449F748DA8260A7323DB8A06D02&fileName=/typescript-6.0.0-insiders.20251202.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

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

There were infrastructure failures potentially unrelated to your change:

  • 1 instance of "Git clone failed"

Otherwise...

Something interesting changed - please have a look.

Details

webpack

tsconfig.types.test.json

  • [NEW] error TS2345: Argument of type 'Comparator<Record<string | number | symbol, number>>' is not assignable to parameter of type '(a: { connection: ModuleGraphConnection; sourceOrder: number; rangeStart: number | undefined; defer?: boolean | undefined; }, b: { connection: ModuleGraphConnection; sourceOrder: number; rangeStart: number | undefined; defer?: boolean | undefined; }) => number'.

tsconfig.types.json

  • [NEW] error TS2345: Argument of type 'Comparator<Record<string | number | symbol, number>>' is not assignable to parameter of type '(a: { connection: ModuleGraphConnection; sourceOrder: number; rangeStart: number | undefined; defer?: boolean | undefined; }, b: { connection: ModuleGraphConnection; sourceOrder: number; rangeStart: number | undefined; defer?: boolean | undefined; }) => number'.

tsconfig.json

  • [NEW] error TS2345: Argument of type 'Comparator<Record<string | number | symbol, number>>' is not assignable to parameter of type '(a: { connection: ModuleGraphConnection; sourceOrder: number; rangeStart: number | undefined; defer?: boolean | undefined; }, b: { connection: ModuleGraphConnection; sourceOrder: number; rangeStart: number | undefined; defer?: boolean | undefined; }) => number'.

@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,403 +33 (+ 0.05%) ~ ~ p=0.001 n=6
Types 50,386 50,442 +56 (+ 0.11%) ~ ~ p=0.001 n=6
Memory used 194,531k (± 0.99%) 194,025k (± 0.93%) ~ 192,782k 196,389k p=0.810 n=6
Parse Time 1.30s (± 0.75%) 1.30s (± 0.76%) ~ 1.29s 1.31s p=0.604 n=6
Bind Time 0.75s 0.75s ~ ~ ~ p=1.000 n=6
Check Time 9.90s (± 0.44%) 9.94s (± 0.19%) ~ 9.92s 9.97s p=0.066 n=6
Emit Time 2.74s (± 0.67%) 2.76s (± 0.59%) ~ 2.74s 2.78s p=0.254 n=6
Total Time 14.69s (± 0.24%) 14.75s (± 0.19%) +0.05s (+ 0.37%) 14.70s 14.78s p=0.028 n=6
angular-1 - node (v18.15.0, x64)
Errors 2 2 ~ ~ ~ p=1.000 n=6
Symbols 956,047 949,827 -6,220 (- 0.65%) ~ ~ p=0.001 n=6
Types 415,881 411,866 -4,015 (- 0.97%) ~ ~ p=0.001 n=6
Memory used 1,255,082k (± 0.00%) 1,246,560k (± 0.00%) -8,521k (- 0.68%) 1,246,491k 1,246,618k p=0.005 n=6
Parse Time 6.52s (± 0.68%) 6.55s (± 0.78%) ~ 6.49s 6.62s p=0.468 n=6
Bind Time 1.97s (± 0.41%) 1.96s (± 0.21%) ~ 1.96s 1.97s p=0.248 n=6
Check Time 32.46s (± 0.40%) 32.41s (± 0.26%) ~ 32.30s 32.53s p=0.689 n=6
Emit Time 14.91s (± 0.29%) 14.88s (± 0.31%) ~ 14.81s 14.95s p=0.195 n=6
Total Time 55.85s (± 0.33%) 55.79s (± 0.10%) ~ 55.73s 55.87s p=0.630 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,722,079 2,720,085 -1,994 (- 0.07%) ~ ~ p=0.001 n=6
Types 937,469 936,103 -1,366 (- 0.15%) ~ ~ p=0.001 n=6
Memory used 3,050,889k (± 0.00%) 3,047,126k (± 0.00%) -3,763k (- 0.12%) 3,047,047k 3,047,190k p=0.005 n=6
Parse Time 8.55s (± 0.18%) 8.53s (± 0.21%) -0.03s (- 0.33%) 8.50s 8.55s p=0.023 n=6
Bind Time 2.31s (± 0.65%) 2.33s (± 0.45%) ~ 2.31s 2.34s p=0.215 n=6
Check Time 92.71s (± 0.58%) 92.79s (± 0.34%) ~ 92.45s 93.21s p=0.748 n=6
Emit Time 0.31s (± 2.44%) 0.31s (± 2.41%) ~ 0.30s 0.32s p=0.487 n=6
Total Time 103.88s (± 0.52%) 103.95s (± 0.31%) ~ 103.57s 104.35s p=0.936 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,251,545 1,251,833 +288 (+ 0.02%) ~ ~ p=0.001 n=6
Types 259,756 260,040 +284 (+ 0.11%) ~ ~ p=0.001 n=6
Memory used 2,760,412k (±14.45%) 3,003,980k (± 9.89%) ~ 2,396,775k 3,126,796k p=0.173 n=6
Parse Time 6.58s (± 1.38%) 6.66s (± 1.33%) ~ 6.49s 6.73s p=0.128 n=6
Bind Time 2.27s (± 2.44%) 2.22s (± 1.27%) ~ 2.19s 2.27s p=0.229 n=6
Check Time 43.17s (± 0.71%) 43.06s (± 0.39%) ~ 42.84s 43.27s p=0.810 n=6
Emit Time 3.61s (± 5.04%) 3.54s (± 2.20%) ~ 3.43s 3.64s p=0.687 n=6
Total Time 55.61s (± 0.58%) 55.47s (± 0.32%) ~ 55.21s 55.67s p=0.689 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,251,545 1,251,833 +288 (+ 0.02%) ~ ~ p=0.001 n=6
Types 259,756 260,040 +284 (+ 0.11%) ~ ~ p=0.001 n=6
Memory used 2,459,510k (± 0.03%) 2,460,361k (± 0.02%) ~ 2,459,655k 2,460,665k p=0.066 n=6
Parse Time 5.34s (± 0.65%) 5.32s (± 0.33%) ~ 5.29s 5.34s p=0.173 n=6
Bind Time 1.87s (± 1.04%) 1.87s (± 0.44%) ~ 1.87s 1.89s p=0.242 n=6
Check Time 35.55s (± 0.39%) 35.65s (± 0.35%) ~ 35.51s 35.80s p=0.298 n=6
Emit Time 3.03s (± 1.68%) 3.05s (± 1.25%) ~ 2.99s 3.09s p=0.470 n=6
Total Time 45.82s (± 0.43%) 45.90s (± 0.31%) ~ 45.72s 46.09s p=0.471 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 264,177 264,286 +109 (+ 0.04%) ~ ~ p=0.001 n=6
Types 103,979 104,036 +57 (+ 0.05%) ~ ~ p=0.001 n=6
Memory used 443,187k (± 0.01%) 443,359k (± 0.01%) +173k (+ 0.04%) 443,314k 443,434k p=0.005 n=6
Parse Time 3.50s (± 0.52%) 3.50s (± 0.78%) ~ 3.46s 3.54s p=0.871 n=6
Bind Time 1.37s (± 1.07%) 1.36s (± 1.20%) ~ 1.35s 1.39s p=0.512 n=6
Check Time 19.20s (± 0.32%) 19.14s (± 0.41%) ~ 19.02s 19.24s p=0.297 n=6
Emit Time 1.53s (± 1.45%) 1.54s (± 0.27%) ~ 1.53s 1.54s p=0.227 n=6
Total Time 25.60s (± 0.31%) 25.54s (± 0.34%) ~ 25.42s 25.66s p=0.230 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 72 72 ~ ~ ~ p=1.000 n=6
Symbols 225,386 225,406 +20 (+ 0.01%) ~ ~ p=0.001 n=6
Types 94,304 94,345 +41 (+ 0.04%) ~ ~ p=0.001 n=6
Memory used 370,150k (± 0.05%) 370,328k (± 0.06%) ~ 370,107k 370,652k p=0.173 n=6
Parse Time 2.85s (± 0.97%) 2.86s (± 0.88%) ~ 2.81s 2.88s p=0.746 n=6
Bind Time 1.65s (± 1.00%) 1.64s (± 1.05%) ~ 1.61s 1.66s p=0.934 n=6
Check Time 16.61s (± 0.22%) 16.74s (± 0.29%) +0.13s (+ 0.78%) 16.68s 16.80s p=0.005 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 21.10s (± 0.18%) 21.24s (± 0.26%) +0.14s (+ 0.66%) 21.14s 21.30s p=0.008 n=6
vscode - node (v18.15.0, x64)
Errors 11 11 ~ ~ ~ p=1.000 n=6
Symbols 4,072,506 4,071,974 -532 (- 0.01%) ~ ~ p=0.001 n=6
Types 1,282,587 1,282,093 -494 (- 0.04%) ~ ~ p=0.001 n=6
Memory used 3,857,921k (± 0.00%) 3,857,026k (± 0.00%) -895k (- 0.02%) 3,856,814k 3,857,269k p=0.005 n=6
Parse Time 15.72s (± 0.72%) 15.67s (± 0.45%) ~ 15.56s 15.75s p=0.375 n=6
Bind Time 5.30s (± 1.34%) 5.38s (± 2.43%) ~ 5.28s 5.55s p=0.147 n=6
Check Time 111.56s (± 2.60%) 113.89s (± 3.41%) ~ 110.78s 121.61s p=0.128 n=6
Emit Time 38.94s (± 0.37%) 43.08s (±14.98%) ~ 38.68s 54.87s p=0.689 n=6
Total Time 171.51s (± 1.74%) 178.02s (± 5.63%) ~ 170.62s 197.33s p=0.066 n=6
webpack - node (v18.15.0, x64)
Errors 40 41 +1 (+ 2.50%) ~ ~ p=0.001 n=6
Symbols 380,455 379,261 -1,194 (- 0.31%) ~ ~ p=0.001 n=6
Types 166,708 165,539 -1,169 (- 0.70%) ~ ~ p=0.001 n=6
Memory used 540,399k (± 0.01%) 539,428k (± 0.02%) -971k (- 0.18%) 539,215k 539,551k p=0.005 n=6
Parse Time 4.68s (± 0.37%) 4.68s (± 0.43%) ~ 4.66s 4.71s p=0.682 n=6
Bind Time 2.03s (± 1.00%) 2.04s (± 1.63%) ~ 1.99s 2.07s p=0.677 n=6
Check Time 22.97s (± 0.27%) 22.92s (± 0.39%) ~ 22.82s 23.05s p=0.295 n=6
Emit Time 0.00s (±244.70%) 0.00s ~ ~ ~ p=0.405 n=6
Total Time 29.69s (± 0.24%) 29.64s (± 0.30%) ~ 29.50s 29.75s p=0.369 n=6
xstate-main - node (v18.15.0, x64)
Errors 30 30 ~ ~ ~ p=1.000 n=6
Symbols 690,447 690,412 -35 (- 0.01%) ~ ~ p=0.001 n=6
Types 208,639 208,767 +128 (+ 0.06%) ~ ~ p=0.001 n=6
Memory used 586,297k (± 0.01%) 586,450k (± 0.02%) +153k (+ 0.03%) 586,293k 586,537k p=0.025 n=6
Parse Time 4.16s (± 0.67%) 4.18s (± 0.94%) ~ 4.15s 4.26s p=0.225 n=6
Bind Time 1.42s (± 1.31%) 1.39s (± 1.08%) ~ 1.38s 1.42s p=0.050 n=6
Check Time 21.07s (± 1.75%) 20.67s (± 1.69%) -0.40s (- 1.91%) 20.46s 21.38s p=0.045 n=6
Emit Time 0.00s (±244.70%) 0.00s (±154.76%) ~ 0.00s 0.01s p=0.595 n=6
Total Time 26.65s (± 1.43%) 26.25s (± 1.48%) ~ 26.02s 27.04s p=0.078 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

@Andarist Andarist force-pushed the infer-concrete-properties-of-reverse-mapped-types branch from d603445 to ced3cc1 Compare December 2, 2025 18:40
@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@Andarist
Copy link
Contributor Author

Andarist commented Dec 5, 2025

As to the webpack break - I think it's acceptable, see my write up about it here

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: Waiting on author

Development

Successfully merging this pull request may close these issues.

Improve reverse mapped types inference by creating candidates from concrete index types

6 participants