Skip to content

Distinguish between non-distributed and distributed type parameters - #64237

Open
Anders Hejlsberg (ahejlsberg) wants to merge 12 commits into
mainfrom
fix-63708
Open

Distinguish between non-distributed and distributed type parameters#64237
Anders Hejlsberg (ahejlsberg) wants to merge 12 commits into
mainfrom
fix-63708

Conversation

@ahejlsberg

@ahejlsberg Anders Hejlsberg (ahejlsberg) commented Sep 10, 2026

Copy link
Copy Markdown
Member

With this PR we distinguish between non-distributed and distributed type parameters in conditional types. Previously we didn't which could lead to constraint violations. In the example

type Issue<A, B extends A> =
  A extends unknown ?
    Show<A, B> :  // Error
    never;

type Show<T, U extends T> = [T, U] & {};

we previously didn't report a constraint violation on Show<A, B>. We now report a new error

Type 'B' does not satisfy the constraint 'A'.
  'B' is only assignable to the non-distributed 'A' and 'A' has been distributed here.

A type parameter is considered to be distributed when it is referenced within a conditional type that distributes that type parameter. Specfically, in a conditional type T extends XXX ? AAA : BBB, T is considered distributed within the types XXX, AAA, and BBB.

The distributed form of a type parameter is a subtype of the non-distributed form of that type parameter, and behaves accordingly. In the Issue<A, B extends A> type above, B is known to extend the non-distributed A, but that doesn't imply it extends the distributed A, which is a subtype of the non-distributed A. For example, the type Issue<0 | 1, 0> creates a union of Show<0, 0> and Show<1, 0>, the second of which violates the constraints declared in Show<T, U extends T>.

The language service now shows (distributed) when hovering over distributed type parameters:

image

This makes it easier to recognize when a type parameter is distributed.

Fixes #63708.

@ahejlsberg

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) perf test this faster
TypeScript Bot (@typescript-bot) test top1000

@typescript-automation

typescript-automation Bot commented Sep 10, 2026

Copy link
Copy Markdown

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

Command Status Results
perf test this faster ✅ Started 👀 Results
test top1000 ✅ Started 👀 Results

@typescript-automation typescript-automation Bot added For Milestone Bug PRs that fix a bug with a specific milestone and removed For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Sep 10, 2026
@typescript-automation

Copy link
Copy Markdown

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,945 96,949 +4 (+ 0.00%) ~ ~ p=0.000 n=12
Memory Used 148,440k (± 0.49%) 148,331k (± 0.57%) ~ 147,069k 150,826k p=0.514 n=12
Memory Allocs 2,271,238 (± 0.01%) 2,271,216 (± 0.00%) ~ 2,270,938 2,271,423 p=0.831 n=12
Config Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Parse Time 0.040s (± 2.93%) 0.041s (± 3.10%) ~ 0.038s 0.045s p=0.649 n=12
Bind Time 0.012s (±15.25%) 0.012s (±11.98%) ~ 0.010s 0.017s p=0.847 n=12
Check Time 0.494s (± 1.14%) 0.489s (± 0.96%) ~ 0.482s 0.507s p=0.061 n=12
Emit Time 0.275s (± 1.82%) 0.266s (± 2.07%) 🟩-0.009s (- 3.13%) 0.251s 0.284s p=0.039 n=12
Total Time 0.828s (± 1.29%) 0.815s (± 1.03%) ~ 0.799s 0.852s p=0.057 n=12
angular-1 - native
Errors 3 3 ~ ~ ~ p=1.000 n=12
Symbols 846,680 (± 0.09%) 846,820 (± 0.10%) ~ 844,275 848,461 p=0.755 n=12
Types 249,851 (± 0.00%) 250,002 (± 0.00%) +151 (+ 0.06%) 250,000 250,005 p=0.000 n=12
Memory Used 793,532k (± 0.04%) 793,463k (± 0.06%) ~ 792,352k 795,078k p=0.932 n=12
Memory Allocs 12,959,056 (± 0.10%) 12,952,135 (± 0.02%) ~ 12,949,866 12,962,632 p=0.755 n=12
Config Time 0.016s 0.016s ~ ~ ~ p=1.000 n=12
Parse Time 0.272s (± 3.11%) 0.267s (± 2.31%) ~ 0.246s 0.284s p=0.271 n=12
Bind Time 0.065s (±14.25%) 0.064s (±13.78%) ~ 0.058s 0.107s p=0.945 n=12
Check Time 0s 0s ~ ~ ~ p=1.000 n=12
Emit Time 1.640s (± 1.08%) 1.629s (± 0.74%) ~ 1.610s 1.673s p=0.271 n=12
Total Time 2.007s (± 1.17%) 1.991s (± 0.96%) ~ 1.960s 2.069s p=0.203 n=12
mui-docs - native
Errors 11,273 (± 0.04%) 11,278 (± 0.02%) +5 (+ 0.05%) 11,268 11,281 p=0.013 n=12
Symbols 4,306,797 4,306,797 ~ ~ ~ p=1.000 n=12
Types 1,602,709 1,604,454 +1,745 (+ 0.11%) ~ ~ p=0.000 n=12
Memory Used 4,740,772k (± 0.03%) 4,740,087k (± 0.03%) ~ 4,736,395k 4,744,062k p=0.478 n=12
Memory Allocs 48,030,202 (± 0.03%) 48,030,593 (± 0.03%) ~ 47,983,732 48,079,884 p=0.843 n=12
Config Time 0.016s 0.016s (± 1.14%) ~ 0.015s 0.016s p=1.000 n=12
Parse Time 0.556s (± 1.66%) 0.540s (± 2.55%) ~ 0.500s 0.563s p=0.110 n=12
Bind Time 0.002s 0.002s ~ ~ ~ p=1.000 n=12
Check Time 16.714s (± 0.30%) 16.798s (± 0.43%) +0.084s (+ 0.50%) 16.654s 16.998s p=0.020 n=12
Emit Time 0.461s (± 2.48%) 0.453s (± 2.85%) ~ 0.431s 0.473s p=0.944 n=12
Total Time 18.463s (± 0.36%) 18.543s (± 0.46%) ~ 18.379s 18.733s p=0.147 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,418 443,562 +144 (+ 0.03%) ~ ~ p=0.000 n=12
Memory Used 1,648,220k (± 0.21%) 1,647,474k (± 0.19%) ~ 1,640,802k 1,656,106k p=0.630 n=12
Memory Allocs 97,040,806 (± 0.03%) 97,066,261 (± 0.03%) ~ 96,951,724 97,116,810 p=0.101 n=12
Config Time 0.004s (±15.80%) 0.004s (±13.41%) ~ 0.003s 0.006s p=0.434 n=12
Parse Time 0.194s (± 2.55%) 0.191s (± 2.52%) ~ 0.183s 0.203s p=0.522 n=12
Bind Time 0.000s (±217.90%) 0.000s ~ ~ ~ p=1.000 n=12
Check Time 1.809s (± 0.54%) 1.811s (± 0.47%) ~ 1.788s 1.835s p=0.921 n=12
Emit Time 0.280s (± 6.80%) 0.274s (± 6.08%) ~ 0.238s 0.323s p=0.523 n=12
Total Time 24.835s (± 0.84%) 24.778s (± 0.87%) ~ 24.328s 25.303s p=0.799 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,830 198,881 +51 (+ 0.03%) ~ ~ p=0.000 n=12
Memory Used 319,473k (± 0.03%) 319,476k (± 0.03%) ~ 319,282k 319,790k p=0.977 n=12
Memory Allocs 4,673,046 (± 0.01%) 4,672,710 (± 0.01%) ~ 4,671,604 4,674,343 p=0.128 n=12
Config Time 0.001s 0.001s ~ ~ ~ p=1.000 n=12
Parse Time 0.112s (± 5.41%) 0.117s (± 3.64%) ~ 0.108s 0.129s p=0.138 n=12
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Check Time 1.051s (± 0.45%) 1.051s (± 0.44%) ~ 1.042s 1.062s p=0.899 n=12
Emit Time 0.121s (±11.75%) 0.143s (± 9.57%) 🔻+0.022s (+17.89%) 0.104s 0.162s p=0.025 n=12
Total Time 1.342s (± 0.60%) 1.360s (± 0.87%) +0.018s (+ 1.37%) 1.332s 1.386s p=0.016 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,876 181,923 +47 (+ 0.03%) ~ ~ p=0.000 n=12
Memory Used 277,219k (± 0.02%) 277,239k (± 0.02%) ~ 277,073k 277,400k p=0.601 n=12
Memory Allocs 1,641,717 (± 0.02%) 1,641,970 (± 0.01%) +253 (+ 0.02%) 1,641,561 1,642,410 p=0.020 n=12
Config Time 0.000s (±217.90%) 0.001s (±65.70%) ~ 0.000s 0.001s p=0.069 n=12
Parse Time 0.099s (± 2.78%) 0.099s (± 4.13%) ~ 0.092s 0.110s p=0.680 n=12
Bind Time 0.039s (±14.25%) 0.039s (±11.13%) ~ 0.030s 0.051s p=0.700 n=12
Check Time 0.833s (± 0.70%) 0.834s (± 0.54%) ~ 0.824s 0.844s p=0.766 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 0.985s (± 0.89%) 0.986s (± 0.79%) ~ 0.967s 1.003s p=0.854 n=12
vscode - native
Errors 351 357 +6 (+ 1.71%) ~ ~ p=0.000 n=12
Symbols 8,612,269 8,612,304 +35 (+ 0.00%) ~ ~ p=0.000 n=12
Types 2,945,733 2,946,162 +429 (+ 0.01%) ~ ~ p=0.000 n=12
Memory Used 5,803,788k (± 0.02%) 5,804,791k (± 0.02%) ~ 5,803,142k 5,809,582k p=0.114 n=12
Memory Allocs 44,691,914 (± 0.02%) 44,697,666 (± 0.02%) +5,752 (+ 0.01%) 44,689,083 44,722,294 p=0.020 n=12
Config Time 0.064s (± 0.38%) 0.065s (± 0.50%) +0.001s (+ 1.17%) 0.064s 0.065s p=0.002 n=12
Parse Time 1.673s (± 3.78%) 1.725s (± 3.17%) ~ 1.542s 1.833s p=0.319 n=12
Bind Time 0.501s (±18.21%) 0.409s (±17.91%) 🟩-0.092s (-18.30%) 0.361s 0.767s p=0.029 n=12
Check Time 10.409s (± 1.88%) 10.627s (± 1.38%) ~ 10.119s 10.953s p=0.131 n=12
Emit Time 4.163s (±12.80%) 3.623s (±11.24%) 🟩-0.540s (-12.97%) 3.262s 5.169s p=0.033 n=12
Total Time 16.911s (± 2.29%) 16.545s (± 1.87%) ~ 16.122s 17.775s p=0.114 n=12
webpack - native
Errors 560 560 ~ ~ ~ p=1.000 n=12
Symbols 939,183 939,183 ~ ~ ~ p=1.000 n=12
Types 437,126 437,529 +403 (+ 0.09%) ~ ~ p=0.000 n=12
Memory Used 724,775k (± 0.02%) 724,899k (± 0.02%) ~ 724,476k 725,276k p=0.266 n=12
Memory Allocs 4,735,870 (± 0.01%) 4,733,287 (± 0.03%) -2,583 (- 0.05%) 4,730,894 4,739,473 p=0.002 n=12
Config Time 0.008s 0.008s (± 5.93%) ~ 0.008s 0.010s p=0.217 n=12
Parse Time 0.229s (± 2.06%) 0.232s (± 5.19%) ~ 0.205s 0.269s p=0.943 n=12
Bind Time 0.048s (± 6.50%) 0.054s (±18.38%) ~ 0.044s 0.094s p=0.448 n=12
Check Time 1.341s (± 0.98%) 1.379s (± 3.79%) ~ 1.303s 1.539s p=0.898 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 1.651s (± 0.86%) 1.701s (± 3.72%) ~ 1.599s 1.884s p=0.702 n=12
xstate-main - native
Errors 0 21 🔻+21 (+ ∞%) ~ ~ p=0.000 n=12
Symbols 1,022,532 1,013,647 -8,885 (- 0.87%) ~ ~ p=0.000 n=12
Types 376,962 370,299 -6,663 (- 1.77%) ~ ~ p=0.000 n=12
Memory Used 603,479k (± 0.01%) 596,812k (± 0.02%) -6,667k (- 1.10%) 596,434k 597,015k p=0.000 n=12
Memory Allocs 4,755,157 (± 0.04%) 4,675,652 (± 0.05%) -79,505 (- 1.67%) 4,672,221 4,685,999 p=0.000 n=12
Config Time 0.003s (±10.34%) 0.003s (± 6.23%) ~ 0.002s 0.003s p=0.590 n=12
Parse Time 0.151s (± 3.40%) 0.155s (± 3.19%) ~ 0.141s 0.165s p=0.213 n=12
Bind Time 0.042s (±15.15%) 0.042s (±13.99%) ~ 0.034s 0.061s p=0.431 n=12
Check Time 1.040s (± 1.07%) 1.042s (± 1.10%) ~ 1.018s 1.069s p=0.876 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 1.246s (± 1.18%) 1.253s (± 1.38%) ~ 1.211s 1.306s p=0.788 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

