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

Fixed an issue with contextual type for intersection properties (take 2) #52095

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

Conversation

Andarist
Copy link
Contributor

@Andarist Andarist commented Jan 4, 2023

fixes #48812
fixes #55150
fixes #59473

This PR is another take on what already has been approved and merged: #48668 . It later got reverted to give time for further investigation of #49307 since that PR broke Redux Toolkit's types.

This PR adds adjusted test cases that were discovered in #49307. The minimal repro case posted by @andrewbranch was this:

type Validate<T> = T & { [K in keyof T]: object }
declare function f<S, T extends Record<string, (state: S) => any>>(s: S, x: Validate<T>): void;

f(0, {
  foo: s => s + 1, // contextual type for `s` provided, no implicit any reported
})

I decided to treat indexed mapped type substitutions within intersections differently. Now they are intersected with either concrete property types or with applicable index info types.

They are not treated as "concrete" - so they don't take precedence over applicable index info types. They are always uses, if we find any concrete property types then we intersect them with those. If we don't have any concrete property types then we find applicable index info types and we intersect with those.

Usually, concrete properties take precedence over index signatures. Through experimentation (and thanks to user/topXXX tests 😉 ), I found out that generic mapped type substitutions are neither. They can resolve to both and while they are generic we can't tell how "important" they are (if they should take precedence over index signatures or not, etc).

With coherent types, concrete properties should always be compatible with index signatures. So if we think about it, even sourcing the contextual property type from all intersection constituents and intersecting those results should be OK. And from that PoV, intersecting those mapped type substitutions with either concrete properties or applicable index infos is still OK (since we should be able to just intersect all 3 categories together).

If we intersect all of the categories we fail this test case with this error. This happens because the index signature there ({ [k: string]: any; }) spoils the result - any is contagious. A simple solution to that is to... discard any. it doesn't provide any new information for the contextual type and any type that results from other "hints" will be compatible with it.

This particular issue is even manifested in much simpler scenarios, like the ones reported in #59473:

// Type '{ prop: string; }' is not assignable to type '{ prop: "foo"; } & { prop: any; }'.
const test: { prop: "foo" } & { prop: any } = { prop: "foo" };

There is an extra complication with the generic mapped type substitutions. At times, a property might be filtered out by a generic Omit or similar. This isn't a new problem and we can see it at play without intersections here. This example isn't wrong per se since the resulting type is still compatible with the constraint and all. It's just moderately surprising that the contextual parameter type was assigned to this parameter.

Previously, this wasn't a problem as substituteIndexedMappedType was not called within intersections. It becomes a bigger problem now since for some properties we shouldn't use indexed mapped type substitutions - they could spoil the overall result if we intersect something that shouldn't be there with some other type that should be there and that was meant to "shadow" over the the one provided by an Omitting mapped type.

Negated types aren't a thing in TS, but we can still prove that some properties are filtered out by mapped type constraints that are conditional types with never true type and properties assignable to their extendsType.

And last but not least, we need to exclude index info types when a concrete property type is found in any constituent. The previous version of the code used resolved structured members so intersections members were resolved and concrete properties were correctly "shadowing over" index infos. Without it, we'd break this:

const test: { prop: (arg: number) => void } & {
  [k: string]: (arg: any) => void;
} = {
  prop: (arg) => {
    arg; // number
  },
};

That's why all of this requires custom intersection handling and a two-pass iteration through those constituents.

TLDR requirements:

  • all intersection constituent types should contribute to contextual typing, so all contained mapped types can potentially go through substituteIndexedMappedType
  • in presence of concrete properties index info types should not be used (including when they are contained in different constituent types)
  • any has to be remapped to unknown as otherwise it spoils results given T & any // any
  • Omit-like generic mapped types should be skipped when it's provable that a certain property is meant to be omitted by them

cc @andrewbranch @RyanCavanaugh @phryneas @markerikson

@typescript-bot typescript-bot added the For Backlog Bug PRs that fix a backlog bug label Jan 4, 2023
@fatcerberus
Copy link

fatcerberus commented Jan 4, 2023

At the moment RTK uses an index signature for their SliceCaseReducers type (here) and this PR breaks that. @andrewbranch has reasonable doubts (starting from #49307 (comment)) if that should ever work.

From experience with the larger TS community, I can say with some confidence that IndexSignature & SpecificProps is a very common workaround in the wild for #17867 (as a matter of fact, it's the very first reply in that issue!). I have to grit my teeth every time I encounter it and have actively tried to steer people away from it, but most people tend to insist they need it anyway despite the footguns. So any change to the behavior of that pattern is likely to break people, unfortunately.

Also aren't Record<string, T> and { [x: string]: T } the exact same type?

@phryneas
Copy link

phryneas commented Jan 4, 2023

Also aren't Record<string, T> and { [x: string]: T } the exact same type?

One is { [K in string]: T } and the other is { [x: string]: T } - while they describe the same thing (in the case of the full string type, but not in any other case), they have always behaved differently.

@fatcerberus
Copy link

@phryneas Hmm, if they behave differently then that makes this rather misleading:
image

@phryneas
Copy link

phryneas commented Jan 4, 2023

That indeed seems to be a bit misleading. The definition of Record definitely uses a mapped type though.

type Record<K extends keyof any, T> = {
    [P in K]: T;
};

@fatcerberus
Copy link

Yeah, I was aware that was the implementation. I just thought that { [K in string]: T } automatically reduced to an index signature, thanks mostly to the above tooltip.

@matheusiacono I'm... not sure why you 👎'd my comment? That the hover tip displays an index signature when the actual type behaves differently from what's displayed is factual and not just my opinion.

@Andarist
Copy link
Contributor Author

From experience with the larger TS community, I can say with some confidence that IndexSignature & SpecificProps is a very common workaround in the wild for #17867 (as a matter of fact, it's the very first reply in that issue!). I have to grit my teeth every time I encounter it and have actively tried to steer people away from it, but most people tend to insist they need it anyway despite the footguns. So any change to the behavior of that pattern is likely to break people, unfortunately.

Note that this PR doesn't necessarily have to break patterns like this. It's hard to tell though - I would have to examine a concrete example, with a concrete use case in mind (contextual typing, completions, etc).

As to the difference between Record<string, T> and { [x: string]: T }. Those are 2 different types, type displays can sometimes be confusing like that - but TS at times tracks how a given type originated and might utilize this information. For example PlainFormFields and MappedFormFields display exactly the same here but yet they behave differently.

It's helpful to check out the TS AST Viewer and the flags contained on those types (link here). Also note that their types have different IDs - which is the ultimate no answer to the question if they are the same.

// flags: Object (2 ^ 19) | DefinitelyNonNullable | StructuredType | StructuredOrInstantiable | ObjectFlagsType | Narrowable | IncludesMask | NotPrimitiveUnion
// objectFlags: Anonymous (2 ^ 4) | ObjectTypeKindMask
type A = { [key: string]: number }
// flags: Object (2 ^ 19) | DefinitelyNonNullable | StructuredType | StructuredOrInstantiable | ObjectFlagsType | Narrowable | IncludesMask | NotPrimitiveUnion
// objectFlags: Mapped (2 ^ 5) | Instantiated (2 ^ 6) | CouldContainTypeVariablesComputed (2 ^ 19) | CouldContainTypeVariables (2 ^ 20) | ObjectTypeKindMask
type B = Record<string, number>
// flags: Object (2 ^ 19) | DefinitelyNonNullable | StructuredType | StructuredOrInstantiable | ObjectFlagsType | Narrowable | IncludesMask | NotPrimitiveUnion
// objectFlags: Mapped (2 ^ 5) | ObjectTypeKindMask
type C = { [K in string]: number }

We might notice here that all of them have the same flags but they are all different when it comes to objectFlags. B and C are roughly the same though, B just have some extra objectFlags since it's coming from an instantiated type alias.

That being said - I can't be sure if the proposed change is how this whole fix should look like. It's a conversation starter, maybe I will have to tweak this based on the TS team feedback.

@andrewbranch
Copy link
Member

Does this PR create an observable difference between Record<string, T> and { [x: string]: T } or did you just discover an existing one that lets you work around the other effects of the PR?

@Andarist
Copy link
Contributor Author

Andarist commented Jan 17, 2023

@andrewbranch it creates an observable difference in getting the type of the property of a contextual type. Some of the the new test cases wouldn't infer correctly with the generic constraint of { [x: string]: T } but they infer OK with Record<string, T>. You could change the definition of this SliceCaseReducers back and forth to observe the difference

However, I'm not saying - by any means - that this is what I want to land. This whole PR is meant to restart the conversation around this since the original PR landed and got reverted later.

When discussing the regression in #49307, both you and @RyanCavanaugh said that the original PR had merit and that contextual properties coming from index signatures are dubious (when a concrete property is available) and that cases like this were handled inconsistently by TS. The original PR was reverted to give you more time to think about this - it has been half a year and I just hope to revive this conversation.

There are some important things to note down here - we don't need to create any observable difference between both of those. This is not required to fix what this PR is fixing.

So to move this PR forward we can either:

  1. ignore index signatures in presence of concrete properties. This would likely reintroduce the regression from Nightly bug(?) with infering function generic while being part of intersection #49307. It's even possible that wouldn't necessarily be a bad thing (I'm not super clear on that though) but it's unknown to me how RTK could rewrite their types today to fix their types. I proposed a solution here but it doesn't work in their repo - so there is more to it (the failed PR can be found here). It also doesn't necessarily mean that their current types shouldn't work - they are certainly unusual but maybe they don't abuse the implementation and are aligned with TS design. That's something that the TS team would have to decide on.
  2. never ignore those index signatures. This PR would still fix what it is fixing. I just didn't do it because you had doubts about index signatures behavior in Nightly bug(?) with infering function generic while being part of intersection #49307
  3. use a mixed approach - but I'm not sure what exact heuristics should be used. Perhaps we should check if the contextual type is part of the generic constraint? If it is - then it would make sense to use its "index signature", when the contextual type would be concrete then the index signature could be ignored. I'm not sure what the exact condition for such a check would be preferred but I could experiment with something if you decide that this is what your team wants to have implemented.

@markerikson
Copy link

For the record we already only support TS 4.2+ as of RTK 1.9.

@Andarist
Copy link
Contributor Author

Your CI job just reported that the proposed solution doesn't work for you 🤣 it seems that there is more to this there than what was captured by the slimmed-down repro

@sandersn sandersn added this to Not started in PR Backlog Jan 19, 2023
@sandersn sandersn moved this from Not started to Waiting on reviewers in PR Backlog Feb 14, 2023
@Andarist
Copy link
Contributor Author

@andrewbranch @RyanCavanaugh would there be a chance to put this on 5.2 agenda since the work on that has just started? I would gladly tweak the content of this PR however you see fit - but right now it's not entirely obvious how this should behave when index signatures are involved. This probably warrants a design meeting or something.

@Andarist
Copy link
Contributor Author

To get the ball rolling I made some changes to this PR. I decided to treat indexed mapped type substitutions within intersections differently. Now they are intersected with either concrete property types or with applicable index info types.

They are not treated as "concrete" - so they don't take precedence over applicable index info types. They are always used though, if we find any concrete property types then we intersect them with those. If we don't have any concrete property types then we find applicable index info types and we intersect with those.

It is somewhat strange... but it maintains backward compatibility.

@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 @jakebailey, the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@typescript-bot
Copy link
Collaborator

@jakebailey
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - node (v18.15.0, x64)
Errors 30 30 ~ ~ ~ p=1.000 n=6
Symbols 62,153 62,153 ~ ~ ~ p=1.000 n=6
Types 50,242 50,242 ~ ~ ~ p=1.000 n=6
Memory used 193,524k (± 0.95%) 194,169k (± 1.02%) ~ 192,333k 196,015k p=0.378 n=6
Parse Time 1.30s (± 1.09%) 1.30s (± 0.93%) ~ 1.29s 1.32s p=0.743 n=6
Bind Time 0.71s 0.71s ~ ~ ~ p=1.000 n=6
Check Time 9.57s (± 0.39%) 9.57s (± 0.46%) ~ 9.54s 9.64s p=0.739 n=6
Emit Time 2.73s (± 0.72%) 2.74s (± 0.71%) ~ 2.72s 2.77s p=0.683 n=6
Total Time 14.31s (± 0.32%) 14.32s (± 0.24%) ~ 14.30s 14.39s p=0.870 n=6
angular-1 - node (v18.15.0, x64)
Errors 7 7 ~ ~ ~ p=1.000 n=6
Symbols 945,537 945,533 -4 (- 0.00%) ~ ~ p=0.001 n=6
Types 409,512 409,512 ~ ~ ~ p=1.000 n=6
Memory used 1,222,249k (± 0.00%) 1,222,289k (± 0.01%) ~ 1,222,161k 1,222,354k p=0.378 n=6
Parse Time 6.64s (± 0.82%) 6.62s (± 0.60%) ~ 6.57s 6.69s p=0.936 n=6
Bind Time 1.86s (± 0.22%) 1.87s (± 0.40%) ~ 1.86s 1.88s p=0.100 n=6
Check Time 31.20s (± 0.36%) 31.17s (± 0.53%) ~ 30.97s 31.34s p=1.000 n=6
Emit Time 15.03s (± 0.74%) 15.03s (± 0.63%) ~ 14.90s 15.15s p=1.000 n=6
Total Time 54.73s (± 0.26%) 54.68s (± 0.31%) ~ 54.51s 54.95s p=0.470 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,483,478 2,483,410 -68 (- 0.00%) ~ ~ p=0.001 n=6
Types 1,012,731 1,012,757 +26 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,475,406k (± 0.00%) 2,474,498k (± 0.00%) -908k (- 0.04%) 2,474,456k 2,474,527k p=0.005 n=6
Parse Time 8.78s (± 0.50%) 8.81s (± 0.47%) ~ 8.75s 8.86s p=0.188 n=6
Bind Time 2.18s (± 0.37%) 2.18s (± 0.41%) ~ 2.17s 2.19s p=0.550 n=6
Check Time 75.41s (± 0.59%) 76.11s (± 0.99%) ~ 75.64s 77.63s p=0.173 n=6
Emit Time 0.28s (± 3.19%) 0.28s (± 1.45%) ~ 0.28s 0.29s p=0.787 n=6
Total Time 86.66s (± 0.57%) 87.39s (± 0.81%) ~ 86.98s 88.83s p=0.149 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,229,171 1,229,201 +30 (+ 0.00%) ~ ~ p=0.001 n=6
Types 264,285 264,291 +6 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,349,659k (± 0.03%) 2,349,915k (± 0.04%) ~ 2,349,103k 2,351,408k p=0.575 n=6
Parse Time 4.94s (± 0.58%) 4.97s (± 1.57%) ~ 4.89s 5.08s p=0.936 n=6
Bind Time 1.88s (± 0.52%) 1.89s (± 0.64%) ~ 1.88s 1.91s p=0.138 n=6
Check Time 34.46s (± 0.16%) 34.49s (± 0.33%) ~ 34.40s 34.65s p=0.936 n=6
Emit Time 3.31s (± 0.91%) 3.29s (± 0.80%) ~ 3.25s 3.32s p=0.260 n=6
Total Time 44.63s (± 0.19%) 44.64s (± 0.21%) ~ 44.51s 44.72s p=0.575 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,201 +30 (+ 0.00%) ~ ~ p=0.001 n=6
Types 264,285 264,291 +6 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,422,471k (± 0.01%) 2,423,324k (± 0.02%) +853k (+ 0.04%) 2,422,834k 2,424,068k p=0.008 n=6
Parse Time 6.25s (± 0.17%) 6.21s (± 0.64%) ~ 6.15s 6.26s p=0.092 n=6
Bind Time 2.03s (± 1.06%) 2.03s (± 0.79%) ~ 2.02s 2.06s p=1.000 n=6
Check Time 41.20s (± 0.51%) 41.16s (± 0.31%) ~ 41.02s 41.32s p=0.936 n=6
Emit Time 4.02s (± 0.74%) 4.03s (± 2.21%) ~ 3.96s 4.20s p=0.572 n=6
Total Time 53.52s (± 0.40%) 53.45s (± 0.29%) ~ 53.28s 53.64s p=0.689 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 256,238 256,268 +30 (+ 0.01%) ~ ~ p=0.001 n=6
Types 104,976 104,982 +6 (+ 0.01%) ~ ~ p=0.001 n=6
Memory used 428,303k (± 0.02%) 428,373k (± 0.01%) ~ 428,326k 428,404k p=0.378 n=6
Parse Time 4.15s (± 0.30%) 4.16s (± 0.75%) ~ 4.13s 4.22s p=0.678 n=6
Bind Time 1.64s (± 1.00%) 1.62s (± 1.44%) ~ 1.58s 1.65s p=0.360 n=6
Check Time 22.24s (± 0.35%) 22.35s (± 0.46%) ~ 22.20s 22.49s p=0.078 n=6
Emit Time 2.02s (± 1.02%) 2.04s (± 0.98%) ~ 2.02s 2.07s p=0.167 n=6
Total Time 30.05s (± 0.30%) 30.17s (± 0.19%) ~ 30.11s 30.25s p=0.065 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,146 ~ ~ ~ p=1.000 n=6
Memory used 370,196k (± 0.04%) 370,131k (± 0.04%) ~ 370,019k 370,373k p=0.471 n=6
Parse Time 2.76s (± 0.83%) 2.76s (± 0.90%) ~ 2.74s 2.81s p=1.000 n=6
Bind Time 1.57s (± 0.52%) 1.58s (± 1.01%) ~ 1.56s 1.60s p=0.401 n=6
Check Time 15.66s (± 0.33%) 15.69s (± 0.28%) ~ 15.63s 15.74s p=0.191 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 19.99s (± 0.34%) 20.04s (± 0.29%) ~ 19.98s 20.14s p=0.470 n=6
vscode - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,992,240 2,992,239 -1 (- 0.00%) ~ ~ p=0.001 n=6
Types 1,029,514 1,029,514 ~ ~ ~ p=1.000 n=6
Memory used 3,117,054k (± 0.00%) 3,117,167k (± 0.00%) +112k (+ 0.00%) 3,117,072k 3,117,210k p=0.020 n=6
Parse Time 16.97s (± 0.31%) 16.95s (± 0.29%) ~ 16.87s 16.99s p=0.687 n=6
Bind Time 5.31s (± 2.47%) 5.21s (± 1.76%) -0.10s (- 1.88%) 5.17s 5.40s p=0.028 n=6
Check Time 95.68s (± 0.30%) 95.74s (± 0.43%) ~ 94.92s 96.06s p=0.471 n=6
Emit Time 24.86s (± 0.61%) 24.82s (± 0.90%) ~ 24.48s 25.14s p=0.873 n=6
Total Time 142.82s (± 0.24%) 142.72s (± 0.42%) ~ 141.55s 143.13s p=1.000 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,184 -3 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 413,070k (± 0.01%) 413,119k (± 0.02%) ~ 412,984k 413,212k p=0.173 n=6
Parse Time 3.81s (± 0.40%) 3.82s (± 0.77%) ~ 3.80s 3.88s p=1.000 n=6
Bind Time 1.72s (± 0.57%) 1.72s (± 0.47%) ~ 1.71s 1.73s p=0.394 n=6
Check Time 16.85s (± 0.38%) 16.82s (± 0.30%) ~ 16.75s 16.89s p=0.936 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 22.38s (± 0.28%) 22.37s (± 0.14%) ~ 22.34s 22.41s p=0.935 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,467 -2 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 481,318k (± 0.01%) 481,038k (± 0.01%) -280k (- 0.06%) 480,954k 481,098k p=0.005 n=6
Parse Time 3.39s (± 0.47%) 3.41s (± 0.70%) ~ 3.38s 3.45s p=0.246 n=6
Bind Time 1.25s (± 0.65%) 1.26s (± 0.41%) ~ 1.25s 1.26s p=0.523 n=6
Check Time 18.02s (± 0.28%) 18.10s (± 0.25%) +0.08s (+ 0.43%) 18.03s 18.15s p=0.031 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 22.67s (± 0.24%) 22.77s (± 0.24%) +0.10s (+ 0.43%) 22.68s 22.81s p=0.037 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Compiler-Unions - node (v18.15.0, x64)
  • angular-1 - node (v18.15.0, x64)
  • mui-docs - node (v18.15.0, x64)
  • self-build-src - node (v18.15.0, x64)
  • self-build-src-public-api - node (v18.15.0, x64)
  • self-compiler - node (v18.15.0, x64)
  • ts-pre-modules - node (v18.15.0, x64)
  • vscode - node (v18.15.0, x64)
  • webpack - node (v18.15.0, x64)
  • xstate-main - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

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

Something interesting changed - please have a look.

Details

vuetifyjs/vuetify

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

packages/vuetify/tsconfig.json

packages/vuetify/tsconfig.dist.json

packages/vuetify/tsconfig.checks.json

@Andarist
Copy link
Contributor Author

Andarist commented Aug 3, 2024

The break above seems to be related to how contextual any is eliminated from intersections here. On main contextual this gets reduced to any (see the TS playground here) and it doesn't happen with the code in this PR.

this is a contextual parameter and regular contextual parameters are not ignoring any so it also shouldn't be ignored for this. I'll fix this soon.

@typescript-bot typescript-bot added the For Milestone Bug PRs that fix a bug with a specific milestone label Aug 3, 2024
@Andarist
Copy link
Contributor Author

Andarist commented Aug 3, 2024

I think I fixed the above in the last commit. The fix is somewhat implicit but at the same time, it feels like there might be other bugs with ThisType vs contextual any present today: TS playground. My focus was on fixing the discovered issue without introducing too much glue code (like a new context flag).

@jakebailey would you be so kind to rerun the tests? :)

