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

Restrict indexed accesses on nonpublic fields of concrete types the same way we do generic ones #61291

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

weswigham
Copy link
Member

Historically, we've allowed these accesses because they resolve to a concrete type (even if the inspection of privates was pretty suspect) which is then what usually appears in declaration emit - but we retain type nodes as written quite a lot now, so it's a bit more problematic now, as we easily retain references to private members with elided types. As-is, I apply the check for both private and protected members for concrete types, since that's what we already errored on for generic indexed accesses, but technically protected members don't have quite the same issue since they're never elided, so if we wanted to we could choose to only error on access of private members on concrete types.

Fixes #60230

@gabritto
Copy link
Member

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 28, 2025

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

@gabritto
Copy link
Member

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 28, 2025

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

Command Status Results
pack this ✅ Started ✅ Results

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 28, 2025

Hey @gabritto, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/164890/artifacts?artifactName=tgz&fileId=FB38146E13B1337AADF69D7A1A57F45A4EED11911C0AD3585A9A82CA60BA26D302&fileName=/typescript-5.9.0-insiders.20250228.tgz"
    }
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/pr-build@5.9.0-pr-61291-4".;

@typescript-bot
Copy link
Collaborator

@gabritto Here are the results of running the user tests with tsc comparing main and refs/pull/61291/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

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

There were interesting changes:

Branch only errors:

Package: koa2-ratelimit
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/koa2-ratelimit/src/RateLimit.d.ts
   8:23  error  TypeScript@local compile error: 
Private or protected member '_rateLimit' cannot be accessed via indexed access  @definitelytyped/expect
  26:54  error  TypeScript@local compile error: 
Private or protected member '_rateLimit' cannot be accessed via indexed access  @definitelytyped/expect