@ahejlsberg

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) user test this

@typescript-automation

typescript-automation Bot commented Sep 10, 2026

Copy link
Copy Markdown

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

Command Status Results
user test this ✅ Started 👀 Results

@typescript-automation

Copy link
Copy Markdown

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

There were infrastructure failures potentially unrelated to your change:

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

Otherwise...

Something interesting changed - please have a look.

Details

type-fest

tsconfig.json

@typescript-automation

Copy link
Copy Markdown

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

Something interesting changed - please have a look.

Details

Dokploy/dokploy

2 of 7 projects failed to build with the old tsc and were ignored

packages/server/tsconfig.server.no-decl.json

packages/server/tsconfig.json

apps/schedules/tsconfig.json

apps/dokploy/tsconfig.json

  • error TS2322: Type 'string[] | undefined' is not assignable to type 'string | null | undefined'.
  • error TS2345: Argument of type '{ host: string; path?: string | undefined; internalPath?: string | undefined; stripPath?: boolean | undefined; port?: number | undefined; useCustomEntrypoint: boolean; https?: boolean | undefined; ... 8 more ...; customEntrypoint: string | ... 1 more ... | undefined; }' is not assignable to parameter of type '{ applicationId?: string | null | undefined; certificateType?: "custom" | "letsencrypt" | "none" | 3 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined; ... 13 more ...; stripPath?: boolean | unde...'.
  • error TS2322: Type 'string[]' is not assignable to type 'string'.
  • error TS2345: Argument of type '{ applicationId: string; networkIds: string[]; detachDokployNetwork: boolean; }' is not assignable to parameter of type '{ applicationId: string; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined; ... 96 more ...; watchPaths...'.
  • error TS2345: Argument of type '{ postgresId: string; networkIds: string[]; detachDokployNetwork: boolean; }' is not assignable to parameter of type '{ postgresId: string; dockerImage?: string | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefin...'.
  • error TS2345: Argument of type '{ mysqlId: string; networkIds: string[]; detachDokployNetwork: boolean; }' is not assignable to parameter of type '{ mysqlId: string; dockerImage?: string | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined;...'.
  • error TS2345: Argument of type '{ mariadbId: string; networkIds: string[]; detachDokployNetwork: boolean; }' is not assignable to parameter of type '{ mariadbId: string; dockerImage?: string | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefine...'.
  • error TS2345: Argument of type '{ mongoId: string; networkIds: string[]; detachDokployNetwork: boolean; }' is not assignable to parameter of type '{ mongoId: string; dockerImage?: string | undefined; replicaSets?: boolean | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | ... 34 more ... | undefined; ... 27 more ...; updateConfigSwarm?: unknown; }'.
  • error TS2345: Argument of type '{ redisId: string; networkIds: string[]; detachDokployNetwork: boolean; }' is not assignable to parameter of type '{ redisId: string; dockerImage?: string | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined;...'.
  • error TS2345: Argument of type '{ libsqlId: string; networkIds: string[]; detachDokployNetwork: boolean; }' is not assignable to parameter of type '{ libsqlId: string; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined; ... 31 more ...; updateConfigSwa...'.
  • error TS2322: Type '"dockerfile" | "heroku_buildpacks" | "nixpacks" | "paketo_buildpacks" | "railpack" | "static" | 6 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 31 more ... | ((index: number) => "dockerfile" | ... 5 more ... | undef...' is not assignable to type '"dockerfile" | "heroku_buildpacks" | "nixpacks" | "paketo_buildpacks" | "railpack" | "static" | undefined'.
  • error TS2322: Type 'string | null | undefined' is not assignable to type 'string[] | null | undefined'.
  • error TS2322: Type 'string | null' is not assignable to type 'string[] | null | undefined'.
  • error TS2345: Argument of type '{ appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } | ... 32 more ... | undefined; ... 96 more ...; watchPaths?: string | ... 1 more ... ...' is not assignable to parameter of type 'Partial<{ appName: string; applicationId: string; applicationStatus: "done" | "error" | "idle" | "running"; args: string[] | null; autoDeploy: boolean | null; bitbucketBranch: string | null; ... 94 more ...; watchPaths: string[] | null; }>'.
  • error TS2345: Argument of type '{ includeEncryptionKey?: boolean | undefined; backupId: string; database: string; databaseType: "libsql" | "mariadb" | "mongo" | "mysql" | "postgres" | "web-server" | 6 | (() => string) | ... 32 more ... | ((index: number) => "libsql" | ... 5 more ... | undefined); ... 6 more ...; serviceName: string | null; }' is not assignable to parameter of type 'Partial<{ appName: string; backupId: string; backupType: "compose" | "database"; composeId: string | null; database: string; databaseType: "libsql" | "mariadb" | "mongo" | "mysql" | "postgres" | "web-server"; ... 13 more ...; userId: string | null; }>'.
  • error TS2345: Argument of type '{ composeId: string; composeFile?: string | undefined; command?: string | undefined; appName?: string | undefined; autoDeploy?: boolean | null | undefined; bitbucketBranch?: string | null | undefined; ... 41 more ...; watchPaths?: string | ... 1 more ... | undefined; }' is not assignable to parameter of type 'Partial<{ appName: string; autoDeploy: boolean | null; bitbucketBranch: string | null; bitbucketId: string | null; bitbucketOwner: string | null; bitbucketRepository: string | null; ... 42 more ...; watchPaths: string[] | null; }>'.
  • error TS2345: Argument of type '{ serverId?: string | undefined; organizationId: string; accessKey: string; additionalFlags: string | null; bucket: string; destinationId: string; endpoint: string; name: string; provider: string | null; region: string; secretAccessKey: string; }' is not assignable to parameter of type 'Partial<{ accessKey: string; additionalFlags: string[] | null; bucket: string; createdAt: Date; destinationId: string; endpoint: string; name: string; organizationId: string; provider: string | null; region: string; secretAccessKey: string; }>'.
  • error TS2345: Argument of type '{ certificateType?: "custom" | "letsencrypt" | "none" | 3 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined; ... 13 more ...; stripPath?: boolean | undefined; }' is not assignable to parameter of type 'Partial<{ applicationId: string | null; certificateType: "custom" | "letsencrypt" | "none"; composeId: string | null; createdAt: string; customCertResolver: string | null; customEntrypoint: string | null; ... 13 more ...; uniqueConfigKey: number; }>'.
  • error TS2322: Type '"done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 31 more ... | ((index: number) => "done" | ... 3 more ... | undefined)' is not assignable to type '"done" | "error" | "idle" | "running" | undefined'.
  • error TS2345: Argument of type '{ appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } | ... 32 more ... | undefined; ... 31 more ...; updateConfigSwarm?: Json | undefined; }' is not assignable to parameter of type 'Partial<{ appName: string; applicationStatus: "done" | "error" | "idle" | "running"; command: string | null; cpuLimit: string | null; cpuReservation: string | null; createdAt: string; databasePassword: string; ... 28 more ...; updateConfigSwarm: UpdateConfigSwarm | null; }>'.
  • error TS2345: Argument of type '{ dockerImage?: string | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } | ... 32 more ... | undefined; ... 29 more ...; upd...' is not assignable to parameter of type 'Partial<{ appName: string; applicationStatus: "done" | "error" | "idle" | "running"; args: string[] | null; command: string | null; cpuLimit: string | null; cpuReservation: string | null; ... 28 more ...; updateConfigSwarm: UpdateConfigSwarm | null; }>'.
  • error TS2345: Argument of type '{ dockerImage?: string | undefined; replicaSets?: boolean | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { ...; } | ... 32 more ... | undefined; ... 27 more ...; updateConfigSwarm?: Json | undefined; }' is not assignable to parameter of type 'Partial<{ appName: string; applicationStatus: "done" | "error" | "idle" | "running"; args: string[] | null; command: string | null; cpuLimit: string | null; cpuReservation: string | null; ... 27 more ...; updateConfigSwarm: UpdateConfigSwarm | null; }>'.
  • error TS2345: Argument of type '{ mountId: string; applicationId?: string | null | undefined; composeId?: string | null | undefined; content?: string | null | undefined; filePath?: string | null | undefined; hostPath?: string | ... 1 more ... | undefined; ... 9 more ...; volumeName?: string | ... 1 more ... | undefined; }' is not assignable to parameter of type 'Partial<{ applicationId: string | null; composeId: string | null; content: string | null; filePath: string | null; hostPath: string | null; libsqlId: string | null; mariadbId: string | null; ... 8 more ...; volumeName: string | null; }>'.
  • error TS2345: Argument of type '{ content?: string | undefined; createdAt?: string | undefined; enabled?: boolean | undefined; filePath?: string | undefined; type?: "create" | "delete" | "update" | 3 | (() => string) | ... 33 more ... | undefined; updatedAt?: string | ... 1 more ... | undefined; }' is not assignable to parameter of type 'Partial<{ applicationId: string | null; composeId: string | null; content: string; createdAt: string; enabled: boolean; filePath: string; patchId: string; type: "create" | "delete" | "update"; updatedAt: string | null; }>'.
  • error TS2345: Argument of type '{ portId: string; protocol: "tcp" | "udp" | 2 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 31 more ... | ((index: number) => "tcp" | ... 1 more ... | undefined); publishMode: "host" | ... 35 more ... | ((index: num...' is not assignable to parameter of type 'Partial<{ applicationId: string; portId: string; protocol: "tcp" | "udp"; publishMode: "host" | "ingress"; publishedPort: number; targetPort: number; }>'.
  • error TS2345: Argument of type '{ dockerImage?: string | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } | ... 32 more ... | undefined; ... 28 more ...; upd...' is not assignable to parameter of type 'Partial<{ appName: string; applicationStatus: "done" | "error" | "idle" | "running"; args: string[] | null; command: string | null; cpuLimit: string | null; cpuReservation: string | null; ... 27 more ...; updateConfigSwarm: UpdateConfigSwarm | null; }>'.
  • error TS2345: Argument of type '{ applicationId: string; domainType: "application"; certificateType: "custom" | "letsencrypt" | "none"; composeId: string | null; createdAt: string; customCertResolver: string | null; ... 12 more ...; uniqueConfigKey: number; }' is not assignable to parameter of type '{ applicationId?: string | null | undefined; certificateType?: "custom" | "letsencrypt" | "none" | 3 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined; ... 13 more ...; stripPath?: boolean | unde...'.
  • error TS2345: Argument of type '{ composeId: string; domainType: "compose"; applicationId: string | null; certificateType: "custom" | "letsencrypt" | "none"; createdAt: string; customCertResolver: string | null; ... 12 more ...; uniqueConfigKey: number; }' is not assignable to parameter of type '{ applicationId?: string | null | undefined; certificateType?: "custom" | "letsencrypt" | "none" | 3 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined; ... 13 more ...; stripPath?: boolean | unde...'.
  • error TS2345: Argument of type '{ dockerImage?: string | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } | ... 32 more ... | undefined; ... 26 more ...; upd...' is not assignable to parameter of type 'Partial<{ appName: string; applicationStatus: "done" | "error" | "idle" | "running"; args: string[] | null; command: string | null; cpuLimit: string | null; cpuReservation: string | null; ... 25 more ...; updateConfigSwarm: UpdateConfigSwarm | null; }>'.
  • error TS2345: Argument of type '{ serverId?: string | undefined; createdAt?: string | undefined; imagePrefix?: string | null | undefined; organizationId?: string | undefined; password?: string | undefined; registryName?: string | undefined; registryType?: "cloud" | ... 36 more ... | undefined; registryUrl?: string | undefined; username?: string | ...' is not assignable to parameter of type 'Partial<{ createdAt: string; imagePrefix: string | null; organizationId: string; password: string; registryId: string; registryName: string; registryType: "cloud" | "selfHosted"; registryUrl: string; username: string; }> & { ...; }'.
  • error TS2345: Argument of type '"application" | "compose" | "dokploy-server" | "server" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined' is not assignable to parameter of type '"application" | "compose" | "dokploy-server" | "server" | null | undefined'.
  • error TS2345: Argument of type '"application" | "compose" | "dokploy-server" | "server" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 31 more ... | ((index: number) => "application" | ... 3 more ... | undefined)' is not assignable to parameter of type '"application" | "compose" | "dokploy-server" | "server" | null | undefined'.
  • error TS2345: Argument of type '{ command?: string | undefined; enableDockerCleanup: boolean; description: string | null; ipAddress: string; name: string; port: number; serverId: string; serverType: "build" | "deploy" | ... 34 more ... | ((index: number) => "build" | ... 1 more ... | undefined); sshKeyId: string | null; username: string; }' is not assignable to parameter of type 'Partial<{ appName: string; buildsConcurrency: number; command: string; createdAt: string; description: string | null; enableDockerCleanup: boolean; ipAddress: string; metricsConfig: { server: { type: "Dokploy" | "Remote"; ... 6 more ...; thresholds: { ...; }; }; containers: { ...; }; }; ... 7 more ...; username: str...'.
  • error TS2345: Argument of type '(input: { enableIPv4?: boolean; enableIPv6?: boolean; ipam?: { config?: Array<{ subnet?: string; gateway?: string; ipRange?: string; }>; } | null; }, ctx: z.RefinementCtx) => void' is not assignable to parameter of type '(arg: { attachable?: boolean | undefined; driver?: "bridge" | "overlay" | 2 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined; ... 6 more ...; serverId?: string | ... 1 more ... | undefined; }, c...'.
  • error TS2769: No overload matches this call.