@jakebailey
Copy link
Member

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 4, 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 @jakebailey, the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@typescript-bot
Copy link
Collaborator

@jakebailey
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - node (v18.15.0, x64)
Errors 30 30 ~ ~ ~ p=1.000 n=6
Symbols 62,153 62,153 ~ ~ ~ p=1.000 n=6
Types 50,242 50,242 ~ ~ ~ p=1.000 n=6
Memory used 192,331k (± 0.03%) 192,950k (± 0.76%) ~ 192,308k 195,944k p=0.336 n=6
Parse Time 1.30s (± 0.90%) 1.30s (± 0.69%) ~ 1.29s 1.31s p=0.933 n=6
Bind Time 0.71s 0.71s ~ ~ ~ p=1.000 n=6
Check Time 9.57s (± 0.10%) 9.57s (± 0.37%) ~ 9.52s 9.62s p=0.739 n=6
Emit Time 2.74s (± 0.68%) 2.75s (± 0.65%) ~ 2.73s 2.78s p=0.746 n=6
Total Time 14.32s (± 0.12%) 14.33s (± 0.28%) ~ 14.28s 14.39s p=0.746 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,507 -5 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 1,222,266k (± 0.00%) 1,222,303k (± 0.00%) ~ 1,222,203k 1,222,365k p=0.128 n=6
Parse Time 6.61s (± 0.53%) 6.61s (± 0.76%) ~ 6.56s 6.69s p=0.809 n=6
Bind Time 1.86s (± 0.28%) 1.86s (± 0.22%) ~ 1.86s 1.87s p=0.595 n=6
Check Time 31.16s (± 0.99%) 31.27s (± 0.39%) ~ 31.14s 31.48s p=0.173 n=6
Emit Time 14.98s (± 0.69%) 15.04s (± 0.68%) ~ 14.92s 15.16s p=0.377 n=6
Total Time 54.60s (± 0.49%) 54.78s (± 0.31%) ~ 54.59s 55.04s p=0.199 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,483,478 2,483,408 -70 (- 0.00%) ~ ~ p=0.001 n=6
Types 1,012,731 1,012,775 +44 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,475,428k (± 0.00%) 2,474,503k (± 0.00%) -926k (- 0.04%) 2,474,400k 2,474,602k p=0.005 n=6
Parse Time 8.82s (± 0.51%) 8.79s (± 0.44%) ~ 8.75s 8.85s p=0.260 n=6
Bind Time 2.18s (± 0.19%) 2.17s (± 0.48%) ~ 2.16s 2.19s p=0.528 n=6
Check Time 76.29s (± 1.65%) 76.36s (± 1.30%) ~ 75.59s 78.29s p=0.471 n=6
Emit Time 0.28s (± 1.82%) 0.28s (± 1.47%) ~ 0.27s 0.28s p=0.114 n=6
Total Time 87.57s (± 1.43%) 87.60s (± 1.18%) ~ 86.82s 89.61s p=0.630 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,229,171 1,229,201 +30 (+ 0.00%) ~ ~ p=0.001 n=6
Types 264,285 264,301 +16 (+ 0.01%) ~ ~ p=0.001 n=6
Memory used 2,408,399k (± 6.00%) 2,349,849k (± 0.02%) ~ 2,349,311k 2,350,211k p=0.173 n=6
Parse Time 4.96s (± 1.40%) 5.00s (± 0.99%) ~ 4.92s 5.07s p=0.470 n=6
Bind Time 1.89s (± 0.56%) 1.88s (± 0.55%) ~ 1.86s 1.89s p=0.241 n=6
Check Time 34.47s (± 0.41%) 34.56s (± 0.66%) ~ 34.32s 34.84s p=0.689 n=6
Emit Time 3.33s (± 1.27%) 3.31s (± 0.99%) ~ 3.27s 3.36s p=0.575 n=6
Total Time 44.65s (± 0.37%) 44.76s (± 0.52%) ~ 44.41s 45.02s p=0.261 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,201 +30 (+ 0.00%) ~ ~ p=0.001 n=6
Types 264,285 264,301 +16 (+ 0.01%) ~ ~ p=0.001 n=6
Memory used 2,422,665k (± 0.02%) 2,423,466k (± 0.02%) +801k (+ 0.03%) 2,422,966k 2,423,900k p=0.020 n=6
Parse Time 6.22s (± 0.76%) 6.21s (± 0.53%) ~ 6.16s 6.25s p=1.000 n=6
Bind Time 2.02s (± 1.27%) 2.02s (± 0.81%) ~ 2.00s 2.05s p=0.935 n=6
Check Time 41.07s (± 0.20%) 41.24s (± 0.24%) +0.17s (+ 0.41%) 41.13s 41.38s p=0.013 n=6
Emit Time 4.02s (± 0.60%) 3.99s (± 0.72%) ~ 3.94s 4.02s p=0.146 n=6
Total Time 53.34s (± 0.22%) 53.49s (± 0.18%) ~ 53.39s 53.66s p=0.066 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 256,238 256,268 +30 (+ 0.01%) ~ ~ p=0.001 n=6
Types 104,976 104,988 +12 (+ 0.01%) ~ ~ p=0.001 n=6
Memory used 428,213k (± 0.01%) 428,393k (± 0.01%) +180k (+ 0.04%) 428,344k 428,470k p=0.005 n=6
Parse Time 4.16s (± 0.51%) 4.15s (± 0.59%) ~ 4.11s 4.17s p=0.742 n=6
Bind Time 1.62s (± 0.61%) 1.60s (± 1.29%) ~ 1.58s 1.63s p=0.216 n=6
Check Time 22.27s (± 0.37%) 22.35s (± 0.59%) ~ 22.16s 22.51s p=0.261 n=6
Emit Time 2.00s (± 0.60%) 2.02s (± 0.79%) +0.02s (+ 0.92%) 2.00s 2.05s p=0.045 n=6
Total Time 30.05s (± 0.20%) 30.12s (± 0.51%) ~ 29.91s 30.32s p=0.630 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,150 +4 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 370,052k (± 0.02%) 370,142k (± 0.05%) ~ 369,919k 370,352k p=0.471 n=6
Parse Time 3.45s (± 1.15%) 3.48s (± 0.76%) ~ 3.43s 3.50s p=0.197 n=6
Bind Time 1.94s (± 0.69%) 1.92s (± 0.77%) -0.02s (- 1.03%) 1.90s 1.93s p=0.039 n=6
Check Time 19.35s (± 0.56%) 19.32s (± 0.21%) ~ 19.28s 19.38s p=0.936 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 24.74s (± 0.39%) 24.72s (± 0.25%) ~ 24.61s 24.79s p=0.688 n=6
vscode - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,992,199 2,992,205 +6 (+ 0.00%) ~ ~ p=0.001 n=6
Types 1,029,506 1,029,524 +18 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 3,117,038k (± 0.00%) 3,117,048k (± 0.00%) ~ 3,116,871k 3,117,170k p=0.936 n=6
Parse Time 13.78s (± 0.37%) 13.82s (± 0.32%) ~ 13.76s 13.88s p=0.192 n=6
Bind Time 4.37s (± 2.61%) 4.38s (± 3.18%) ~ 4.28s 4.62s p=0.744 n=6
Check Time 79.31s (± 0.27%) 79.48s (± 0.37%) ~ 79.08s 79.73s p=0.261 n=6
Emit Time 20.52s (± 0.38%) 20.64s (± 0.49%) ~ 20.51s 20.82s p=0.054 n=6
Total Time 117.99s (± 0.18%) 118.33s (± 0.19%) +0.34s (+ 0.29%) 118.08s 118.68s p=0.045 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,186 -1 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 413,068k (± 0.01%) 413,108k (± 0.02%) ~ 412,989k 413,272k p=0.378 n=6
Parse Time 3.82s (± 0.36%) 3.83s (± 0.45%) ~ 3.81s 3.85s p=0.684 n=6
Bind Time 1.71s (± 0.80%) 1.71s (± 1.19%) ~ 1.67s 1.72s p=0.788 n=6
Check Time 16.81s (± 0.53%) 16.88s (± 0.57%) ~ 16.72s 17.01s p=0.199 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 22.35s (± 0.41%) 22.42s (± 0.45%) ~ 22.24s 22.54s p=0.296 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,467 -2 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 481,371k (± 0.01%) 480,996k (± 0.01%) -375k (- 0.08%) 480,951k 481,047k p=0.005 n=6
Parse Time 3.41s (± 0.68%) 3.41s (± 0.76%) ~ 3.37s 3.45s p=0.514 n=6
Bind Time 1.25s (± 0.79%) 1.25s (± 0.94%) ~ 1.23s 1.26s p=1.000 n=6
Check Time 18.02s (± 0.33%) 18.08s (± 0.30%) ~ 18.02s 18.14s p=0.126 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 22.68s (± 0.22%) 22.74s (± 0.31%) ~ 22.65s 22.84s 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

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

