Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore any in contextual intersection types #59528

Closed
wants to merge 2 commits into from
Closed

Ignore any in contextual intersection types #59528

wants to merge 2 commits into from

Conversation

ahejlsberg
Copy link
Member

Implements what I describe here.

Fixes #48812.
Fixes #55150.
Fixes #59473.

@ahejlsberg
Copy link
Member Author

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 3, 2024

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

Command Status Results
test top400 ✅ Started 👀 Results
user test this ✅ Started 👀 Results
run dt ✅ Started 👀 Results
perf test this faster ✅ Started 👀 Results

@typescript-bot
Copy link
Collaborator

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

There were interesting changes:

Branch only errors:

Package: mdx
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/mdx/preact-tests.tsx
   71:11  error  TypeScript@local tsconfig.preact.json compile error: 
Parameter 'props' implicitly has an 'any' type       @definitelytyped/expect
   73:13  error  TypeScript@local tsconfig.preact.json expected type to be:
  HTMLAttributes<HTMLAnchorElement>
got:
  any  @definitelytyped/expect
   76:13  error  TypeScript@local tsconfig.preact.json compile error: 
Parameter 'props' implicitly has an 'any' type       @definitelytyped/expect
   78:13  error  TypeScript@local tsconfig.preact.json expected type to be:
  HTMLAttributes<HTMLDivElement>
got:
  any     @definitelytyped/expect
  135:11  error  TypeScript@local tsconfig.preact.json compile error: 
Parameter 'props' implicitly has an 'any' type       @definitelytyped/expect
  137:13  error  TypeScript@local tsconfig.preact.json expected type to be:
  HTMLAttributes<HTMLAnchorElement>
got:
  any  @definitelytyped/expect
  140:13  error  TypeScript@local tsconfig.preact.json compile error: 
Parameter 'props' implicitly has an 'any' type       @definitelytyped/expect
  142:13  error  TypeScript@local tsconfig.preact.json expected type to be:
  HTMLAttributes<HTMLDivElement>
got:
  any     @definitelytyped/expect
  199:11  error  TypeScript@local tsconfig.preact.json compile error: 
Parameter 'props' implicitly has an 'any' type       @definitelytyped/expect
  201:13  error  TypeScript@local tsconfig.preact.json expected type to be:
  HTMLAttributes<HTMLAnchorElement>
got:
  any  @definitelytyped/expect
  204:13  error  TypeScript@local tsconfig.preact.json compile error: 
Parameter 'props' implicitly has an 'any' type       @definitelytyped/expect
  206:13  error  TypeScript@local tsconfig.preact.json expected type to be:
  HTMLAttributes<HTMLDivElement>
got:
  any     @definitelytyped/expect
  263:11  error  TypeScript@local tsconfig.preact.json compile error: 
Parameter 'props' implicitly has an 'any' type       @definitelytyped/expect
  265:13  error  TypeScript@local tsconfig.preact.json expected type to be:
  HTMLAttributes<HTMLAnchorElement>
got:
  any  @definitelytyped/expect
  268:13  error  TypeScript@local tsconfig.preact.json compile error: 
Parameter 'props' implicitly has an 'any' type       @definitelytyped/expect
  270:13  error  TypeScript@local tsconfig.preact.json expected type to be:
  HTMLAttributes<HTMLDivElement>
got:
  any     @definitelytyped/expect
  327:11  error  TypeScript@local tsconfig.preact.json compile error: 
Parameter 'props' implicitly has an 'any' type       @definitelytyped/expect
  329:13  error  TypeScript@local tsconfig.preact.json expected type to be:
  HTMLAttributes<HTMLAnchorElement>
got:
  any  @definitelytyped/expect
  332:13  error  TypeScript@local tsconfig.preact.json compile error: 
Parameter 'props' implicitly has an 'any' type       @definitelytyped/expect
  334:13  error  TypeScript@local tsconfig.preact.json expected type to be:
  HTMLAttributes<HTMLDivElement>
got:
  any     @definitelytyped/expect
  391:11  error  TypeScript@local tsconfig.preact.json compile error: 