apps/api/tsconfig.json

SBoudrias/Inquirer.js

tsconfig.json

packages/testing/tsconfig.json

  • error TS2345: Argument of type '<Required extends boolean>(config: NumberConfig<Required>, done: (value: Required extends true ? number : number | undefined) => void) => [string, string]' is not assignable to parameter of type 'ViewFunction<Required extends true ? number : number | undefined, NumberConfig<Required>>'.

packages/prompts/tsconfig.json

  • error TS2345: Argument of type '<Required extends boolean>(config: NumberConfig<Required>, done: (value: Required extends true ? number : number | undefined) => void) => [string, string]' is not assignable to parameter of type 'ViewFunction<Required extends true ? number : number | undefined, NumberConfig<Required>>'.

packages/number/tsconfig.json

  • error TS2345: Argument of type '<Required extends boolean>(config: NumberConfig<Required>, done: (value: Required extends true ? number : number | undefined) => void) => [string, string]' is not assignable to parameter of type 'ViewFunction<Required extends true ? number : number | undefined, NumberConfig<Required>>'.

packages/inquirer/tsconfig.json

  • error TS2394: This overload signature is not compatible with its implementation signature.
  • error TS2345: Argument of type '<Required extends boolean>(config: NumberConfig<Required>, done: (value: Required extends true ? number : number | undefined) => void) => [string, string]' is not assignable to parameter of type 'ViewFunction<Required extends true ? number : number | undefined, NumberConfig<Required>>'.

