GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Restore idempotency to `resolveObjectTypeMembers` by ahejlsberg · Pull Request #64372 · microsoft/TypeScript

Conversation

@ahejlsberg

@ahejlsberg Anders Hejlsberg (ahejlsberg) commented Sep 21, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

With this PR we restore idempotent behavior to resolveObjectTypeMembers as was originally intended. In #20400 we allowed type arguments to base types of a class or interface to observe the partially resolved set of members of that class or interface. This ends up being a source of ghost errors as for example observed in #62180. We really shouldn't do this and I think it is perfectly acceptable to disallow base class type arguments from eagerly obtaining the resolved set of members of the class or interface being declared.

The PR also improves error reporting for infinitely circular type instantiations. In the example

class Model<Attributes = any> {
    public createdAt: Date;
}

type ModelAttributes<T> = Omit<T, keyof Model>;

class AutoModel<T> extends Model<ModelAttributes<T>> {}

class PersonModel extends AutoModel<PersonModel> {
    public age: number;
}

we now report the following error in the declaration of PersonModel:

Instantiations of the following types are infinitely circular: 'Model', 'ModelAttributes', 'Exclude'.

which highlights the infinitely circular instantiation that results from AutoModel<PersonModel>.

Fixes #62180.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Anders Hejlsberg (ahejlsberg) added 6 commits September 18, 2026 15:40
@ahejlsberg
Idempotent resolution of object type members
0e641ff
@ahejlsberg
Accept new baselines
adb6784
@ahejlsberg
Don't use type resolution stack
4b00dfd
@ahejlsberg
Add fourslash test
99f0df7
@ahejlsberg
Accept new baselines
8a33e98
@ahejlsberg
Remove TypeSystemPropertyName member
3b0239a
Copilot AI balanced review requested due to automatic review settings September 21, 2026 15:32
@github-project-automation github-project-automation Bot added this to PR Backlog Sep 21, 2026
@typescript-automation typescript-automation Bot assigned Anders Hejlsberg (ahejlsberg) Sep 21, 2026
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Sep 21, 2026
@typescript-automation typescript-automation Bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Sep 21, 2026
Copilot started reviewing on behalf of Anders Hejlsberg (ahejlsberg) September 21, 2026 15:32
View session
@ahejlsberg

Anders Hejlsberg (ahejlsberg) commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) test it