Parameter 'props' implicitly has an 'any' type       @definitelytyped/expect
  393:13  error  TypeScript@local tsconfig.preact.json expected type to be:
  HTMLAttributes<HTMLAnchorElement>
got:
  any  @definitelytyped/expect
  396:13  error  TypeScript@local tsconfig.preact.json compile error: 
Parameter 'props' implicitly has an 'any' type       @definitelytyped/expect
  398:13  error  TypeScript@local tsconfig.preact.json expected type to be:
  HTMLAttributes<HTMLDivElement>
got:
  any     @definitelytyped/expect
  455:11  error  TypeScript@local tsconfig.preact.json compile error: 
Parameter 'props' implicitly has an 'any' type       @definitelytyped/expect
  457:13  error  TypeScript@local tsconfig.preact.json expected type to be:
  HTMLAttributes<HTMLAnchorElement>
got:
  any  @definitelytyped/expect
  460:13  error  TypeScript@local tsconfig.preact.json compile error: 
Parameter 'props' implicitly has an 'any' type       @definitelytyped/expect
  462:13  error  TypeScript@local tsconfig.preact.json expected type to be:
  HTMLAttributes<HTMLDivElement>
got:
  any     @definitelytyped/expect
  519:11  error  TypeScript@local tsconfig.preact.json compile error: 
Parameter 'props' implicitly has an 'any' type       @definitelytyped/expect
  521:13  error  TypeScript@local tsconfig.preact.json expected type to be:
  HTMLAttributes<HTMLAnchorElement>
got:
  any  @definitelytyped/expect
  524:13  error  TypeScript@local tsconfig.preact.json compile error: 
Parameter 'props' implicitly has an 'any' type       @definitelytyped/expect
  526:13  error  TypeScript@local tsconfig.preact.json expected type to be:
  HTMLAttributes<HTMLDivElement>
got:
  any     @definitelytyped/expect

/mnt/vss/_work/1/DefinitelyTyped/types/mdx/react-tests.tsx
   65:11  error  TypeScript@local tsconfig.react.json compile error: 
Parameter 'props' implicitly has an 'any' type                                                   @definitelytyped/expect
   67:13  error  TypeScript@local tsconfig.react.json expected type to be:
  DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>
got:
  any  @definitelytyped/expect
   70:13  error  TypeScript@local tsconfig.react.json compile error: 
Parameter 'props' implicitly has an 'any' type                                                   @definitelytyped/expect
   72:13  error  TypeScript@local tsconfig.react.json expected type to be:
  DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>
got:
  any              @definitelytyped/expect
  129:11  error  TypeScript@local tsconfig.react.json compile error: 
Parameter 'props' implicitly has an 'any' type                                                   @definitelytyped/expect
  131:13  error  TypeScript@local tsconfig.react.json expected type to be:
  DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>
got:
  any  @definitelytyped/expect
  134:13  error  TypeScript@local tsconfig.react.json compile error: 
Parameter 'props' implicitly has an 'any' type                                                   @definitelytyped/expect
  136:13  error  TypeScript@local tsconfig.react.json expected type to be:
  DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>
got:
  any              @definitelytyped/expect
  193:11  error  TypeScript@local tsconfig.react.json compile error: 
Parameter 'props' implicitly has an 'any' type                                                   @definitelytyped/expect
  195:13  error  TypeScript@local tsconfig.react.json expected type to be:
  DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>
got:
  any  @definitelytyped/expect
  198:13  error  TypeScript@local tsconfig.react.json compile error: 
Parameter 'props' implicitly has an 'any' type                                                   @definitelytyped/expect
  200:13  error  TypeScript@local tsconfig.react.json expected type to be:
  DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>
got:
  any              @definitelytyped/expect
  257:11  error  TypeScript@local tsconfig.react.json compile error: 
Parameter 'props' implicitly has an 'any' type                                                   @definitelytyped/expect
  259:13  error  TypeScript@local tsconfig.react.json expected type to be:
  DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>
got:
  any  @definitelytyped/expect
  262:13  error  TypeScript@local tsconfig.react.json compile error: 