packages/i18n/tsconfig.json

  • error TS2344: Type 'typeof numberPrompt<Required>' does not satisfy the constraint '(...args: any) => any'.
  • error TS2635: Type 'Prompt<unknown, {}>' has no signatures for which the type argument list is applicable.
  • error TS2345: Argument of type '{}' is not assignable to parameter of type 'never'.
  • error TS2345: Argument of type '<Required extends boolean>(config: NumberConfig<Required>, done: (value: Required extends true ? number : number | undefined) => void) => [string, string]' is not assignable to parameter of type 'ViewFunction<Required extends true ? number : number | undefined, NumberConfig<Required>>'.

packages/demo/tsconfig.json

  • error TS2345: Argument of type '<Required extends boolean>(config: NumberConfig<Required>, done: (value: Required extends true ? number : number | undefined) => void) => [string, string]' is not assignable to parameter of type 'ViewFunction<Required extends true ? number : number | undefined, NumberConfig<Required>>'.

sindresorhus/type-fest

tsconfig.json

triggerdotdev/trigger.dev

46 of 67 projects failed to build with the old tsc and were ignored

internal-packages/otlp-importer/tsconfig.json

TypeStrong/typedoc

1 of 5 projects failed to build with the old tsc and were ignored

src/test/converter2/tsconfig.json

Copilot AI balanced review requested due to automatic review settings September 10, 2026 22:05
@ahejlsberg

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) test top1000

@typescript-automation

typescript-automation Bot commented Sep 10, 2026

Copy link
Copy Markdown

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

Command Status Results
test top1000 ✅ Started 👀 Results

@ahejlsberg

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) user test this

@typescript-automation

typescript-automation Bot commented Sep 10, 2026

Copy link
Copy Markdown

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

Command Status Results
user test this ✅ Started ✅ Results

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Type serialization can now panic on nil input, and the new hover behavior lacks language-service coverage.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Distinguishes distributed type parameters during conditional-type checking to detect previously missed constraint violations.

Changes:

  • Tracks distributed and non-distributed type parameters separately.
  • Adds targeted diagnostics and compiler baselines.
  • Labels distributed parameters in hover information.
File summaries
File Description
tsc/internal/checker/checker.go Creates and handles distributed parameter types.
tsc/internal/checker/types.go Stores distributed parameter state.
tsc/internal/checker/exports.go Exposes distributed-state detection.
tsc/internal/checker/mapper.go Normalizes parameters during mapping.
tsc/internal/checker/inference.go Normalizes inference and template matching.
tsc/internal/checker/relater.go Reports constraint violations.
tsc/internal/checker/nodecopy.go Accounts for normalized mapped parameters.
tsc/internal/checker/nodebuilderimpl.go Normalizes parameters during serialization.
tsc/internal/ls/hover.go Adds the distributed hover label.
tsc/internal/diagnostics/diagnosticMessages.json Defines the new diagnostic.
tsc/internal/diagnostics/diagnostics_generated.go Regenerates diagnostic bindings.
tsc/testdata/tests/cases/compiler/distributedTypeParameters.ts Adds compiler regression cases.
tsc/testdata/baselines/reference/compiler/distributedTypeParameters.errors.txt Records expected diagnostics.
tsc/testdata/baselines/reference/compiler/distributedTypeParameters.types Records expected types.
tsc/testdata/baselines/reference/compiler/distributedTypeParameters.symbols Records expected symbols.
Review details

Files not reviewed (1)

  • tsc/internal/diagnostics/diagnostics_generated.go: Generated file
  • Files reviewed: 14/15 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment thread tsc/internal/checker/nodebuilderimpl.go Outdated
Comment thread tsc/internal/ls/hover.go
@typescript-automation

Copy link
Copy Markdown

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

There were infrastructure failures potentially unrelated to your change:

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

Otherwise...

Everything looks good!

@typescript-automation

Copy link
Copy Markdown

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

Something interesting changed - please have a look.

Details

Dokploy/dokploy

2 of 7 projects failed to build with the old tsc and were ignored

packages/server/tsconfig.server.no-decl.json

packages/server/tsconfig.json

apps/schedules/tsconfig.json