✖ 2 problems (2 errors, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.29_typescript@5.9.0-dev.20250228/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.29_typescript@5.9.0-dev.20250228/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

Package: inquirer/v8
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/inquirer/v8/lib/prompts/expand.d.ts
  121:40  error  TypeScript@local compile error: 
Private or protected member 'opt' cannot be accessed via indexed access  @definitelytyped/expect
  135:46  error  TypeScript@local compile error: 
Private or protected member 'opt' cannot be accessed via indexed access  @definitelytyped/expect
  146:38  error  TypeScript@local compile error: 
Private or protected member 'opt' cannot be accessed via indexed access  @definitelytyped/expect

✖ 3 problems (3 errors, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.29_typescript@5.9.0-dev.20250228/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.29_typescript@5.9.0-dev.20250228/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

Package: inquirer
Error:

Error: 
/mnt/vss/_work/1/DefinitelyTyped/types/inquirer/lib/prompts/expand.d.ts
  121:40  error  TypeScript@local compile error: 
Private or protected member 'opt' cannot be accessed via indexed access  @definitelytyped/expect
  135:46  error  TypeScript@local compile error: 
Private or protected member 'opt' cannot be accessed via indexed access  @definitelytyped/expect
  146:38  error  TypeScript@local compile error: 
Private or protected member 'opt' cannot be accessed via indexed access  @definitelytyped/expect

✖ 3 problems (3 errors, 0 warnings)

    at combineErrorsAndWarnings (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.29_typescript@5.9.0-dev.20250228/node_modules/@definitelytyped/dtslint/dist/index.js:194:28)
    at runTests (/mnt/vss/_work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.2.29_typescript@5.9.0-dev.20250228/node_modules/@definitelytyped/dtslint/dist/index.js:186:20)

You can check the log here.

@jakebailey
Copy link
Member

Is this fixing the same thing as #55903 (and therefore #55899)?

@typescript-bot
Copy link
Collaborator

@gabritto
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 34 34 ~ ~ ~ p=1.000 n=6
Symbols 62,390 62,390 ~ ~ ~ p=1.000 n=6
Types 50,395 50,395 ~ ~ ~ p=1.000 n=6
Memory used 193,526k (± 0.76%) 194,765k (± 0.97%) ~ 192,867k 196,514k p=0.575 n=6
Parse Time 1.31s (± 0.89%) 1.32s (± 0.42%) ~ 1.31s 1.32s p=0.342 n=6
Bind Time 0.73s 0.73s ~ ~ ~ p=1.000 n=6
Check Time 9.71s (± 0.24%) 9.75s (± 0.12%) +0.04s (+ 0.43%) 9.73s 9.76s p=0.010 n=6
Emit Time 2.73s (± 0.54%) 2.73s (± 0.28%) ~ 2.72s 2.74s p=0.803 n=6
Total Time 14.48s (± 0.24%) 14.52s (± 0.08%) ~ 14.50s 14.53s p=0.061 n=6
angular-1 - node (v18.15.0, x64)
Errors 56 56 ~ ~ ~ p=1.000 n=6
Symbols 948,670 948,670 ~ ~ ~ p=1.000 n=6
Types 410,947 410,947 ~ ~ ~ p=1.000 n=6
Memory used 1,224,342k (± 0.00%) 1,224,345k (± 0.00%) ~ 1,224,243k 1,224,391k p=0.810 n=6
Parse Time 6.64s (± 0.95%) 6.59s (± 1.07%) ~ 6.52s 6.69s p=0.377 n=6
Bind Time 1.89s (± 0.47%) 1.89s (± 0.27%) ~ 1.88s 1.89s p=0.541 n=6
Check Time 31.98s (± 0.17%) 31.88s (± 0.47%) ~ 31.67s 32.08s p=0.128 n=6
Emit Time 15.32s (± 0.33%) 15.33s (± 0.72%) ~ 15.22s 15.53s p=0.872 n=6
Total Time 55.83s (± 0.18%) 55.68s (± 0.37%) ~ 55.40s 55.93s p=0.229 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,347,247 2,347,247 ~ ~ ~ p=1.000 n=6
Types 845,604 845,604 ~ ~ ~ p=1.000 n=6
Memory used 2,121,498k (± 0.01%) 2,121,438k (± 0.01%) ~ 2,121,297k 2,121,598k p=0.298 n=6
Parse Time 7.31s (± 0.36%) 7.35s (± 2.03%) ~ 7.26s 7.65s p=0.573 n=6
Bind Time 2.42s (± 2.01%) 2.38s (± 6.45%) ~ 2.07s 2.46s p=1.000 n=6
Check Time 72.70s (± 0.25%) 72.64s (± 0.52%) ~ 72.23s 73.00s p=1.000 n=6
Emit Time 0.15s (± 3.52%) 0.15s (± 3.77%) ~ 0.14s 0.15s p=0.640 n=6
Total Time 82.58s (± 0.26%) 82.52s (± 0.46%) ~ 82.09s 82.90s p=0.936 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,226,694 1,226,730 +36 (+ 0.00%) ~ ~ p=0.001 n=6
Types 266,989 266,975 -14 (- 0.01%) ~ ~ p=0.001 n=6
Memory used 2,967,140k (±10.02%) 2,967,550k (±10.00%) ~ 2,361,300k 3,089,473k p=0.936 n=6
Parse Time 6.69s (± 1.73%) 6.73s (± 0.74%) ~ 6.69s 6.83s p=1.000 n=6
Bind Time 2.14s (± 2.20%) 2.14s (± 0.69%) ~ 2.12s 2.16s p=0.747 n=6
Check Time 42.89s (± 0.25%) 42.87s (± 0.45%) ~ 42.53s 43.06s p=1.000 n=6
Emit Time 3.44s (± 2.37%) 3.54s (± 4.41%) ~ 3.42s 3.83s p=0.471 n=6
Total Time 55.17s (± 0.30%) 55.27s (± 0.47%) ~ 54.83s 55.52s p=0.378 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,226,694 1,226,730 +36 (+ 0.00%) ~ ~ p=0.001 n=6
Types 266,989 266,975 -14 (- 0.01%) ~ ~ p=0.001 n=6
Memory used 3,032,165k (± 9.75%) 2,911,301k (±12.86%) ~ 2,427,267k 3,153,601k p=0.810 n=6
Parse Time 6.94s (± 1.24%) 6.90s (± 1.32%) ~ 6.77s 7.00s p=0.575 n=6
Bind Time 2.13s (± 1.21%) 2.14s (± 1.24%) ~ 2.10s 2.18s p=0.936 n=6
Check Time 42.74s (± 0.47%) 42.66s (± 0.44%) ~ 42.38s 42.93s p=0.297 n=6
Emit Time 3.50s (± 2.98%) 3.46s (± 2.16%) ~ 3.37s 3.54s p=0.630 n=6
Total Time 55.31s (± 0.55%) 55.18s (± 0.45%) ~ 54.76s 55.40s p=0.298 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 262,666 262,674 +8 (+ 0.00%) ~ ~ p=0.001 n=6
Types 106,847 106,854 +7 (+ 0.01%) ~ ~ p=0.001 n=6
Memory used 440,296k (± 0.01%) 440,358k (± 0.02%) ~ 440,267k 440,505k p=0.230 n=6
Parse Time 2.89s (± 0.60%) 2.89s (± 0.57%) ~ 2.87s 2.91s p=0.934 n=6
Bind Time 1.11s 1.11s ~ ~ ~ p=1.000 n=6
Check Time 15.78s (± 0.39%) 15.80s (± 0.44%) ~ 15.70s 15.86s p=0.575 n=6
Emit Time 1.30s (± 1.17%) 1.29s (± 1.35%) ~ 1.27s 1.32s p=0.871 n=6
Total Time 21.08s (± 0.22%) 21.09s (± 0.34%) ~ 21.00s 21.17s p=0.872 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 71 71 ~ ~ ~ p=1.000 n=6
Symbols 225,981 225,981 ~ ~ ~ p=1.000 n=6
Types 94,356 94,356 ~ ~ ~ p=1.000 n=6
Memory used 371,225k (± 0.03%) 371,245k (± 0.04%) ~ 371,166k 371,518k p=0.810 n=6
Parse Time 2.89s (± 0.89%) 2.88s (± 0.97%) ~ 2.85s 2.92s p=0.459 n=6
Bind Time 1.60s (± 1.56%) 1.60s (± 2.11%) ~ 1.56s 1.66s p=0.745 n=6
Check Time 16.51s (± 0.32%) 16.49s (± 0.25%) ~ 16.43s 16.55s p=0.572 n=6
Emit Time 0.00s (±244.70%) 0.00s (±244.70%) ~ 0.00s 0.01s p=1.000 n=6
Total Time 21.01s (± 0.28%) 20.98s (± 0.24%) ~ 20.91s 21.05s p=0.336 n=6
vscode - node (v18.15.0, x64)
Errors 7 7 ~ ~ ~ p=1.000 n=6
Symbols 3,234,203 3,234,203 ~ ~ ~ p=1.000 n=6
Types 1,096,562 1,096,562 ~ ~ ~ p=1.000 n=6
Memory used 3,312,175k (± 0.01%) 3,312,171k (± 0.01%) ~ 3,311,642k 3,312,539k p=0.936 n=6
Parse Time 14.40s (± 0.82%) 14.36s (± 0.64%) ~ 14.24s 14.48s p=0.423 n=6
Bind Time 4.60s (± 0.67%) 4.64s (± 1.16%) ~ 4.60s 4.74s p=0.332 n=6
Check Time 89.90s (± 1.18%) 91.28s (± 1.92%) ~ 88.97s 93.27s p=0.128 n=6
Emit Time 29.06s (± 2.10%) 28.42s (± 6.99%) ~ 24.54s 30.34s p=0.810 n=6
Total Time 137.97s (± 0.92%) 138.70s (± 1.21%) ~ 136.81s 140.42s p=0.423 n=6
webpack - node (v18.15.0, x64)
Errors 29 29 ~ ~ ~ p=1.000 n=6
Symbols 294,708 294,708 ~ ~ ~ p=1.000 n=6
Types 120,445 120,445 ~ ~ ~ p=1.000 n=6
Memory used 448,537k (± 0.03%) 448,558k (± 0.02%) ~ 448,458k 448,693k p=0.936 n=6
Parse Time 4.11s (± 0.99%) 4.09s (± 1.34%) ~ 4.04s 4.16s p=0.376 n=6
Bind Time 1.77s (± 1.09%) 1.75s (± 0.67%) -0.02s (- 1.13%) 1.73s 1.76s p=0.042 n=6
Check Time 19.17s (± 0.20%) 19.19s (± 0.37%) ~ 19.09s 19.25s p=0.517 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 25.06s (± 0.28%) 25.03s (± 0.11%) ~ 25.00s 25.07s p=0.630 n=6
xstate-main - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 560,869 560,869 ~ ~ ~ p=1.000 n=6
Types 187,848 187,848 ~ ~ ~ p=1.000 n=6
Memory used 497,767k (± 0.03%) 497,697k (± 0.03%) ~ 497,401k 497,837k p=0.298 n=6
Parse Time 3.44s (± 0.44%) 3.42s (± 0.71%) ~ 3.39s 3.46s p=0.373 n=6
Bind Time 1.19s (± 1.37%) 1.19s (± 1.37%) ~ 1.17s 1.21s p=0.514 n=6
Check Time 19.70s (± 0.44%) 19.69s (± 0.41%) ~ 19.56s 19.77s p=0.688 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 24.33s (± 0.30%) 24.30s (± 0.37%) ~ 24.19s 24.42s p=0.471 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

@weswigham
Copy link
Member Author

Is this fixing the same thing as #55903 (and therefore #55899)?

Yes and no. This is only for the type form, because the type causes errors (well, anys) in the declaration emit it produces because the indexed access refers to an erased private, which is pretty bad - the encapsulation concerns are another good motivation for sure, though.

@typescript-bot
Copy link
Collaborator

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

Something interesting changed - please have a look.

Details

apollographql/apollo-client

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

tsconfig.json

src/tsconfig.json

faker-js/faker

tsconfig.json

graphile/crystal

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

grafast/grafast/tsconfig.test.json

shoelace-style/shoelace

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

tsconfig.prod.json

sindresorhus/got

tsconfig.json

TanStack/query

74 of 110 projects failed to build with the old tsc and were ignored

packages/vue-query/tsconfig.prod.json

packages/vue-query/tsconfig.legacy.json

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

packages/svelte-query-devtools/tsconfig.json

packages/solid-query-persist-client/tsconfig.prod.json

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

packages/solid-query-devtools/tsconfig.prod.json

packages/solid-query-devtools/tsconfig.json

packages/solid-query/tsconfig.prod.json

packages/solid-query/tsconfig.legacy.json

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

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

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

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

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

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

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

packages/react-query-devtools/tsconfig.json

packages/react-query/tsconfig.prod.json

packages/react-query/tsconfig.legacy.json

packages/query-sync-storage-persister/tsconfig.prod.json

packages/query-sync-storage-persister/tsconfig.json

packages/query-persist-client-core/tsconfig.prod.json

packages/query-devtools/tsconfig.prod.json

packages/query-core/tsconfig.prod.json

packages/query-core/tsconfig.legacy.json

packages/query-broadcast-client-experimental/tsconfig.prod.json

packages/query-broadcast-client-experimental/tsconfig.json

packages/query-async-storage-persister/tsconfig.prod.json

packages/query-async-storage-persister/tsconfig.json

packages/angular-query-devtools-experimental/tsconfig.json

@weswigham
Copy link
Member Author

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Feb 28, 2025

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

@weswigham Here are the results of running the user tests with tsc comparing main and refs/pull/61291/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

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

Everything looks the same!

You can check the log here.

@typescript-bot
Copy link
Collaborator

@weswigham
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 34 34 ~ ~ ~ p=1.000 n=6
Symbols 62,390 62,390 ~ ~ ~ p=1.000 n=6
Types 50,395 50,395 ~ ~ ~ p=1.000 n=6
Memory used 195,439k (± 0.95%) 195,999k (± 0.75%) ~ 193,020k 196,674k p=0.936 n=6
Parse Time 1.61s (± 1.45%) 1.60s (± 2.43%) ~ 1.53s 1.64s p=0.807 n=6
Bind Time 0.87s (± 0.86%) 0.88s (± 1.88%) ~ 0.86s 0.90s p=1.000 n=6
Check Time 11.75s (± 0.45%) 11.78s (± 0.66%) ~ 11.70s 11.88s p=0.468 n=6
Emit Time 3.30s (± 0.67%) 3.33s (± 4.15%) ~ 3.25s 3.61s p=0.374 n=6
Total Time 17.52s (± 0.23%) 17.59s (± 0.74%) ~ 17.40s 17.76s p=0.470 n=6
angular-1 - node (v18.15.0, x64)
Errors 56 56 ~ ~ ~ p=1.000 n=6
Symbols 948,670 948,670 ~ ~ ~ p=1.000 n=6
Types 410,947 410,947 ~ ~ ~ p=1.000 n=6
Memory used 1,224,303k (± 0.01%) 1,224,333k (± 0.01%) ~ 1,224,264k 1,224,442k p=0.471 n=6
Parse Time 6.64s (± 0.58%) 6.62s (± 0.70%) ~ 6.56s 6.67s p=0.574 n=6
Bind Time 1.90s (± 1.79%) 1.89s (± 0.62%) ~ 1.87s 1.90s p=0.870 n=6
Check Time 31.96s (± 0.46%) 31.96s (± 0.36%) ~ 31.80s 32.08s p=0.936 n=6
Emit Time 15.30s (± 0.41%) 15.23s (± 0.49%) ~ 15.14s 15.32s p=0.092 n=6
Total Time 55.80s (± 0.43%) 55.71s (± 0.30%) ~ 55.47s 55.96s p=0.575 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,347,247 2,347,247 ~ ~ ~ p=1.000 n=6
Types 845,604 845,604 ~ ~ ~ p=1.000 n=6
Memory used 2,121,510k (± 0.01%) 2,121,579k (± 0.01%) ~ 2,121,409k 2,121,798k p=0.378 n=6
Parse Time 8.80s (± 0.37%) 8.93s (± 2.61%) ~ 8.73s 9.24s p=0.684 n=6
Bind Time 2.94s (± 0.86%) 2.77s (± 9.33%) ~ 2.43s 2.97s p=0.366 n=6
Check Time 86.84s (± 0.44%) 88.14s (± 2.29%) ~ 86.65s 91.07s p=0.298 n=6
Emit Time 0.20s (± 5.89%) 0.20s (± 8.53%) ~ 0.18s 0.23s p=0.934 n=6
Total Time 98.78s (± 0.37%) 100.05s (± 2.00%) ~ 98.55s 102.94s p=0.297 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,226,696 1,226,732 +36 (+ 0.00%) ~ ~ p=0.001 n=6
Types 266,989 266,975 -14 (- 0.01%) ~ ~ p=0.001 n=6
Memory used 2,357,493k (± 0.03%) 2,357,322k (± 0.02%) ~ 2,356,789k 2,357,842k p=0.575 n=6
Parse Time 5.22s (± 0.64%) 5.21s (± 0.85%) ~ 5.17s 5.29s p=0.688 n=6
Bind Time 1.79s (± 0.42%) 1.78s (± 1.31%) ~ 1.75s 1.81s p=0.935 n=6
Check Time 35.26s (± 0.17%) 35.32s (± 0.29%) ~ 35.21s 35.45s p=0.378 n=6
Emit Time 3.01s (± 0.88%) 3.00s (± 2.42%) ~ 2.94s 3.14s p=0.423 n=6
Total Time 45.29s (± 0.07%) 45.33s (± 0.20%) ~ 45.18s 45.45s p=0.173 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,226,696 1,226,732 +36 (+ 0.00%) ~ ~ p=0.001 n=6
Types 266,989 266,975 -14 (- 0.01%) ~ ~ p=0.001 n=6
Memory used 3,153,469k (± 0.02%) 2,911,855k (±12.86%) ~ 2,427,198k 3,154,878k p=0.471 n=6
Parse Time 6.96s (± 0.57%) 6.97s (± 1.75%) ~ 6.77s 7.07s p=0.470 n=6
Bind Time 2.15s (± 0.87%) 2.15s (± 1.08%) ~ 2.11s 2.17s p=0.227 n=6
Check Time 42.89s (± 0.48%) 42.76s (± 0.43%) ~ 42.43s 42.95s p=0.423 n=6
Emit Time 3.50s (± 1.40%) 3.52s (± 2.53%) ~ 3.41s 3.63s p=0.810 n=6
Total Time 55.52s (± 0.31%) 55.41s (± 0.59%) ~ 54.82s 55.79s p=0.689 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 262,668 262,676 +8 (+ 0.00%) ~ ~ p=0.001 n=6
Types 106,847 106,854 +7 (+ 0.01%) ~ ~ p=0.001 n=6
Memory used 440,489k (± 0.01%) 440,471k (± 0.02%) ~ 440,270k 440,558k p=0.748 n=6
Parse Time 3.54s (± 0.71%) 3.56s (± 0.75%) ~ 3.52s 3.59s p=0.126 n=6
Bind Time 1.32s (± 1.77%) 1.32s (± 0.91%) ~ 1.31s 1.34s p=0.871 n=6
Check Time 18.97s (± 0.59%) 18.93s (± 0.26%) ~ 18.89s 19.02s p=0.872 n=6
Emit Time 1.52s (± 1.02%) 1.51s (± 1.14%) ~ 1.49s 1.53s p=0.463 n=6
Total Time 25.35s (± 0.39%) 25.33s (± 0.24%) ~ 25.27s 25.44s p=0.688 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 71 71 ~ ~ ~ p=1.000 n=6
Symbols 225,981 225,981 ~ ~ ~ p=1.000 n=6
Types 94,356 94,356 ~ ~ ~ p=1.000 n=6
Memory used 371,205k (± 0.01%) 371,259k (± 0.04%) ~ 371,158k 371,549k p=0.936 n=6
Parse Time 2.91s (± 0.81%) 2.89s (± 0.91%) ~ 2.84s 2.91s p=0.418 n=6
Bind Time 1.60s (± 1.09%) 1.60s (± 1.91%) ~ 1.56s 1.64s p=0.618 n=6
Check Time 16.53s (± 0.36%) 16.53s (± 0.20%) ~ 16.48s 16.58s p=0.806 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 21.04s (± 0.39%) 21.02s (± 0.23%) ~ 20.96s 21.08s p=0.748 n=6
vscode - node (v18.15.0, x64)
Errors 7 7 ~ ~ ~ p=1.000 n=6
Symbols 3,234,203 3,234,203 ~ ~ ~ p=1.000 n=6
Types 1,096,562 1,096,562 ~ ~ ~ p=1.000 n=6
Memory used 3,312,314k (± 0.01%) 3,312,247k (± 0.01%) ~ 3,311,644k 3,312,696k p=0.298 n=6
Parse Time 14.42s (± 0.45%) 14.36s (± 0.67%) ~ 14.26s 14.49s p=0.261 n=6
Bind Time 4.61s (± 0.84%) 4.61s (± 0.69%) ~ 4.57s 4.65s p=1.000 n=6
Check Time 90.62s (± 2.21%) 90.18s (± 1.99%) ~ 88.73s 92.67s p=1.000 n=6
Emit Time 29.07s (± 2.50%) 28.28s (± 7.07%) ~ 24.29s 29.93s p=0.810 n=6
Total Time 138.71s (± 1.46%) 137.43s (± 1.25%) ~ 135.44s 140.34s p=0.378 n=6
webpack - node (v18.15.0, x64)
Errors 29 29 ~ ~ ~ p=1.000 n=6
Symbols 294,708 294,708 ~ ~ ~ p=1.000 n=6
Types 120,445 120,445 ~ ~ ~ p=1.000 n=6
Memory used 448,543k (± 0.02%) 448,544k (± 0.02%) ~ 448,442k 448,659k p=0.936 n=6
Parse Time 4.10s (± 0.67%) 4.14s (± 0.54%) +0.04s (+ 0.93%) 4.12s 4.18s p=0.015 n=6
Bind Time 1.77s (± 1.26%) 1.77s (± 0.71%) ~ 1.76s 1.79s p=0.934 n=6
Check Time 19.23s (± 0.26%) 19.15s (± 0.40%) ~ 19.07s 19.28s p=0.077 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 25.11s (± 0.30%) 25.06s (± 0.29%) ~ 24.95s 25.18s p=0.422 n=6
xstate-main - node (v18.15.0, x64)
Errors 5 5 ~ ~ ~ p=1.000 n=6
Symbols 560,869 560,869 ~ ~ ~ p=1.000 n=6
Types 187,848 187,848 ~ ~ ~ p=1.000 n=6
Memory used 497,852k (± 0.01%) 497,815k (± 0.02%) ~ 497,713k 498,010k p=0.173 n=6
Parse Time 3.42s (± 0.62%) 3.43s (± 0.68%) ~ 3.41s 3.46s p=0.290 n=6
Bind Time 1.19s (± 2.19%) 1.19s (± 1.40%) ~ 1.18s 1.22s p=0.935 n=6
Check Time 19.70s (± 0.46%) 19.77s (± 0.57%) ~ 19.64s 19.93s p=0.335 n=6
Emit Time 0.00s 0.00s (±244.70%) ~ 0.00s 0.01s p=0.405 n=6
Total Time 24.31s (± 0.30%) 24.40s (± 0.52%) ~ 24.23s 24.57s p=0.199 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

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

Something interesting changed - please have a look.

Details

apollographql/apollo-client

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

tsconfig.json

sindresorhus/got

tsconfig.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Not started
Development

Successfully merging this pull request may close these issues.

Using types from private class properties results in any types in .d.ts files
4 participants