Parameter 'props' implicitly has an 'any' type                                                   @definitelytyped/expect
  264:13  error  TypeScript@local tsconfig.react.json expected type to be:
  DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>
got:
  any              @definitelytyped/expect
  321:11  error  TypeScript@local tsconfig.react.json compile error: 
Parameter 'props' implicitly has an 'any' type                                                   @definitelytyped/expect
  323:13  error  TypeScript@local tsconfig.react.json expected type to be:
  DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>
got:
  any  @definitelytyped/expect
  326:13  error  TypeScript@local tsconfig.react.json compile error: 
Parameter 'props' implicitly has an 'any' type                                                   @definitelytyped/expect
  328:13  error  TypeScript@local tsconfig.react.json expected type to be:
  DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>
got:
  any              @definitelytyped/expect
  385:11  error  TypeScript@local tsconfig.react.json compile error: 
Parameter 'props' implicitly has an 'any' type                                                   @definitelytyped/expect
  387:13  error  TypeScript@local tsconfig.react.json expected type to be:
  DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>
got:
  any  @definitelytyped/expect
  390:13  error  TypeScript@local tsconfig.react.json compile error: 
Parameter 'props' implicitly has an 'any' type                                                   @definitelytyped/expect
  392:13  error  TypeScript@local tsconfig.react.json expected type to be:
  DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>
got:
  any              @definitelytyped/expect
  449:11  error  TypeScript@local tsconfig.react.json compile error: 
Parameter 'props' implicitly has an 'any' type                                                   @definitelytyped/expect
  451:13  error  TypeScript@local tsconfig.react.json expected type to be:
  DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>
got:
  any  @definitelytyped/expect
  454:13  error  TypeScript@local tsconfig.react.json compile error: 
Parameter 'props' implicitly has an 'any' type                                                   @definitelytyped/expect
  456:13  error  TypeScript@local tsconfig.react.json expected type to be:
  DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>
got:
  any              @definitelytyped/expect
  513:11  error  TypeScript@local tsconfig.react.json compile error: 
Parameter 'props' implicitly has an 'any' type                                                   @definitelytyped/expect
  515:13  error  TypeScript@local tsconfig.react.json expected type to be:
  DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>
got:
  any  @definitelytyped/expect
  518:13  error  TypeScript@local tsconfig.react.json compile error: 
Parameter 'props' implicitly has an 'any' type                                                   @definitelytyped/expect
  520:13  error  TypeScript@local tsconfig.react.json expected type to be:
  DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>
got:
  any              @definitelytyped/expect

✖ 64 problems (64 errors, 0 warnings)

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

Package: jquery
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/jquery/jquery-tests.ts
  7365:17  error  TypeScript@local compile error: 
Parameter 'data' implicitly has an 'any' type         @definitelytyped/expect
  7365:23  error  TypeScript@local compile error: 
Parameter 'textStatus' implicitly has an 'any' type   @definitelytyped/expect
  7365:35  error  TypeScript@local compile error: 
Parameter 'jqXHR' implicitly has an 'any' type        @definitelytyped/expect
  7367:17  error  TypeScript@local expected type to be:
  any
got:
  StatusCodeCallbacks<any>            @definitelytyped/expect
  7371:17  error  TypeScript@local expected type to be:
  SuccessTextStatus
got:
  any                   @definitelytyped/expect
  7373:17  error  TypeScript@local expected type to be:
  jqXHR<any>
got:
  any                          @definitelytyped/expect
  7375:17  error  TypeScript@local compile error: 
Parameter 'jqXHR' implicitly has an 'any' type        @definitelytyped/expect
  7375:24  error  TypeScript@local compile error: 
Parameter 'textStatus' implicitly has an 'any' type   @definitelytyped/expect
  7375:36  error  TypeScript@local compile error: 
Parameter 'errorThrown' implicitly has an 'any' type  @definitelytyped/expect
  7377:17  error  TypeScript@local expected type to be:
  any
got:
  StatusCodeCallbacks<any>            @definitelytyped/expect
  7379:17  error  TypeScript@local expected type to be:
  jqXHR<any>
got:
  any                          @definitelytyped/expect
  7381:17  error  TypeScript@local expected type to be:
  ErrorTextStatus