apps/dokploy/tsconfig.json

  • error TS2322: Type 'string[] | undefined' is not assignable to type 'string | null | undefined'.
  • error TS2345: Argument of type '{ host: string; path?: string | undefined; internalPath?: string | undefined; stripPath?: boolean | undefined; port?: number | undefined; useCustomEntrypoint: boolean; https?: boolean | undefined; ... 8 more ...; customEntrypoint: string | ... 1 more ... | undefined; }' is not assignable to parameter of type '{ applicationId?: string | null | undefined; certificateType?: "custom" | "letsencrypt" | "none" | 3 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined; ... 13 more ...; stripPath?: boolean | unde...'.
  • error TS2322: Type 'string[]' is not assignable to type 'string'.
  • error TS2345: Argument of type '{ applicationId: string; networkIds: string[]; detachDokployNetwork: boolean; }' is not assignable to parameter of type '{ applicationId: string; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined; ... 96 more ...; watchPaths...'.
  • error TS2345: Argument of type '{ postgresId: string; networkIds: string[]; detachDokployNetwork: boolean; }' is not assignable to parameter of type '{ postgresId: string; dockerImage?: string | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefin...'.
  • error TS2345: Argument of type '{ mysqlId: string; networkIds: string[]; detachDokployNetwork: boolean; }' is not assignable to parameter of type '{ mysqlId: string; dockerImage?: string | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined;...'.
  • error TS2345: Argument of type '{ mariadbId: string; networkIds: string[]; detachDokployNetwork: boolean; }' is not assignable to parameter of type '{ mariadbId: string; dockerImage?: string | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefine...'.
  • error TS2345: Argument of type '{ mongoId: string; networkIds: string[]; detachDokployNetwork: boolean; }' is not assignable to parameter of type '{ mongoId: string; dockerImage?: string | undefined; replicaSets?: boolean | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | ... 34 more ... | undefined; ... 27 more ...; updateConfigSwarm?: unknown; }'.
  • error TS2345: Argument of type '{ redisId: string; networkIds: string[]; detachDokployNetwork: boolean; }' is not assignable to parameter of type '{ redisId: string; dockerImage?: string | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined;...'.
  • error TS2345: Argument of type '{ libsqlId: string; networkIds: string[]; detachDokployNetwork: boolean; }' is not assignable to parameter of type '{ libsqlId: string; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined; ... 31 more ...; updateConfigSwa...'.
  • error TS2322: Type '"dockerfile" | "heroku_buildpacks" | "nixpacks" | "paketo_buildpacks" | "railpack" | "static" | 6 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 31 more ... | ((index: number) => "dockerfile" | ... 5 more ... | undef...' is not assignable to type '"dockerfile" | "heroku_buildpacks" | "nixpacks" | "paketo_buildpacks" | "railpack" | "static" | undefined'.
  • error TS2322: Type 'string | null | undefined' is not assignable to type 'string[] | null | undefined'.
  • error TS2322: Type 'string | null' is not assignable to type 'string[] | null | undefined'.
  • error TS2345: Argument of type '{ appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } | ... 32 more ... | undefined; ... 96 more ...; watchPaths?: string | ... 1 more ... ...' is not assignable to parameter of type 'Partial<{ appName: string; applicationId: string; applicationStatus: "done" | "error" | "idle" | "running"; args: string[] | null; autoDeploy: boolean | null; bitbucketBranch: string | null; ... 94 more ...; watchPaths: string[] | null; }>'.
  • error TS2345: Argument of type '{ includeEncryptionKey?: boolean | undefined; backupId: string; database: string; databaseType: "libsql" | "mariadb" | "mongo" | "mysql" | "postgres" | "web-server" | 6 | (() => string) | ... 32 more ... | ((index: number) => "libsql" | ... 5 more ... | undefined); ... 6 more ...; serviceName: string | null; }' is not assignable to parameter of type 'Partial<{ appName: string; backupId: string; backupType: "compose" | "database"; composeId: string | null; database: string; databaseType: "libsql" | "mariadb" | "mongo" | "mysql" | "postgres" | "web-server"; ... 13 more ...; userId: string | null; }>'.
  • error TS2345: Argument of type '{ composeId: string; composeFile?: string | undefined; command?: string | undefined; appName?: string | undefined; autoDeploy?: boolean | null | undefined; bitbucketBranch?: string | null | undefined; ... 41 more ...; watchPaths?: string | ... 1 more ... | undefined; }' is not assignable to parameter of type 'Partial<{ appName: string; autoDeploy: boolean | null; bitbucketBranch: string | null; bitbucketId: string | null; bitbucketOwner: string | null; bitbucketRepository: string | null; ... 42 more ...; watchPaths: string[] | null; }>'.
  • error TS2345: Argument of type '{ serverId?: string | undefined; organizationId: string; accessKey: string; additionalFlags: string | null; bucket: string; destinationId: string; endpoint: string; name: string; provider: string | null; region: string; secretAccessKey: string; }' is not assignable to parameter of type 'Partial<{ accessKey: string; additionalFlags: string[] | null; bucket: string; createdAt: Date; destinationId: string; endpoint: string; name: string; organizationId: string; provider: string | null; region: string; secretAccessKey: string; }>'.
  • error TS2345: Argument of type '{ certificateType?: "custom" | "letsencrypt" | "none" | 3 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined; ... 13 more ...; stripPath?: boolean | undefined; }' is not assignable to parameter of type 'Partial<{ applicationId: string | null; certificateType: "custom" | "letsencrypt" | "none"; composeId: string | null; createdAt: string; customCertResolver: string | null; customEntrypoint: string | null; ... 13 more ...; uniqueConfigKey: number; }>'.
  • error TS2322: Type '"done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 31 more ... | ((index: number) => "done" | ... 3 more ... | undefined)' is not assignable to type '"done" | "error" | "idle" | "running" | undefined'.
  • error TS2345: Argument of type '{ appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } | ... 32 more ... | undefined; ... 31 more ...; updateConfigSwarm?: Json | undefined; }' is not assignable to parameter of type 'Partial<{ appName: string; applicationStatus: "done" | "error" | "idle" | "running"; command: string | null; cpuLimit: string | null; cpuReservation: string | null; createdAt: string; databasePassword: string; ... 28 more ...; updateConfigSwarm: UpdateConfigSwarm | null; }>'.
  • error TS2345: Argument of type '{ dockerImage?: string | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } | ... 32 more ... | undefined; ... 29 more ...; upd...' is not assignable to parameter of type 'Partial<{ appName: string; applicationStatus: "done" | "error" | "idle" | "running"; args: string[] | null; command: string | null; cpuLimit: string | null; cpuReservation: string | null; ... 28 more ...; updateConfigSwarm: UpdateConfigSwarm | null; }>'.
  • error TS2345: Argument of type '{ dockerImage?: string | undefined; replicaSets?: boolean | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { ...; } | ... 32 more ... | undefined; ... 27 more ...; updateConfigSwarm?: Json | undefined; }' is not assignable to parameter of type 'Partial<{ appName: string; applicationStatus: "done" | "error" | "idle" | "running"; args: string[] | null; command: string | null; cpuLimit: string | null; cpuReservation: string | null; ... 27 more ...; updateConfigSwarm: UpdateConfigSwarm | null; }>'.
  • error TS2345: Argument of type '{ mountId: string; applicationId?: string | null | undefined; composeId?: string | null | undefined; content?: string | null | undefined; filePath?: string | null | undefined; hostPath?: string | ... 1 more ... | undefined; ... 9 more ...; volumeName?: string | ... 1 more ... | undefined; }' is not assignable to parameter of type 'Partial<{ applicationId: string | null; composeId: string | null; content: string | null; filePath: string | null; hostPath: string | null; libsqlId: string | null; mariadbId: string | null; ... 8 more ...; volumeName: string | null; }>'.
  • error TS2345: Argument of type '{ content?: string | undefined; createdAt?: string | undefined; enabled?: boolean | undefined; filePath?: string | undefined; type?: "create" | "delete" | "update" | 3 | (() => string) | ... 33 more ... | undefined; updatedAt?: string | ... 1 more ... | undefined; }' is not assignable to parameter of type 'Partial<{ applicationId: string | null; composeId: string | null; content: string; createdAt: string; enabled: boolean; filePath: string; patchId: string; type: "create" | "delete" | "update"; updatedAt: string | null; }>'.
  • error TS2345: Argument of type '{ portId: string; protocol: "tcp" | "udp" | 2 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 31 more ... | ((index: number) => "tcp" | ... 1 more ... | undefined); publishMode: "host" | ... 35 more ... | ((index: num...' is not assignable to parameter of type 'Partial<{ applicationId: string; portId: string; protocol: "tcp" | "udp"; publishMode: "host" | "ingress"; publishedPort: number; targetPort: number; }>'.
  • error TS2345: Argument of type '{ dockerImage?: string | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } | ... 32 more ... | undefined; ... 28 more ...; upd...' is not assignable to parameter of type 'Partial<{ appName: string; applicationStatus: "done" | "error" | "idle" | "running"; args: string[] | null; command: string | null; cpuLimit: string | null; cpuReservation: string | null; ... 27 more ...; updateConfigSwarm: UpdateConfigSwarm | null; }>'.
  • error TS2345: Argument of type '{ applicationId: string; domainType: "application"; certificateType: "custom" | "letsencrypt" | "none"; composeId: string | null; createdAt: string; customCertResolver: string | null; ... 12 more ...; uniqueConfigKey: number; }' is not assignable to parameter of type '{ applicationId?: string | null | undefined; certificateType?: "custom" | "letsencrypt" | "none" | 3 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined; ... 13 more ...; stripPath?: boolean | unde...'.
  • error TS2345: Argument of type '{ composeId: string; domainType: "compose"; applicationId: string | null; certificateType: "custom" | "letsencrypt" | "none"; createdAt: string; customCertResolver: string | null; ... 12 more ...; uniqueConfigKey: number; }' is not assignable to parameter of type '{ applicationId?: string | null | undefined; certificateType?: "custom" | "letsencrypt" | "none" | 3 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined; ... 13 more ...; stripPath?: boolean | unde...'.
  • error TS2345: Argument of type '{ dockerImage?: string | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } | ... 32 more ... | undefined; ... 26 more ...; upd...' is not assignable to parameter of type 'Partial<{ appName: string; applicationStatus: "done" | "error" | "idle" | "running"; args: string[] | null; command: string | null; cpuLimit: string | null; cpuReservation: string | null; ... 25 more ...; updateConfigSwarm: UpdateConfigSwarm | null; }>'.
  • error TS2345: Argument of type '{ serverId?: string | undefined; createdAt?: string | undefined; imagePrefix?: string | null | undefined; organizationId?: string | undefined; password?: string | undefined; registryName?: string | undefined; registryType?: "cloud" | ... 36 more ... | undefined; registryUrl?: string | undefined; username?: string | ...' is not assignable to parameter of type 'Partial<{ createdAt: string; imagePrefix: string | null; organizationId: string; password: string; registryId: string; registryName: string; registryType: "cloud" | "selfHosted"; registryUrl: string; username: string; }> & { ...; }'.
  • error TS2345: Argument of type '"application" | "compose" | "dokploy-server" | "server" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined' is not assignable to parameter of type '"application" | "compose" | "dokploy-server" | "server" | null | undefined'.
  • error TS2345: Argument of type '"application" | "compose" | "dokploy-server" | "server" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 31 more ... | ((index: number) => "application" | ... 3 more ... | undefined)' is not assignable to parameter of type '"application" | "compose" | "dokploy-server" | "server" | null | undefined'.
  • error TS2345: Argument of type '{ command?: string | undefined; enableDockerCleanup: boolean; description: string | null; ipAddress: string; name: string; port: number; serverId: string; serverType: "build" | "deploy" | ... 34 more ... | ((index: number) => "build" | ... 1 more ... | undefined); sshKeyId: string | null; username: string; }' is not assignable to parameter of type 'Partial<{ appName: string; buildsConcurrency: number; command: string; createdAt: string; description: string | null; enableDockerCleanup: boolean; ipAddress: string; metricsConfig: { server: { type: "Dokploy" | "Remote"; ... 6 more ...; thresholds: { ...; }; }; containers: { ...; }; }; ... 7 more ...; username: str...'.
  • error TS2345: Argument of type '(input: { enableIPv4?: boolean; enableIPv6?: boolean; ipam?: { config?: Array<{ subnet?: string; gateway?: string; ipRange?: string; }>; } | null; }, ctx: z.RefinementCtx) => void' is not assignable to parameter of type '(arg: { attachable?: boolean | undefined; driver?: "bridge" | "overlay" | 2 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined; ... 6 more ...; serverId?: string | ... 1 more ... | undefined; }, c...'.
  • error TS2769: No overload matches this call.