Everything looks good!

src/compiler/checker.ts Show resolved Hide resolved
src/compiler/checker.ts Show resolved Hide resolved
src/compiler/checker.ts Show resolved Hide resolved
src/compiler/checker.ts Show resolved Hide resolved
@ahejlsberg
Copy link
Member

@typescript-bot test it

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 6, 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.

Everything looks the same!

You can check the log here.

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@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,242 ~ ~ ~ p=1.000 n=6
Memory used 194,728k (± 0.95%) 193,527k (± 0.95%) ~ 192,304k 195,912k p=0.230 n=6
Parse Time 1.30s (± 0.58%) 1.30s (± 1.23%) ~ 1.27s 1.31s p=1.000 n=6
Bind Time 0.71s 0.71s ~ ~ ~ p=1.000 n=6
Check Time 9.54s (± 0.33%) 9.54s (± 0.37%) ~ 9.48s 9.58s p=1.000 n=6
Emit Time 2.74s (± 0.85%) 2.74s (± 0.69%) ~ 2.71s 2.76s p=0.935 n=6
Total Time 14.29s (± 0.26%) 14.29s (± 0.13%) ~ 14.26s 14.31s p=0.624 n=6
angular-1 - node (v18.15.0, x64)
Errors 7 7 ~ ~ ~ p=1.000 n=6
Symbols 945,757 945,753 -4 (- 0.00%) ~ ~ p=0.001 n=6
Types 410,045 410,045 ~ ~ ~ p=1.000 n=6
Memory used 1,222,535k (± 0.00%) 1,222,521k (± 0.00%) ~ 1,222,475k 1,222,564k p=0.689 n=6
Parse Time 6.65s (± 0.63%) 6.63s (± 0.53%) ~ 6.56s 6.66s p=0.293 n=6
Bind Time 1.86s (± 0.28%) 1.87s (± 0.45%) ~ 1.86s 1.88s p=0.923 n=6
Check Time 31.08s (± 0.42%) 31.04s (± 0.33%) ~ 30.87s 31.18s p=0.748 n=6
Emit Time 14.97s (± 0.27%) 14.94s (± 0.41%) ~ 14.84s 15.01s p=0.470 n=6
Total Time 54.55s (± 0.24%) 54.47s (± 0.30%) ~ 54.20s 54.66s p=0.470 n=6
mui-docs - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,476,957 2,476,889 -68 (- 0.00%) ~ ~ p=0.001 n=6
Types 1,014,604 1,014,632 +28 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,494,975k (± 0.00%) 2,493,948k (± 0.00%) -1,026k (- 0.04%) 2,493,907k 2,493,981k p=0.005 n=6
Parse Time 9.19s (± 0.47%) 9.19s (± 0.32%) ~ 9.16s 9.24s p=1.000 n=6
Bind Time 2.17s (± 0.35%) 2.17s (± 0.38%) ~ 2.16s 2.18s p=0.729 n=6
Check Time 76.00s (± 0.26%) 76.37s (± 0.61%) ~ 75.71s 76.87s p=0.173 n=6
Emit Time 0.28s (± 2.67%) 0.28s (± 2.67%) ~ 0.27s 0.29s p=1.000 n=6
Total Time 87.64s (± 0.24%) 88.01s (± 0.56%) ~ 87.33s 88.58s p=0.173 n=6
self-build-src - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,229,193 1,229,222 +29 (+ 0.00%) ~ ~ p=0.001 n=6
Types 263,883 263,889 +6 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,526,794k (± 7.70%) 2,349,392k (± 0.02%) ~ 2,348,711k 2,349,937k p=0.689 n=6
Parse Time 6.05s (± 0.71%) 6.07s (± 0.80%) ~ 6.00s 6.13s p=0.421 n=6
Bind Time 2.24s (± 0.80%) 2.25s (± 0.63%) ~ 2.23s 2.27s p=0.520 n=6
Check Time 40.26s (± 0.89%) 40.70s (± 0.28%) +0.44s (+ 1.08%) 40.51s 40.87s p=0.025 n=6
Emit Time 3.95s (± 1.07%) 3.97s (± 1.47%) ~ 3.92s 4.06s p=0.936 n=6
Total Time 52.53s (± 0.74%) 53.00s (± 0.33%) ~ 52.83s 53.32s p=0.066 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 1,229,193 1,229,222 +29 (+ 0.00%) ~ ~ p=0.001 n=6
Types 263,883 263,889 +6 (+ 0.00%) ~ ~ p=0.001 n=6
Memory used 2,423,107k (± 0.01%) 2,423,875k (± 0.02%) +767k (+ 0.03%) 2,423,257k 2,424,578k p=0.013 n=6
Parse Time 5.14s (± 1.33%) 5.13s (± 0.77%) ~ 5.07s 5.17s p=0.810 n=6
Bind Time 1.69s (± 0.37%) 1.69s (± 0.44%) ~ 1.68s 1.70s p=0.718 n=6
Check Time 35.01s (± 0.26%) 35.05s (± 0.28%) ~ 34.93s 35.17s p=0.572 n=6
Emit Time 3.33s (± 0.52%) 3.36s (± 0.83%) ~ 3.33s 3.39s p=0.125 n=6
Total Time 45.18s (± 0.20%) 45.25s (± 0.30%) ~ 45.10s 45.41s p=0.470 n=6
self-compiler - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 256,650 256,679 +29 (+ 0.01%) ~ ~ p=0.001 n=6
Types 105,468 105,474 +6 (+ 0.01%) ~ ~ p=0.001 n=6
Memory used 428,722k (± 0.03%) 428,897k (± 0.03%) ~ 428,773k 429,026k p=0.066 n=6
Parse Time 4.16s (± 0.67%) 4.15s (± 0.24%) ~ 4.14s 4.16s p=0.935 n=6
Bind Time 1.61s (± 0.51%) 1.60s (± 1.79%) ~ 1.56s 1.63s p=0.625 n=6
Check Time 22.21s (± 0.36%) 22.24s (± 0.57%) ~ 22.09s 22.41s p=0.630 n=6
Emit Time 2.02s (± 0.85%) 2.01s (± 1.39%) ~ 1.98s 2.06s p=0.257 n=6
Total Time 29.99s (± 0.31%) 30.01s (± 0.54%) ~ 29.82s 30.23s p=0.936 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors 35 35 ~ ~ ~ p=1.000 n=6
Symbols 225,018 225,018 ~ ~ ~ p=1.000 n=6
Types 94,245 94,245 ~ ~ ~ p=1.000 n=6
Memory used 370,148k (± 0.02%) 370,101k (± 0.02%) ~ 370,036k 370,171k p=0.471 n=6
Parse Time 3.45s (± 0.48%) 3.46s (± 0.89%) ~ 3.43s 3.51s p=0.360 n=6
Bind Time 1.92s (± 0.54%) 1.92s (± 1.07%) ~ 1.90s 1.96s p=0.803 n=6
Check Time 19.33s (± 0.54%) 19.41s (± 0.31%) ~ 19.34s 19.47s p=0.173 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 24.70s (± 0.42%) 24.80s (± 0.23%) ~ 24.69s 24.85s p=0.128 n=6
vscode - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 2,994,467 2,994,466 -1 (- 0.00%) ~ ~ p=0.001 n=6
Types 1,031,770 1,031,770 ~ ~ ~ p=1.000 n=6
Memory used 3,119,677k (± 0.00%) 3,119,677k (± 0.00%) ~ 3,119,629k 3,119,774k p=0.936 n=6
Parse Time 13.76s (± 0.22%) 13.74s (± 0.45%) ~ 13.68s 13.86s p=0.228 n=6
Bind Time 4.23s (± 0.40%) 4.23s (± 0.65%) ~ 4.18s 4.25s p=1.000 n=6
Check Time 78.75s (± 0.39%) 78.84s (± 0.48%) ~ 78.40s 79.41s p=0.470 n=6
Emit Time 20.29s (± 0.33%) 20.25s (± 0.82%) ~ 19.97s 20.47s p=0.629 n=6
Total Time 117.04s (± 0.29%) 117.06s (± 0.44%) ~ 116.47s 117.75s p=0.873 n=6
webpack - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 271,703 271,676 -27 (- 0.01%) ~ ~ p=0.001 n=6
Types 110,714 110,711 -3 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 417,693k (± 0.01%) 417,696k (± 0.01%) ~ 417,668k 417,740k p=0.810 n=6
Parse Time 3.88s (± 0.48%) 3.85s (± 1.06%) ~ 3.80s 3.90s p=0.294 n=6
Bind Time 1.69s (± 0.78%) 1.68s (± 0.73%) ~ 1.67s 1.70s p=0.413 n=6
Check Time 16.99s (± 0.34%) 16.99s (± 0.41%) ~ 16.88s 17.06s p=0.809 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 22.56s (± 0.33%) 22.53s (± 0.37%) ~ 22.44s 22.62s p=0.687 n=6
xstate-main - node (v18.15.0, x64)
Errors 0 0 ~ ~ ~ p=1.000 n=6
Symbols 538,614 538,607 -7 (- 0.00%) ~ ~ p=0.001 n=6
Types 176,536 176,534 -2 (- 0.00%) ~ ~ p=0.001 n=6
Memory used 481,415k (± 0.01%) 481,060k (± 0.01%) -355k (- 0.07%) 480,987k 481,121k p=0.005 n=6
Parse Time 3.40s (± 0.68%) 3.41s (± 0.39%) ~ 3.39s 3.43s p=0.462 n=6
Bind Time 1.25s (± 0.78%) 1.26s (± 0.32%) ~ 1.26s 1.27s p=0.056 n=6
Check Time 18.04s (± 0.30%) 18.15s (± 0.22%) +0.12s (+ 0.64%) 18.11s 18.21s p=0.006 n=6
Emit Time 0.00s 0.00s ~ ~ ~ p=1.000 n=6
Total Time 22.69s (± 0.21%) 22.82s (± 0.19%) +0.14s (+ 0.59%) 22.78s 22.88s p=0.005 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/52095/merge:

Everything looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Backlog Bug PRs that fix a backlog bug For Milestone Bug PRs that fix a bug with a specific milestone
Projects
Status: Needs merge
PR Backlog
  
Waiting on reviewers
9 participants