typescript-automation[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@typescript-automation

typescript-automation Bot commented Sep 21, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

Command Status Results
test top400 ✅ Started
user test this ✅ Started
run dt ❌ Error: Error: TF215106: Access denied. typescriptbot-github3 needs Queue builds permissions for build pipeline 79:TypeScript PR DT Tests in team project TypeScript to perform the action. For more information, contact the Azure DevOps administrator.
perf test this faster ✅ Started 👀 Results
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Copilot AI reviewed Sep 21, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Renumbering FromTypeNode breaks the exported ObjectFlags contract and generated enum synchronization.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 High severity

Open (1)
  • High severity Preserve removed bit to avoid FromTypeNode enum serialization breakage · New
What changed in this PR

Restores idempotent object-member resolution and prevents partially resolved members from causing ghost diagnostics.

Changes:

  • Delays publishing structured members until resolution completes.
  • Removes unresolved-member cache state.
  • Adds regression coverage and updates affected baselines.
File Description
tsc/​internal/​checker/​checker.go Revises member resolution and caching.
tsc/​internal/​checker/​types.go Removes the unresolved-members flag.
tsc/​internal/​fourslash/​tests/​noGhostErrors_test.go Tests recursive inference without ghost errors.
tsc/​testdata/​baselines/​reference/​compiler/​recursiveTypeInference.types Updates inferred recursive types.
tsc/​testdata/​baselines/​reference/​compiler/​mutuallyRecursiveInference.errors.txt Records new recursion-depth diagnostic.
tsc/​testdata/​baselines/​reference/​compiler/​keyofGenericExtendingClassDoubleLayer.errors.txt Records new recursion-depth diagnostic.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread tsc/internal/checker/types.go
ObjectFlagsIdenticalBaseTypeExists = 1 << 28 // has a defined cachedEquivalentBaseType member
ObjectFlagsUnresolvedMembers = 1 << 29 // Member resolution in process
ObjectFlagsFromTypeNode = 1 << 30 // Originates in resolution of AST type node
ObjectFlagsFromTypeNode = 1 << 29 // Originates in resolution of AST type node
@ahejlsberg
Formatting
9cb685e
@jakebailey

Jake Bailey (jakebailey) commented Sep 21, 2026

Copy link
Copy Markdown
Member

I fixed the DT error (forgot to grant a perm), but note that DT doesn't check 7.0 or 7.1 quite yet.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@typescript-automation

typescript-automation Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Anders Hejlsberg (@ahejlsberg)
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 - native
Errors 41 41 ~ ~ ~ p=1.000 n=12
Symbols 115,480 115,480 ~ ~ ~ p=1.000 n=12
Types 96,949 96,949 ~ ~ ~ p=1.000 n=12
Memory Used 148,450k (± 0.41%) 149,016k (± 0.54%) ~ 147,047k 150,787k p=0.291 n=12
Memory Allocs 2,271,609 (± 0.01%) 2,269,434 (± 0.00%) -2,175 (- 0.10%) 2,269,214 2,269,755 p=0.000 n=12
Config Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Parse Time 0.041s (± 4.59%) 0.042s (± 3.64%) ~ 0.039s 0.047s p=0.256 n=12
Bind Time 0.013s (±10.83%) 0.012s (±12.82%) ~ 0.010s 0.018s p=0.254 n=12
Check Time 0.503s (± 0.70%) 0.509s (± 0.78%) +0.007s (+ 1.31%) 0.502s 0.521s p=0.011 n=12
Emit Time 0.273s (± 2.17%) 0.270s (± 2.05%) ~ 0.253s 0.283s p=0.944 n=12
Total Time 0.836s (± 0.66%) 0.840s (± 0.69%) ~ 0.829s 0.860s p=0.172 n=12
angular-1 - native
Errors 3 3 ~ ~ ~ p=1.000 n=12
Symbols 847,386 (± 0.10%) 846,885 (± 0.06%) ~ 845,477 848,037 p=0.068 n=12
Types 250,003 (± 0.00%) 250,003 (± 0.00%) ~ 250,001 250,013 p=0.755 n=12
Memory Used 793,676k (± 0.05%) 793,498k (± 0.06%) ~ 792,122k 795,266k p=0.478 n=12
Memory Allocs 12,958,810 (± 0.03%) 12,944,638 (± 0.02%) -14,172 (- 0.11%) 12,941,340 12,957,586 p=0.000 n=12
Config Time 0.016s (± 1.13%) 0.016s ~ ~ ~ p=1.000 n=12
Parse Time 0.270s (± 3.14%) 0.273s (± 2.13%) ~ 0.255s 0.291s p=0.434 n=12
Bind Time 0.067s (±15.78%) 0.062s (± 6.49%) ~ 0.059s 0.078s p=0.856 n=12
Check Time 0s 0s ~ ~ ~ p=1.000 n=12
Emit Time 1.636s (± 1.59%) 1.617s (± 1.48%) ~ 1.574s 1.693s p=0.182 n=12
Total Time 2.009s (± 1.61%) 1.985s (± 1.33%) ~ 1.944s 2.067s p=0.117 n=12
mui-docs - native
Errors 11,348 (± 0.02%) 11,347 (± 0.01%) ~ 11,344 11,349 p=0.054 n=12
Symbols 4,305,148 4,305,148 ~ ~ ~ p=1.000 n=12
Types 1,451,831 1,451,831 ~ ~ ~ p=1.000 n=12
Memory Used 4,154,537k (± 0.06%) 4,155,107k (± 0.04%) ~ 4,150,997k 4,158,698k p=0.755 n=12
Memory Allocs 39,225,804 (± 0.05%) 39,169,392 (± 0.03%) -56,413 (- 0.14%) 39,127,355 39,193,834 p=0.000 n=12
Config Time 0.016s (± 1.81%) 0.016s (± 1.98%) ~ 0.015s 0.016s p=1.000 n=12
Parse Time 0.566s (± 1.50%) 0.559s (± 3.35%) ~ 0.482s 0.596s p=1.000 n=12
Bind Time 0.002s 0.002s ~ ~ ~ p=1.000 n=12
Check Time 15.059s (± 0.15%) 15.024s (± 0.23%) ~ 14.922s 15.096s p=0.103 n=12
Emit Time 0.474s (±11.46%) 0.438s (± 2.77%) ~ 0.425s 0.472s p=0.231 n=12
Total Time 16.882s (± 0.42%) 16.782s (± 0.34%) -0.100s (- 0.59%) 16.635s 16.991s p=0.007 n=12
strada-build-src - native
Errors 0 0 ~ ~ ~ p=1.000 n=12
Symbols 1,394,252 1,394,252 ~ ~ ~ p=1.000 n=12
Types 443,566 443,566 ~ ~ ~ p=1.000 n=12
Memory Used 1,643,473k (± 0.31%) 1,645,781k (± 0.23%) ~ 1,632,510k 1,653,633k p=0.410 n=12
Memory Allocs 96,964,620 (± 0.04%) 96,933,860 (± 0.04%) ~ 96,818,842 97,019,427 p=0.160 n=12
Config Time 0.004s (±11.61%) 0.004s (± 9.48%) ~ 0.003s 0.005s p=1.000 n=12
Parse Time 0.190s (± 3.15%) 0.197s (± 2.34%) +0.007s (+ 3.78%) 0.186s 0.208s p=0.050 n=12
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Check Time 1.856s (± 0.29%) 1.856s (± 0.32%) ~ 1.844s 1.874s p=1.000 n=12
Emit Time 0.268s (± 6.29%) 0.279s (± 4.34%) ~ 0.233s 0.301s p=0.370 n=12
Total Time 24.960s (± 0.86%) 25.158s (± 0.80%) ~ 24.503s 25.659s p=0.203 n=12
strada-compiler - native
Errors 0 0 ~ ~ ~ p=1.000 n=12
Symbols 337,531 337,531 ~ ~ ~ p=1.000 n=12
Types 198,885 198,885 ~ ~ ~ p=1.000 n=12
Memory Used 319,701k (± 0.07%) 319,566k (± 0.04%) ~ 319,274k 320,087k p=0.291 n=12
Memory Allocs 4,673,007 (± 0.01%) 4,668,940 (± 0.01%) -4,066 (- 0.09%) 4,667,369 4,670,214 p=0.000 n=12
Config Time 0.001s 0.001s ~ ~ ~ p=1.000 n=12
Parse Time 0.112s (± 4.82%) 0.111s (± 4.23%) ~ 0.098s 0.123s p=0.877 n=12
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Check Time 1.080s (± 0.55%) 1.086s (± 0.49%) ~ 1.070s 1.098s p=0.085 n=12
Emit Time 0.131s (±13.09%) 0.120s (±12.83%) ~ 0.093s 0.159s p=0.401 n=12
Total Time 1.377s (± 1.14%) 1.373s (± 0.94%) ~ 1.345s 1.412s p=0.619 n=12
ts-pre-modules - native
Errors 87 87 ~ ~ ~ p=1.000 n=12
Symbols 305,179 305,179 ~ ~ ~ p=1.000 n=12
Types 181,926 181,926 ~ ~ ~ p=1.000 n=12
Memory Used 277,193k (± 0.03%) 277,127k (± 0.01%) ~ 277,029k 277,267k p=0.193 n=12
Memory Allocs 1,642,050 (± 0.01%) 1,634,541 (± 0.01%) -7,509 (- 0.46%) 1,634,146 1,634,968 p=0.000 n=12
Config Time 0.000s (±217.90%) 0.000s (±217.90%) ~ 0.000s 0.001s p=1.000 n=12
Parse Time 0.099s (± 4.79%) 0.100s (± 3.48%) ~ 0.090s 0.108s p=0.702 n=12
Bind Time 0.036s (±12.47%) 0.039s (±13.84%) ~ 0.028s 0.053s p=0.123 n=12
Check Time 0.848s (± 0.62%) 0.843s (± 0.57%) ~ 0.829s 0.853s p=0.173 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 0.997s (± 0.94%) 0.996s (± 0.94%) ~ 0.974s 1.017s p=0.744 n=12
vscode - native
Errors 386 386 ~ ~ ~ p=1.000 n=12
Symbols 9,235,564 9,235,564 ~ ~ ~ p=1.000 n=12
Types 3,154,404 3,154,404 ~ ~ ~ p=1.000 n=12
Memory Used 6,165,406k (± 0.02%) 6,165,657k (± 0.02%) ~ 6,163,161k 6,169,642k p=0.671 n=12
Memory Allocs 47,091,555 (± 0.03%) 46,971,469 (± 0.03%) -120,086 (- 0.26%) 46,952,929 47,016,004 p=0.000 n=12
Config Time 0.065s (± 0.28%) 0.065s (± 0.28%) ~ 0.064s 0.065s p=1.000 n=12
Parse Time 1.727s (± 3.01%) 1.712s (± 3.59%) ~ 1.597s 1.871s p=0.630 n=12
Bind Time 0.507s (±20.53%) 0.527s (±21.58%) ~ 0.378s 0.791s p=0.560 n=12
Check Time 11.143s (± 1.33%) 11.134s (± 1.62%) ~ 10.780s 11.455s p=0.787 n=12
Emit Time 4.437s (±11.89%) 4.266s (±12.88%) ~ 3.457s 5.344s p=0.369 n=12
Total Time 17.985s (± 2.43%) 17.815s (± 2.53%) ~ 17.059s 18.699s p=0.219 n=12
webpack - native
Errors 842 843 +1 (+ 0.12%) ~ ~ p=0.000 n=12
Symbols 1,397,420 1,397,446 +26 (+ 0.00%) ~ ~ p=0.000 n=12
Types 605,320 605,325 +5 (+ 0.00%) ~ ~ p=0.000 n=12
Memory Used 968,564k (± 0.01%) 968,473k (± 0.02%) ~ 967,926k 969,090k p=0.551 n=12
Memory Allocs 6,247,584 (± 0.02%) 6,218,984 (± 0.02%) -28,600 (- 0.46%) 6,216,067 6,224,018 p=0.000 n=12
Config Time 0.009s (± 2.77%) 0.009s (± 5.25%) ~ 0.009s 0.011s p=0.137 n=12
Parse Time 0.253s (± 2.94%) 0.269s (± 3.39%) 🔻+0.015s (+ 6.05%) 0.247s 0.300s p=0.010 n=12
Bind Time 0.068s (±19.30%) 0.073s (±16.61%) ~ 0.054s 0.105s p=0.235 n=12
Check Time 1.871s (± 0.40%) 1.911s (± 1.82%) ~ 1.861s 2.010s p=0.075 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 2.237s (± 0.34%) 2.302s (± 1.59%) +0.065s (+ 2.91%) 2.227s 2.424s p=0.000 n=12
xstate-main - native
Errors 0 0 ~ ~ ~ p=1.000 n=12
Symbols 1,045,695 1,045,695 ~ ~ ~ p=1.000 n=12
Types 383,049 383,049 ~ ~ ~ p=1.000 n=12
Memory Used 611,332k (± 0.01%) 611,319k (± 0.01%) ~ 611,114k 611,563k p=0.990 n=12
Memory Allocs 4,829,565 (± 0.04%) 4,813,490 (± 0.02%) -16,075 (- 0.33%) 4,810,268 4,816,269 p=0.000 n=12
Config Time 0.003s (±11.61%) 0.003s (±12.54%) ~ 0.002s 0.003s p=1.000 n=12
Parse Time 0.150s (± 2.41%) 0.148s (± 4.48%) ~ 0.135s 0.164s p=0.451 n=12
Bind Time 0.038s (±16.55%) 0.047s (±18.09%) 🔻+0.008s (+22.17%) 0.034s 0.070s p=0.019 n=12
Check Time 1.187s (± 0.63%) 1.195s (± 0.85%) ~ 1.172s 1.223s p=0.155 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 1.388s (± 0.59%) 1.405s (± 0.78%) +0.017s (+ 1.23%) 1.384s 1.443s p=0.025 n=12
System info unknown
Hosts
  • native
Scenarios
  • Compiler-Unions - native
  • angular-1 - native
  • mui-docs - native
  • strada-build-src - native
  • strada-compiler - native
  • ts-pre-modules - native
  • vscode - native
  • webpack - native
  • xstate-main - native
Benchmark Name Iterations
Current pr 12
Baseline baseline 12

Developer Information:

Download Benchmarks

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Anders Hejlsberg (ahejlsberg) added 2 commits September 21, 2026 10:57
@ahejlsberg
Generate enums
698e180
@ahejlsberg
Merge branch 'main' into fix-62180
d2cb226
@ahejlsberg

Anders Hejlsberg (ahejlsberg) commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) user test this
TypeScript Bot (@typescript-bot) test top400

typescript-automation[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@typescript-automation

typescript-automation Bot commented Sep 21, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

Command Status Results
user test this ✅ Started ✅ Results
test top400 ✅ Started 👀 Results
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ahejlsberg

Anders Hejlsberg (ahejlsberg) commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

Trying tests again...

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@typescript-automation

typescript-automation Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Anders Hejlsberg (@ahejlsberg) Here are the results of running the user tests with tsc comparing main and refs/pull/64372/merge:

There were infrastructure failures potentially unrelated to your change:

  • 1 instance of "Git clone failed"
  • 1 instance of "Package install failed"

Otherwise...

Everything looks good!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@typescript-automation

typescript-automation Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Anders Hejlsberg (@ahejlsberg) Here are the results of running the top 400 repos with tsc comparing main and refs/pull/64372/merge:

Something interesting changed - please have a look.

Details

stablyai/orca

14 of 24 projects failed to build with the old tsc and were ignored

config/tsconfig.cli.json

  • error TS2589: Type instantiation is excessively deep and possibly infinite.
    • src/shared/plugins/plugin-host-api.ts#L89 in config/tsconfig.cli.json

config/tsconfig.tc.cli.json

  • error TS2589: Type instantiation is excessively deep and possibly infinite.
    • src/shared/plugins/plugin-host-api.ts#L89 in config/tsconfig.tc.cli.json

config/tsconfig.tc.web.json

  • error TS2589: Type instantiation is excessively deep and possibly infinite.
    • src/shared/plugins/plugin-host-api.ts#L89 in config/tsconfig.tc.web.json
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Anders Hejlsberg (ahejlsberg) added 2 commits September 22, 2026 13:31
@ahejlsberg
Improve inifite type instantiation diagnostics
b81c37d
@ahejlsberg
Accept new baselines
14fc0dc
jakebailey
Jake Bailey (jakebailey) reviewed Sep 22, 2026
View reviewed changes
Comment thread tsc/internal/checker/utilities.go
}