apps/api/tsconfig.json

SBoudrias/Inquirer.js

tsconfig.json

packages/testing/tsconfig.json

  • error TS2345: Argument of type '<Required extends boolean>(config: NumberConfig<Required>, done: (value: Required extends true ? number : number | undefined) => void) => [string, string]' is not assignable to parameter of type 'ViewFunction<Required extends true ? number : number | undefined, NumberConfig<Required>>'.

packages/prompts/tsconfig.json

  • error TS2345: Argument of type '<Required extends boolean>(config: NumberConfig<Required>, done: (value: Required extends true ? number : number | undefined) => void) => [string, string]' is not assignable to parameter of type 'ViewFunction<Required extends true ? number : number | undefined, NumberConfig<Required>>'.

packages/number/tsconfig.json

  • error TS2345: Argument of type '<Required extends boolean>(config: NumberConfig<Required>, done: (value: Required extends true ? number : number | undefined) => void) => [string, string]' is not assignable to parameter of type 'ViewFunction<Required extends true ? number : number | undefined, NumberConfig<Required>>'.

packages/inquirer/tsconfig.json

  • error TS2394: This overload signature is not compatible with its implementation signature.
  • error TS2345: Argument of type '<Required extends boolean>(config: NumberConfig<Required>, done: (value: Required extends true ? number : number | undefined) => void) => [string, string]' is not assignable to parameter of type 'ViewFunction<Required extends true ? number : number | undefined, NumberConfig<Required>>'.

packages/i18n/tsconfig.json

  • error TS2344: Type 'typeof numberPrompt<Required>' does not satisfy the constraint '(...args: any) => any'.
  • error TS2635: Type 'Prompt<unknown, {}>' has no signatures for which the type argument list is applicable.
  • error TS2345: Argument of type '{}' is not assignable to parameter of type 'never'.
  • error TS2345: Argument of type '<Required extends boolean>(config: NumberConfig<Required>, done: (value: Required extends true ? number : number | undefined) => void) => [string, string]' is not assignable to parameter of type 'ViewFunction<Required extends true ? number : number | undefined, NumberConfig<Required>>'.

packages/demo/tsconfig.json

  • error TS2345: Argument of type '<Required extends boolean>(config: NumberConfig<Required>, done: (value: Required extends true ? number : number | undefined) => void) => [string, string]' is not assignable to parameter of type 'ViewFunction<Required extends true ? number : number | undefined, NumberConfig<Required>>'.

triggerdotdev/trigger.dev

46 of 67 projects failed to build with the old tsc and were ignored

internal-packages/otlp-importer/tsconfig.json

TypeStrong/typedoc

1 of 5 projects failed to build with the old tsc and were ignored

src/test/converter2/tsconfig.json

@DanielRosenwasser

Copy link
Copy Markdown
Member

Jeez - I think we need to close the coverage gap between RWC and our own test suite. Probably worth adding tests for things like the Exact pattern here (both the original and a corrected one).

@Andarist

Mateusz Burzyński (Andarist) commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

To be fair, homomorphic mapped types distribute too and they suffer from the same issue today. I played a little bit with closing that gap here: fix-63708...Andarist:mapped-type-distribution

I'm not entirely sure if all the breaks in the above are correct though. With the version above this one errors when today it doesnt - but it does seem to me that a suspicious indexed access is allowed here today:

declare function f<T, U extends T>(y: { [P in keyof T]: U[P] }): {
  [P in keyof T]: U[P];
};

type AB = { a: 1 } | { b: 2 };
type A = { a: 1 };

const result = f<AB, A>({ b: 123 });
//    ^? { a: 1 } | { b: unknown; }

@ahejlsberg

Copy link
Copy Markdown
Member Author

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

@typescript-automation

typescript-automation Bot commented Sep 11, 2026

Copy link
Copy Markdown

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

Command Status Results
user test this ✅ Started ✅ Results
test top1000 ✅ Started 👀 Results

@typescript-automation

Copy link
Copy Markdown

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

There were infrastructure failures potentially unrelated to your change:

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

Otherwise...

Everything looks good!

@typescript-automation

Copy link
Copy Markdown

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

Something interesting changed - please have a look.

Details

Dokploy/dokploy

2 of 7 projects failed to build with the old tsc and were ignored

packages/server/tsconfig.server.no-decl.json

packages/server/tsconfig.json

apps/schedules/tsconfig.json

apps/dokploy/tsconfig.json

  • error TS2322: Type 'string[] | undefined' is not assignable to type 'string | null | undefined'.
  • error TS2345: Argument of type '{ host: string; path?: string | undefined; internalPath?: string | undefined; stripPath?: boolean | undefined; port?: number | undefined; useCustomEntrypoint: boolean; https?: boolean | undefined; ... 8 more ...; customEntrypoint: string | ... 1 more ... | undefined; }' is not assignable to parameter of type '{ applicationId?: string | null | undefined; certificateType?: "custom" | "letsencrypt" | "none" | 3 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined; ... 13 more ...; stripPath?: boolean | unde...'.
  • error TS2322: Type 'string[]' is not assignable to type 'string'.
  • error TS2345: Argument of type '{ applicationId: string; networkIds: string[]; detachDokployNetwork: boolean; }' is not assignable to parameter of type '{ applicationId: string; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined; ... 96 more ...; watchPaths...'.
  • error TS2345: Argument of type '{ postgresId: string; networkIds: string[]; detachDokployNetwork: boolean; }' is not assignable to parameter of type '{ postgresId: string; dockerImage?: string | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefin...'.
  • error TS2345: Argument of type '{ mysqlId: string; networkIds: string[]; detachDokployNetwork: boolean; }' is not assignable to parameter of type '{ mysqlId: string; dockerImage?: string | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined;...'.
  • error TS2345: Argument of type '{ mariadbId: string; networkIds: string[]; detachDokployNetwork: boolean; }' is not assignable to parameter of type '{ mariadbId: string; dockerImage?: string | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefine...'.
  • error TS2345: Argument of type '{ mongoId: string; networkIds: string[]; detachDokployNetwork: boolean; }' is not assignable to parameter of type '{ mongoId: string; dockerImage?: string | undefined; replicaSets?: boolean | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | ... 34 more ... | undefined; ... 27 more ...; updateConfigSwarm?: unknown; }'.
  • error TS2345: Argument of type '{ redisId: string; networkIds: string[]; detachDokployNetwork: boolean; }' is not assignable to parameter of type '{ redisId: string; dockerImage?: string | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined;...'.
  • error TS2345: Argument of type '{ libsqlId: string; networkIds: string[]; detachDokployNetwork: boolean; }' is not assignable to parameter of type '{ libsqlId: string; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined; ... 31 more ...; updateConfigSwa...'.
  • error TS2322: Type '"dockerfile" | "heroku_buildpacks" | "nixpacks" | "paketo_buildpacks" | "railpack" | "static" | 6 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 31 more ... | ((index: number) => "dockerfile" | ... 5 more ... | undef...' is not assignable to type '"dockerfile" | "heroku_buildpacks" | "nixpacks" | "paketo_buildpacks" | "railpack" | "static" | undefined'.
  • error TS2322: Type 'string | null | undefined' is not assignable to type 'string[] | null | undefined'.
  • error TS2322: Type 'string | null' is not assignable to type 'string[] | null | undefined'.
  • error TS2345: Argument of type '{ appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } | ... 32 more ... | undefined; ... 96 more ...; watchPaths?: string | ... 1 more ... ...' is not assignable to parameter of type 'Partial<{ appName: string; applicationId: string; applicationStatus: "done" | "error" | "idle" | "running"; args: string[] | null; autoDeploy: boolean | null; bitbucketBranch: string | null; ... 94 more ...; watchPaths: string[] | null; }>'.
  • error TS2345: Argument of type '{ includeEncryptionKey?: boolean | undefined; backupId: string; database: string; databaseType: "libsql" | "mariadb" | "mongo" | "mysql" | "postgres" | "web-server" | 6 | (() => string) | ... 32 more ... | ((index: number) => "libsql" | ... 5 more ... | undefined); ... 6 more ...; serviceName: string | null; }' is not assignable to parameter of type 'Partial<{ appName: string; backupId: string; backupType: "compose" | "database"; composeId: string | null; database: string; databaseType: "libsql" | "mariadb" | "mongo" | "mysql" | "postgres" | "web-server"; ... 13 more ...; userId: string | null; }>'.
  • error TS2345: Argument of type '{ composeId: string; composeFile?: string | undefined; command?: string | undefined; appName?: string | undefined; autoDeploy?: boolean | null | undefined; bitbucketBranch?: string | null | undefined; ... 41 more ...; watchPaths?: string | ... 1 more ... | undefined; }' is not assignable to parameter of type 'Partial<{ appName: string; autoDeploy: boolean | null; bitbucketBranch: string | null; bitbucketId: string | null; bitbucketOwner: string | null; bitbucketRepository: string | null; ... 42 more ...; watchPaths: string[] | null; }>'.
  • error TS2345: Argument of type '{ serverId?: string | undefined; organizationId: string; accessKey: string; additionalFlags: string | null; bucket: string; destinationId: string; endpoint: string; name: string; provider: string | null; region: string; secretAccessKey: string; }' is not assignable to parameter of type 'Partial<{ accessKey: string; additionalFlags: string[] | null; bucket: string; createdAt: Date; destinationId: string; endpoint: string; name: string; organizationId: string; provider: string | null; region: string; secretAccessKey: string; }>'.
  • error TS2345: Argument of type '{ certificateType?: "custom" | "letsencrypt" | "none" | 3 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined; ... 13 more ...; stripPath?: boolean | undefined; }' is not assignable to parameter of type 'Partial<{ applicationId: string | null; certificateType: "custom" | "letsencrypt" | "none"; composeId: string | null; createdAt: string; customCertResolver: string | null; customEntrypoint: string | null; ... 13 more ...; uniqueConfigKey: number; }>'.
  • error TS2322: Type '"done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 31 more ... | ((index: number) => "done" | ... 3 more ... | undefined)' is not assignable to type '"done" | "error" | "idle" | "running" | undefined'.
  • error TS2345: Argument of type '{ appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } | ... 32 more ... | undefined; ... 31 more ...; updateConfigSwarm?: Json | undefined; }' is not assignable to parameter of type 'Partial<{ appName: string; applicationStatus: "done" | "error" | "idle" | "running"; command: string | null; cpuLimit: string | null; cpuReservation: string | null; createdAt: string; databasePassword: string; ... 28 more ...; updateConfigSwarm: UpdateConfigSwarm | null; }>'.
  • error TS2345: Argument of type '{ dockerImage?: string | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } | ... 32 more ... | undefined; ... 29 more ...; upd...' is not assignable to parameter of type 'Partial<{ appName: string; applicationStatus: "done" | "error" | "idle" | "running"; args: string[] | null; command: string | null; cpuLimit: string | null; cpuReservation: string | null; ... 28 more ...; updateConfigSwarm: UpdateConfigSwarm | null; }>'.
  • error TS2345: Argument of type '{ dockerImage?: string | undefined; replicaSets?: boolean | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { ...; } | ... 32 more ... | undefined; ... 27 more ...; updateConfigSwarm?: Json | undefined; }' is not assignable to parameter of type 'Partial<{ appName: string; applicationStatus: "done" | "error" | "idle" | "running"; args: string[] | null; command: string | null; cpuLimit: string | null; cpuReservation: string | null; ... 27 more ...; updateConfigSwarm: UpdateConfigSwarm | null; }>'.
  • error TS2345: Argument of type '{ mountId: string; applicationId?: string | null | undefined; composeId?: string | null | undefined; content?: string | null | undefined; filePath?: string | null | undefined; hostPath?: string | ... 1 more ... | undefined; ... 9 more ...; volumeName?: string | ... 1 more ... | undefined; }' is not assignable to parameter of type 'Partial<{ applicationId: string | null; composeId: string | null; content: string | null; filePath: string | null; hostPath: string | null; libsqlId: string | null; mariadbId: string | null; ... 8 more ...; volumeName: string | null; }>'.
  • error TS2345: Argument of type '{ content?: string | undefined; createdAt?: string | undefined; enabled?: boolean | undefined; filePath?: string | undefined; type?: "create" | "delete" | "update" | 3 | (() => string) | ... 33 more ... | undefined; updatedAt?: string | ... 1 more ... | undefined; }' is not assignable to parameter of type 'Partial<{ applicationId: string | null; composeId: string | null; content: string; createdAt: string; enabled: boolean; filePath: string; patchId: string; type: "create" | "delete" | "update"; updatedAt: string | null; }>'.
  • error TS2345: Argument of type '{ portId: string; protocol: "tcp" | "udp" | 2 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 31 more ... | ((index: number) => "tcp" | ... 1 more ... | undefined); publishMode: "host" | ... 35 more ... | ((index: num...' is not assignable to parameter of type 'Partial<{ applicationId: string; portId: string; protocol: "tcp" | "udp"; publishMode: "host" | "ingress"; publishedPort: number; targetPort: number; }>'.
  • error TS2345: Argument of type '{ dockerImage?: string | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } | ... 32 more ... | undefined; ... 28 more ...; upd...' is not assignable to parameter of type 'Partial<{ appName: string; applicationStatus: "done" | "error" | "idle" | "running"; args: string[] | null; command: string | null; cpuLimit: string | null; cpuReservation: string | null; ... 27 more ...; updateConfigSwarm: UpdateConfigSwarm | null; }>'.
  • error TS2345: Argument of type '{ applicationId: string; domainType: "application"; certificateType: "custom" | "letsencrypt" | "none"; composeId: string | null; createdAt: string; customCertResolver: string | null; ... 12 more ...; uniqueConfigKey: number; }' is not assignable to parameter of type '{ applicationId?: string | null | undefined; certificateType?: "custom" | "letsencrypt" | "none" | 3 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined; ... 13 more ...; stripPath?: boolean | unde...'.
  • error TS2345: Argument of type '{ composeId: string; domainType: "compose"; applicationId: string | null; certificateType: "custom" | "letsencrypt" | "none"; createdAt: string; customCertResolver: string | null; ... 12 more ...; uniqueConfigKey: number; }' is not assignable to parameter of type '{ applicationId?: string | null | undefined; certificateType?: "custom" | "letsencrypt" | "none" | 3 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined; ... 13 more ...; stripPath?: boolean | unde...'.
  • error TS2345: Argument of type '{ dockerImage?: string | undefined; appName?: string | undefined; applicationStatus?: "done" | "error" | "idle" | "running" | 4 | (() => string) | { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } | ... 32 more ... | undefined; ... 26 more ...; upd...' is not assignable to parameter of type 'Partial<{ appName: string; applicationStatus: "done" | "error" | "idle" | "running"; args: string[] | null; command: string | null; cpuLimit: string | null; cpuReservation: string | null; ... 25 more ...; updateConfigSwarm: UpdateConfigSwarm | null; }>'.
  • error TS2345: Argument of type '{ serverId?: string | undefined; createdAt?: string | undefined; imagePrefix?: string | null | undefined; organizationId?: string | undefined; password?: string | undefined; registryName?: string | undefined; registryType?: "cloud" | ... 36 more ... | undefined; registryUrl?: string | undefined; username?: string | ...' is not assignable to parameter of type 'Partial<{ createdAt: string; imagePrefix: string | null; organizationId: string; password: string; registryId: string; registryName: string; registryType: "cloud" | "selfHosted"; registryUrl: string; username: string; }> & { ...; }'.
  • error TS2345: Argument of type '"application" | "compose" | "dokploy-server" | "server" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined' is not assignable to parameter of type '"application" | "compose" | "dokploy-server" | "server" | null | undefined'.
  • error TS2345: Argument of type '"application" | "compose" | "dokploy-server" | "server" | 4 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 31 more ... | ((index: number) => "application" | ... 3 more ... | undefined)' is not assignable to parameter of type '"application" | "compose" | "dokploy-server" | "server" | null | undefined'.
  • error TS2345: Argument of type '{ command?: string | undefined; enableDockerCleanup: boolean; description: string | null; ipAddress: string; name: string; port: number; serverId: string; serverType: "build" | "deploy" | ... 34 more ... | ((index: number) => "build" | ... 1 more ... | undefined); sshKeyId: string | null; username: string; }' is not assignable to parameter of type 'Partial<{ appName: string; buildsConcurrency: number; command: string; createdAt: string; description: string | null; enableDockerCleanup: boolean; ipAddress: string; metricsConfig: { server: { type: "Dokploy" | "Remote"; ... 6 more ...; thresholds: { ...; }; }; containers: { ...; }; }; ... 7 more ...; username: str...'.
  • error TS2345: Argument of type '(input: { enableIPv4?: boolean; enableIPv6?: boolean; ipam?: { config?: Array<{ subnet?: string; gateway?: string; ipRange?: string; }>; } | null; }, ctx: z.RefinementCtx) => void' is not assignable to parameter of type '(arg: { attachable?: boolean | undefined; driver?: "bridge" | "overlay" | 2 | (() => string) | { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; } | ... 32 more ... | undefined; ... 6 more ...; serverId?: string | ... 1 more ... | undefined; }, c...'.
  • error TS2769: No overload matches this call.