got:
  any                     @definitelytyped/expect
  7383:17  error  TypeScript@local expected type to be:
  string
got:
  any                              @definitelytyped/expect

✖ 13 problems (13 errors, 0 warnings)

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

You can check the log here.

@Andarist
Copy link
Contributor

Andarist commented Aug 3, 2024

This PR breaks the following test cases: TS playground.

All of them are handled without introducing (known 😉 ) regressions by #52095 . I know that this PR looks more complex than what's needed. A good chunk of those tests were discovered this week by user/topXXX runs for my PR and I was working hard on fixing them in the past days and adding some extra tests for regressions that were not caught by those extended test runs.

At one point of this PR, I had a version similar-ish to the one here. However, the current branch that handles StructuredType was operating on the resolved intersection members and thus it correctly was "shadowing" index infos with concrete property types. This introduces a certain complexity for contextual parameter types. On top of that, there are cases handled for which isFilteredOutMappedPropertyName from my PR is needed.

@typescript-bot
Copy link
Collaborator

@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 - node (v18.15.0, x64)
Errors 30 30 ~ ~ ~ p=1.000 n=6
Symbols 62,153 62,153 ~ ~ ~ p=1.000 n=6
Types 50,242 50,243 +1 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 193,546k (± 0.93%) 192,328k (± 0.01%) ~ 192,312k 192,348k p=0.810 n=6
Parse Time 1.30s (± 1.19%) 1.30s (± 0.84%) ~ 1.29s 1.31s p=0.863 n=6
Bind Time 0.71s 0.71s ~ ~ ~ p=1.000 n=6
Check Time 9.55s (± 0.38%) 9.55s (± 0.60%) ~ 9.46s 9.63s p=0.936 n=6
Emit Time 2.75s (± 0.27%) 2.74s (± 0.72%) ~ 2.71s 2.77s p=0.672 n=6
Total Time 14.30s (± 0.30%) 14.30s (± 0.55%) ~ 14.17s 14.40s p=1.000 n=6
angular-1 - node (v18.15.0, x64)
Errors 7 7 ~ ~ ~ p=1.000 n=6
Symbols 945,537 945,528 -9 (- 0.00%) ~ ~ p=0.001 n=6
Types 409,512 409,514 +2 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 1,222,277k (± 0.00%) 1,222,278k (± 0.00%) ~ 1,222,251k 1,222,297k p=0.936 n=6
Parse Time 6.61s (± 0.40%) 6.61s (± 0.58%) ~ 6.57s 6.66s p=0.936 n=6
Bind Time 1.86s (± 0.56%) 1.86s ~ ~ ~ p=0.599 n=6
Check Time 31.08s (± 0.22%) 31.21s (± 0.38%) +0.13s (+ 0.42%) 31.03s 31.38s p=0.045 n=6
Emit Time 14.97s (± 0.39%) 15.04s (± 0.78%) ~ 14.85s 15.17s p=0.199 n=6
Total Time 54.52s (± 0.16%) 54.72s (± 0.30%) +0.20s (+ 0.36%) 54.52s 54.94s p=0.037 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,483,478 2,483,721 +243 (+ 0.01%) ~ ~ p=0.001 n=6
Types 1,012,731 1,013,161 +430 (+ 0.04%) ~ ~ p=0.001 n=6
Memory used 2,475,383k (± 0.00%) 2,474,712k (± 0.00%) -671k (- 0.03%) 2,474,652k 2,474,763k p=0.005 n=6
Parse Time 8.80s (± 0.24%) 8.79s (± 0.30%) ~ 8.75s 8.82s p=0.570 n=6
Bind Time 2.18s (± 0.37%) 2.18s (± 0.34%) ~ 2.17s 2.19s p=0.729 n=6
Check Time 75.47s (± 0.41%) 76.68s (± 1.13%) +1.21s (+ 1.61%) 76.02s 78.38s p=0.005 n=6
Emit Time 0.28s (± 1.45%) 0.28s (± 2.67%) ~ 0.27s 0.29s p=1.000 n=6
Total Time 86.73s (± 0.36%) 87.93s (± 0.97%) +1.20s (+ 1.38%) 87.30s 89.60s p=0.005 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,229,171 1,229,682 +511 (+ 0.04%) ~ ~ p=0.001 n=6
Types 264,285 265,111 +826 (+ 0.31%) ~ ~ p=0.001 n=6
Memory used 2,408,718k (± 5.99%) 2,408,793k (± 6.01%) ~ 2,348,960k 2,704,633k p=1.000 n=6
Parse Time 4.96s (± 1.30%) 4.98s (± 0.49%) ~ 4.94s 5.01s p=0.520 n=6
Bind Time 1.89s (± 0.47%) 1.88s (± 0.58%) ~ 1.86s 1.89s p=0.149 n=6
Check Time 34.37s (± 0.55%) 34.46s (± 0.42%) ~ 34.24s 34.61s p=0.298 n=6
Emit Time 3.33s (± 0.84%) 3.32s (± 0.73%) ~ 3.31s 3.37s p=0.872 n=6
Total Time 44.56s (± 0.37%) 44.66s (± 0.34%) ~ 44.42s 44.84s p=0.298 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,229,171 1,229,682 +511 (+ 0.04%) ~ ~ p=0.001 n=6
Types 264,285 265,111 +826 (+ 0.31%) ~ ~ p=0.001 n=6
Memory used 2,541,198k (± 7.17%) 2,483,051k (± 5.80%) ~ 2,423,808k 2,777,374k p=0.378 n=6
Parse Time 7.75s (± 0.99%) 7.76s (± 0.92%) ~ 7.68s 7.86s p=0.936 n=6
Bind Time 2.53s (± 0.85%) 2.52s (± 1.27%) ~ 2.47s 2.57s p=0.807 n=6
Check Time 50.75s (± 0.87%) 50.87s (± 0.57%) ~ 50.35s 51.18s p=0.689 n=6
Emit Time 5.02s (± 1.54%) 5.04s (± 4.00%) ~ 4.93s 5.45s p=0.297 n=6
Total Time 66.08s (± 0.78%) 66.21s (± 0.61%) ~ 65.68s 66.85s p=0.471 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 256,238 256,242 +4 (+ 0.00%) ~ ~ p=0.001 n=6
Types 104,976 104,984 +8 (+ 0.01%) ~ ~ p=0.001 n=6
Memory used 428,270k (± 0.05%) 428,437k (± 0.07%) ~ 428,214k 428,857k p=0.173 n=6
Parse Time 3.36s (± 0.55%) 3.37s (± 0.69%) ~ 3.34s 3.40s p=0.252 n=6
Bind Time 1.32s (± 1.31%) 1.32s (± 1.21%) ~ 1.29s 1.33s p=1.000 n=6
Check Time 17.99s (± 0.32%) 18.00s (± 0.35%) ~ 17.94s 18.08s p=0.936 n=6
Emit Time 1.64s (± 1.56%) 1.63s (± 0.78%) ~ 1.62s 1.65s p=0.685 n=6
Total Time 24.30s (± 0.17%) 24.31s (± 0.23%) ~ 24.23s 24.39s p=0.628 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 35 35 ~ ~ ~ p=1.000 n=6
Symbols 224,931 224,931 ~ ~ ~ p=1.000 n=6
Types 94,146 94,154 +8 (+ 0.01%) ~ ~ p=0.001 n=6
Memory used 370,106k (± 0.04%) 370,228k (± 0.03%) ~ 370,094k 370,335k p=0.173 n=6
Parse Time 3.42s (± 0.67%) 3.45s (± 0.51%) ~ 3.42s 3.47s p=0.064 n=6
Bind Time 1.92s (± 0.51%) 1.91s (± 0.77%) ~ 1.89s 1.93s p=0.216 n=6
Check Time 19.22s (± 0.26%) 19.33s (± 0.26%) +0.11s (+ 0.55%) 19.26s 19.41s p=0.010 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 24.56s (± 0.28%) 24.68s (± 0.24%) +0.12s (+ 0.50%) 24.62s 24.76s p=0.010 n=6
vscode - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,992,240 2,992,246 +6 (+ 0.00%) ~ ~ p=0.001 n=6
Types 1,029,514 1,029,559 +45 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 3,117,027k (± 0.00%) 3,117,043k (± 0.00%) ~ 3,116,993k 3,117,089k p=0.810 n=6
Parse Time 13.83s (± 0.28%) 13.83s (± 0.40%) ~ 13.77s 13.90s p=0.936 n=6
Bind Time 4.30s (± 0.32%) 4.31s (± 0.27%) ~ 4.29s 4.32s p=0.563 n=6
Check Time 79.41s (± 0.38%) 79.49s (± 0.35%) ~ 78.94s 79.66s p=0.229 n=6
Emit Time 20.64s (± 0.41%) 20.58s (± 0.81%) ~ 20.42s 20.85s p=0.422 n=6
Total Time 118.18s (± 0.30%) 118.21s (± 0.29%) ~ 117.57s 118.57s p=0.689 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 268,265 268,238 -27 (- 0.01%) ~ ~ p=0.001 n=6
Types 109,187 109,195 +8 (+ 0.01%) ~ ~ p=0.001 n=6
Memory used 413,127k (± 0.02%) 413,128k (± 0.02%) ~ 413,019k 413,277k p=1.000 n=6
Parse Time 3.81s (± 0.52%) 3.81s (± 0.42%) ~ 3.79s 3.83s p=0.871 n=6
Bind Time 1.71s (± 1.15%) 1.73s (± 0.48%) +0.02s (+ 1.07%) 1.72s 1.74s p=0.040 n=6
Check Time 16.87s (± 0.28%) 16.85s (± 0.27%) ~ 16.77s 16.90s p=0.422 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 22.39s (± 0.26%) 22.38s (± 0.24%) ~ 22.30s 22.46s p=0.872 n=6
xstate-main - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 538,543 538,536 -7 (- 0.00%) ~ ~ p=0.001 n=6
Types 176,469 176,469 ~ ~ ~ p=1.000 n=6
Memory used 481,343k (± 0.01%) 480,973k (± 0.01%) -371k (- 0.08%) 480,905k 481,036k p=0.005 n=6
Parse Time 3.41s (± 0.86%) 3.41s (± 0.43%) ~ 3.38s 3.42s p=0.870 n=6
Bind Time 1.25s (± 0.51%) 1.25s (± 0.67%) ~ 1.23s 1.25s p=0.340 n=6
Check Time 18.00s (± 0.34%) 18.14s (± 0.64%) +0.14s (+ 0.76%) 17.99s 18.33s p=0.031 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 22.67s (± 0.36%) 22.80s (± 0.43%) ~ 22.67s 22.95s p=0.054 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

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