func quotedAndCommaSeparated(items []string) string {
return strings.Join(core.Map(items, func(item string) string { return "'" + item + "'" }), ", ")

@jakebailey Jake Bailey (jakebailey) Sep 22, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This'd be faster as a strings.Builder and manual loop, but, it's probably not called enough to matter

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ahejlsberg
Anders Hejlsberg (ahejlsberg) requested a review from Ryan Cavanaugh (RyanCavanaugh) September 28, 2026 18:05
@ahejlsberg
Merge branch 'main' into fix-62180
12832b7
RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh) approved these changes Sep 28, 2026
View reviewed changes
@ahejlsberg
Anders Hejlsberg (ahejlsberg) enabled auto-merge September 28, 2026 22:17
@ahejlsberg
Merge branch 'main' into fix-62180
b470c24
RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh) approved these changes Sep 28, 2026
View reviewed changes
@ahejlsberg
Accept new baselines
03e0c65
jakebailey
Jake Bailey (jakebailey) approved these changes Sep 29, 2026
View reviewed changes
@ahejlsberg
Anders Hejlsberg (ahejlsberg) added this pull request to the merge queue Sep 29, 2026
Merged via the queue into main with commit 19dadef Sep 29, 2026
29 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@ahejlsberg
Anders Hejlsberg (ahejlsberg) deleted the fix-62180 branch September 29, 2026 03:00
Max Schwenk (maschwenk) added a commit to maschwenk/TypeScript that referenced this pull request Sep 29, 2026
@maschwenk @claude
Drop the partial member handling now that microsoft#64372 is in
39ce30c
resolveObjectTypeMembers no longer exposes a type's declared members while
its base types resolve, so the lazy table doesn't need to either. A table is
now either being prepared, during which the type resolves its members as
usual, or ready; the materialized state, the count of inherited base types
and the partial lookup paths go away.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@maschwenk Max Schwenk (maschwenk) mentioned this pull request Sep 29, 2026
TS5115 "infinitely circular" on .catchall(z.json()) with the TypeScript 7.1 nightlies colinhacks/zod#6637
Closed
@colinhacks Colin McDonnell (colinhacks) mentioned this pull request Oct 2, 2026
fix(types): declare record output and input as members, not base type arguments colinhacks/zod#6645
Merged
Colin McDonnell (colinhacks) added a commit to colinhacks/zod that referenced this pull request Oct 2, 2026
@colinhacks
fix(types): declare record output and input as members, not base type…
0b216ef
… arguments (#6645)

microsoft/TypeScript#64372 stops base type arguments from reading the members of the interface being declared, so z.json(), whose record branch refers back to the JSON schema, reported TS5115 and inferred a record input of any.
@colinhacks Colin McDonnell (colinhacks) mentioned this pull request Oct 2, 2026
TS5115 in published Zod 4.5–4.6 types after #64372 #64605
Closed
This was referenced Oct 7, 2026
TS5115 on Zod 4.5 to 4.6.5 z.json() types (inherited from upstream, still open there) pingdotgg/ts-rust#20
Open
checker: read a type's declared members while its base types resolve pingdotgg/ts-rust#21
Closed
Read a type's declared members while its base types resolve #64688
Closed
Colin McDonnell (colinhacks) added a commit to colinhacks/zod that referenced this pull request Oct 12, 2026
@colinhacks
fix(types): declare record output and input as members, not base type…
a2ba4a6
… arguments (#6645)

microsoft/TypeScript#64372 stops base type arguments from reading the members of the interface being declared, so z.json(), whose record branch refers back to the JSON schema, reported TS5115 and inferred a record input of any.
Colin McDonnell (colinhacks) pushed a commit to colinhacks/zod that referenced this pull request Oct 12, 2026
@maschwenk @claude @colinhacks
test: cover .catchall(z.json()) inference
8018726
the record internals fix from this branch landed separately in #6645, which matches the change Anders suggested in microsoft/TypeScript#64372; this keeps the regression test.

Fixes #6637

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@SawyerHood Sawyer Hood (SawyerHood) mentioned this pull request Oct 20, 2026
Typecheck with tsrs instead of TypeScript 7 tsc get-bb/bb#5861
Merged
Sawyer Hood (SawyerHood) added a commit to get-bb/bb that referenced this pull request Oct 20, 2026
@SawyerHood @kirbyhood
Typecheck with tsrs instead of TypeScript 7 tsc (#5861)
75b90b9
## Human comments

## What was wrong

Typechecking ran on TypeScript 7.0.2 (`typescript-7` →
`npm:typescript@^7.0.2`).
[tsrs](https://blog.cloudflare.com/typescript-rust-port), the Rust port
of the TypeScript 7 compiler, is roughly twice as fast and uses half the
memory on bb (numbers below). This PR moves bb's typechecking to it.

tsrs 0.18.0 is a faithful port of TypeScript `7.1.0-dev.20260930.4` and
prints the same diagnostics. Moving to it therefore also moves bb onto a
7.1 nightly, which brings two upstream regressions. tsrs also has no
Windows binary yet:

1. **TS5115 on zod's `z.json()`** ("Instantiations of the following
types appear infinitely circular: 'IsOptionalIn', '$ZodTypeInternals',
'$InferZodRecordInput'"). Reported as microsoft/TypeScript#64605. The
first nightly that fails is `7.1.0-dev.20260929.1`, after
microsoft/TypeScript#64372.
2. **TS7031 on a contextually typed destructured parameter with `=
{}`.** Reported as microsoft/TypeScript#64431, with fixes proposed in
microsoft/TypeScript#64440 and microsoft/TypeScript#64671. The first
nightly that fails is `7.1.0-dev.20260923.1`.
3. **No `win32-x64` package through 0.18.0.** tsrs's `npm/README.md`
says its release workflow now builds one. Intel Macs remain unsupported.

## What changed

- **tsrs replaces TypeScript 7 for typechecking.** Every `package.json`
that listed `typescript-7` now lists `tsrs` pinned to
`0.18.0-ts7.1.0-dev.20260929` (exact pin because the releases are
experimental), and every `typecheck` script runs `tsrs --noEmit`.
`typescript` (the `@typescript/typescript6` JS API) stays for tooling
that imports it.
- **Workaround for regression 1.** Core code uses
`jsonValueSchema`/`jsonObjectSchema` from `@bb/domain` instead of
`z.json()`: `apps/desktop` (CDP + capture, plus two tests) and
`packages/desktop-contract`. Forkable plugins can't import `@bb/domain`,
so account-pool, bb-account, connect, mcp and workflows each define the
same `z.lazy` schema, typed with the SDK's `JsonValue`. That schema has
the same structure as zod's `z.json()`, so runtime validation is
unchanged. The only remaining `z.json()` calls are in two tests that
don't trigger the error.
- **Workaround for regression 2.** The abort-signal mock in
`system-config-atoms.local-access.test.ts` annotates its parameter.
- **Windows.** The `windows-foundation` job now runs `lint test` without
`typecheck`. The Windows typecheck steps in `build-desktop.yml` and the
`nightly-desktop-windows` job are removed.
`plugin-authoring-doc-examples.test.ts` now launches tsrs and skips on
win32. Types don't depend on the OS, and the Linux `static-checks` job
still typechecks every package. These can come back once tsrs publishes
`win32-x64`.
- Left alone: the plugin scaffold's `typescript` dependency for user
plugins, and the bb-app tarball smoke test's `npx typescript` consumer
check. Both stand in for what plugin authors and SDK users run.

## How you verified

- `pnpm exec turbo run typecheck --force --continue` on tsrs: 105/105
pass. Before the workarounds, 7 failed, with 16 TS5115 errors and 1
TS7031.
- Every changed package also passes `tsc --noEmit` on TypeScript 7.0.2.
- Both regressions reproduce on tsc `7.1.0-dev.20260930.4` and today's
`7.1.0-dev.20261020.3`, and pass on 7.0.2. I found the first failing
nightly for each by trying successive builds.
- `turbo run lint test` for `@bb/desktop`, `@bb/desktop-contract`,
account-pool, bb-account, connect, bb--mcp and workflows: 16/16 pass.
The doc-examples test passes with tsrs, and the system-config atoms test
passes (12/12).
- Speed, same machine, warm, `--noEmit`, best of two runs:

  | package | tsc (TS 7.0.2) | tsrs |
  |---|---|---|
  | `apps/server` | 11.3s, 3.3 GB | 5.5s, 1.6 GB |
  | `apps/app` | 11.4s, 3.4 GB | 6.4s, 1.7 GB |

- `pnpm install --frozen-lockfile` is clean, and `oxfmt --check` passes.

> AGENT GENERATED

---------

Co-authored-by: Sawyer <[email protected]>
@fengmk2 MK (fengmk2) (fengmk2) mentioned this pull request Nov 8, 2026
feat(lint): replace tsgolint with tsrs-lint voidzero-dev/vite-plus#3352
Merged
TygerKu (TygerKu) pushed a commit to TygerKu/bb-plugin-provider-claude-code-variant that referenced this pull request Nov 9, 2026
@SawyerHood @kirbyhood
Typecheck with tsrs instead of TypeScript 7 tsc (#5861)
cb603a8
## Human comments

## What was wrong

Typechecking ran on TypeScript 7.0.2 (`typescript-7` →
`npm:typescript@^7.0.2`).
[tsrs](https://blog.cloudflare.com/typescript-rust-port), the Rust port
of the TypeScript 7 compiler, is roughly twice as fast and uses half the
memory on bb (numbers below). This PR moves bb's typechecking to it.

tsrs 0.18.0 is a faithful port of TypeScript `7.1.0-dev.20260930.4` and
prints the same diagnostics. Moving to it therefore also moves bb onto a
7.1 nightly, which brings two upstream regressions. tsrs also has no
Windows binary yet:

1. **TS5115 on zod's `z.json()`** ("Instantiations of the following
types appear infinitely circular: 'IsOptionalIn', '$ZodTypeInternals',
'$InferZodRecordInput'"). Reported as microsoft/TypeScript#64605. The
first nightly that fails is `7.1.0-dev.20260929.1`, after
microsoft/TypeScript#64372.
2. **TS7031 on a contextually typed destructured parameter with `=
{}`.** Reported as microsoft/TypeScript#64431, with fixes proposed in
microsoft/TypeScript#64440 and microsoft/TypeScript#64671. The first
nightly that fails is `7.1.0-dev.20260923.1`.
3. **No `win32-x64` package through 0.18.0.** tsrs's `npm/README.md`
says its release workflow now builds one. Intel Macs remain unsupported.

## What changed

- **tsrs replaces TypeScript 7 for typechecking.** Every `package.json`
that listed `typescript-7` now lists `tsrs` pinned to
`0.18.0-ts7.1.0-dev.20260929` (exact pin because the releases are
experimental), and every `typecheck` script runs `tsrs --noEmit`.
`typescript` (the `@typescript/typescript6` JS API) stays for tooling
that imports it.
- **Workaround for regression 1.** Core code uses
`jsonValueSchema`/`jsonObjectSchema` from `@bb/domain` instead of
`z.json()`: `apps/desktop` (CDP + capture, plus two tests) and
`packages/desktop-contract`. Forkable plugins can't import `@bb/domain`,
so account-pool, bb-account, connect, mcp and workflows each define the
same `z.lazy` schema, typed with the SDK's `JsonValue`. That schema has
the same structure as zod's `z.json()`, so runtime validation is
unchanged. The only remaining `z.json()` calls are in two tests that
don't trigger the error.
- **Workaround for regression 2.** The abort-signal mock in
`system-config-atoms.local-access.test.ts` annotates its parameter.
- **Windows.** The `windows-foundation` job now runs `lint test` without
`typecheck`. The Windows typecheck steps in `build-desktop.yml` and the
`nightly-desktop-windows` job are removed.
`plugin-authoring-doc-examples.test.ts` now launches tsrs and skips on
win32. Types don't depend on the OS, and the Linux `static-checks` job
still typechecks every package. These can come back once tsrs publishes
`win32-x64`.
- Left alone: the plugin scaffold's `typescript` dependency for user
plugins, and the bb-app tarball smoke test's `npx typescript` consumer
check. Both stand in for what plugin authors and SDK users run.

## How you verified

- `pnpm exec turbo run typecheck --force --continue` on tsrs: 105/105
pass. Before the workarounds, 7 failed, with 16 TS5115 errors and 1
TS7031.
- Every changed package also passes `tsc --noEmit` on TypeScript 7.0.2.
- Both regressions reproduce on tsc `7.1.0-dev.20260930.4` and today's
`7.1.0-dev.20261020.3`, and pass on 7.0.2. I found the first failing
nightly for each by trying successive builds.
- `turbo run lint test` for `@bb/desktop`, `@bb/desktop-contract`,
account-pool, bb-account, connect, bb--mcp and workflows: 16/16 pass.
The doc-examples test passes with tsrs, and the system-config atoms test
passes (12/12).
- Speed, same machine, warm, `--noEmit`, best of two runs:

  | package | tsc (TS 7.0.2) | tsrs |
  |---|---|---|
  | `apps/server` | 11.3s, 3.3 GB | 5.5s, 1.6 GB |
  | `apps/app` | 11.4s, 3.4 GB | 6.4s, 1.7 GB |

- `pnpm install --frozen-lockfile` is clean, and `oxfmt --check` passes.

> AGENT GENERATED

---------

Co-authored-by: Sawyer <[email protected]>
Romain Lanz (RomainLanz) added a commit to RomainLanz/tsrs-type-issue that referenced this pull request Nov 11, 2026
@RomainLanz
Point the repro at the TypeScript 7.1 regression
cd93ac1
The error does not come from tsrs: TypeScript 7.1 reports it too, and
7.0 does not. The nightlies 7.1.0-dev.20260805.1 and 20260806.1 differ
by microsoft/typescript-go#4820 alone, which makes it appear as TS2589.
microsoft/TypeScript#64372 later turned it into TS5115.

The repro now checks with TypeScript 7.0.2, both nightlies and the
current next build instead of tsc 6, tsgo and tsrs.
@RomainLanz Romain Lanz (RomainLanz) mentioned this pull request Nov 11, 2026
7.1 regression: bounded recursive types report TS5115 when inferred through a closure #65440
Open
@maschwenk Max Schwenk (maschwenk) mentioned this pull request Nov 11, 2026
7.1 regression: TS5115 for import("cloudflare:workers") with @cloudflare/workers-types #65445
Closed
@ahejlsberg Anders Hejlsberg (ahejlsberg) mentioned this pull request Nov 24, 2026
Regression in 7.1 nightly: recursive types cause TS5115 error (infinitely circular types) #65662
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@jakebailey Jake Bailey (jakebailey) jakebailey approved these changes
@RyanCavanaugh Ryan Cavanaugh (RyanCavanaugh) RyanCavanaugh approved these changes
@DanielRosenwasser Daniel Rosenwasser (DanielRosenwasser) Awaiting requested review from DanielRosenwasser

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@ahejlsberg Anders Hejlsberg (ahejlsberg)

Labels

Author: Team For Milestone Bug PRs that fix a bug with a specific milestone

Projects

PR Backlog
Status: Done

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Confusing missing property error in a circular situation

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@ahejlsberg @jakebailey @RyanCavanaugh
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.