apps/api/tsconfig.json

triggerdotdev/trigger.dev

46 of 67 projects failed to build with the old tsc and were ignored

internal-packages/otlp-importer/tsconfig.json

TypeStrong/typedoc

1 of 5 projects failed to build with the old tsc and were ignored

src/test/converter2/tsconfig.json

@ahejlsberg

Copy link
Copy Markdown
Member Author

User tests are clean and top 1000 has three failing tests, two of which are correct new errors. That leaves the new errors in dokploy which I'm not having a fun time chasing down. It's a combination of Zod types and custom types in the project and they are by no means simple. If anyone has ideas I'd love to hear.

Comment thread tsc/internal/diagnostics/diagnosticMessages.json Outdated
@DanielRosenwasser

Daniel Rosenwasser (DanielRosenwasser) commented Sep 11, 2026

Copy link
Copy Markdown
Member

Mateusz Burzyński (@Andarist) was chatting with Anders Hejlsberg (@ahejlsberg) about the implementation here, and one of the points that came up was the fact that getActualTypeVariable shouldn't always necessarily call getNonDistributedTypeParameter. Not sure if you can do without that in your branch.

@Andarist

Mateusz Burzyński (Andarist) commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Daniel Rosenwasser (@DanielRosenwasser) I was skeptical at first of expanding the scope of getActualTypeVariable and went back and forth on it. But I concluded that the role of getActualTypeVariable is roughly to answer the question of:
"Which declared type variable is underneath the checker’s synthetic wrappers?"

And isn't this just a new kind of wrapper that has to be dereferenced? The problem at hand is specifically the reverse mapped type inference where the inference target is T[K] and not an ordinary type variable. And thar requires dereferencing (T distributed)[K] to T[K] so it could be recognized as a viable inference target etc. And reverse mapped types can also just recurse... so to account for that you also need a recursive "unwrap" and getActualTypeVariable plays its role well in that.

I experimented with the dokploy regression and at least some of that can be narrowed down to exactly that problem :p Just this time it's about T[K distributed]. You can see the isolated patch targeting this branch here with a test and just that getActualTypeVariable change: fix-63708...Andarist:TypeScript:fix-dokploy-reverse-mapped-inference

Of course, maybe there is a counterargument to all of that and a different solution to account for the reverse mapped types but that one seemed right to me at the time of preparing that experiment

@ahejlsberg

Copy link
Copy Markdown
Member Author

Mateusz Burzyński (@Andarist) I went through and examined all the places we use getActualTypeVariable and it does indeed seem fine to have it only return non-distributed type parameters. And, certainly, it fixes the issue in dokploy without causing any other changes.

@ahejlsberg

Copy link
Copy Markdown
Member Author

Mateusz Burzyński (@Andarist) Borrowed your regression test, thanks for researching.

@ahejlsberg

Copy link
Copy Markdown
Member Author

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

@typescript-automation

typescript-automation Bot commented Sep 12, 2026

Copy link
Copy Markdown

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

Command Status Results
user test this ✅ Started
test top1000 ✅ Started

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

Labels

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

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

It is possible to violate generic constraints when distributing union types

5 participants