Something interesting changed - please have a look.

Details

colinhacks/zod

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

tsconfig.json

heyxyz/hey

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

apps/web/tsconfig.json

  • error TS2322: Type 'number | FormEvent<HTMLDivElement>' is not assignable to type 'string | number | boolean | readonly number[] | readonly string[] | readonly boolean[] | null | undefined'.

labring/FastGPT

3 of 8 projects failed to build with the old tsc and were ignored

packages/web/tsconfig.json

microsoft/vscode

4 of 53 projects failed to build with the old tsc and were ignored

build/tsconfig.build.json

monkeytypegame/monkeytype

3 of 6 projects failed to build with the old tsc and were ignored

backend/tsconfig.json

  • error TS2345: Argument of type 'Readonly<{}>' is not assignable to parameter of type 'Omit<{ name: string; _id: string; config: { difficulty?: "normal" | "expert" | "master" | undefined; lazyMode?: boolean | undefined; language?: string | undefined; punctuation?: boolean | undefined; ... 81 more ...; tags?: string[] | undefined; }; }, "_id">'.

noodle-run/noodle

tsconfig.json

shuding/nextra

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

packages/nextra/tsconfig.json

t3-oss/create-t3-app

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

upgrade/tsconfig.json

@ahejlsberg
Copy link
Member Author

Closing in favor of #52095.

@ahejlsberg ahejlsberg closed this Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment