Skip to content

Infer AssertsIdentifier type predicates - #58495

Closed
Dan Vanderkam (danvk) wants to merge 11 commits into
microsoft:mainfrom
danvk:infer-assertions
Closed

Infer AssertsIdentifier type predicates#58495
Dan Vanderkam (danvk) wants to merge 11 commits into
microsoft:mainfrom
danvk:infer-assertions

Conversation

@danvk

@danvkDan Vanderkam (danvk) commented May 10, 2024

Copy link
Copy Markdown
Contributor

This extends the type predicate inference from #57465 to cover "asserts identifier" predicates as well. For example:

// function isNumber(x: unknown): asserts x is numberfunctionisNumber(x: unknown){if(typeofx!=='number'){thrownewError(`expected a number, got ${x}`);}}

or:

// function assertNonNullish<T>(x: T): asserts x is NonNullable<T>functionassertNonNullish<T>(x: T){if(x!=null){return;}thrownewError();}

The constraints for inference are:

  • We're working with a function statement. Not a constructor, getter, setter, method, arrow function, or function expression. (This is significantly more restrictive than for "identifier" predicates, see Error when assertion function calls aren't CFA'd #33622 for why.)
  • The function does not have an explicit return type annotation, but is inferred to return void or undefined.
  • The function takes at least one parameter that it does not mutate.

The criterion winds up being a bit simpler than it was in #57465:

  • Check the type of the parameter at each return site (including an implicit return at the end of the function).
  • Union these types.
  • If this is different than the initial type of the parameter, then we've got an assertion function.

I wound up implementing "different than" with an assignability check since branching constructs can sometimes change the representation of a parameter's type in superficial ways, e.g. unknown can become {} | null | undefined.

There's no equivalent of the "false check" that we needed to infer identifier type predicates. Assertion predicates are inherently one-sided. If they fail, your code will throw. This means that we can infer assertions even when the negative type can't be represented. For example:

// function assertIsShortString(x: unknown): asserts x is stringfunctionassertIsShortString(x: unknown){if(typeofx!=='string'){thrownewError('Expected string');}elseif(x.length>10){thrownewError('Expected short string');}}

This wouldn't work as a type predicate (x is string) because you can't represent "all types except short strings." But it's fine as an imprecise assertion, since there's no way to observe the negative case.

A few other things to note:

  • This allows assertions to flow (Type predicate assertion does not carry over when used in another function #51326). In particular, this lets CFA "see through" a function that calls a type predicate and throws if it fails (e.g. assertFoo calls isFoo).
  • This only infers assertions with a type: asserts x is T, not asserts x. The latter would also be interesting, but that feels like a different problem.
  • This only infers a non-returning code path via its effect on types. This feels a little strange/risky to me since it means this code runs on all sorts of functions that don't throw. But it does work, and this is a natural way to handle all the different patterns (early throw, early return).
  • One of the fourslash tests found a bug with unused parameters getting marked as used. This turns out to be an issue with inferred type predicates as well, see Regression in detecting unused parameters in 5.5.0-beta #58493.

It's possible that the "asserted type" really is the same as the parameter's declared type, but TS isn't able to figure that out. This happened for one of the baselines. In this case we'll infer a useless type predicate (function f(x: T): asserts x is T). This is noisy but won't produce spurious errors. There's one example of this in the baselines.

I didn't observe any slowdowns from this change locally and there's some reason to hope that's the case. For inferred type predicates, the expensive part was the "false" checks (see #57465 (comment)). There's no need to do that for assertion functions, though, so we won't pay that price. On the other hand, there might be more implicitly void-returning functions than implicitly boolean-returning functions, so we'll see!

@typescript-botTypeScript Bot (typescript-bot) added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label May 10, 2024
Comment threadsrc/compiler/checker.ts Outdated
// An assignability check covers this, but a void initType can become an undefined type through control flow analysis.
// Since void is not assignable to undefined, we patch initType to handle this, too.
const assertedType = getUnionType(typesAtReturn, UnionReduction.Subtype);
const patchedInitType = mapType(initType, t => t.flags & TypeFlags.Void ? undefinedType : t);

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

This is because void changes to undefined in this function, and undefined is not assignable to void:

functionbooleanOrVoid(a: boolean|void){if(typeofa==="undefined"){a}a// undefined}

This feels like a hack, though, and I'd love to change it if there's a cleaner fix.

test9?: any;
}): void;
declare function fa1(x: [true, number] | [false, string]): void;
declare function fa1(x: [true, number] | [false, string]): asserts x is [false, string];

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

This one is a little weird (the function never returns), but it follows from the types: TS understands that for(;;) {} is an infinite loop, but not while(!!true) {}.

function keyofNarrowing<S extends { [K in keyof S]: string }>(k: keyof S) {
>keyofNarrowing : <S extends { [K in keyof S]: string; }>(k: keyof S) => void
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^
>keyofNarrowing : <S extends { [K in keyof S]: string; }>(k: keyof S) => asserts k is (keyof S & number) | (keyof S & symbol) | (keyof S & string)

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

This is the one loss: the other changes are all valid predicates.

// asserts k is (keyof S & number) | (keyof S & symbol) | (keyof S & string)functionkeyofNarrowing<Sextends{[KinkeyofS]: string}>(k: keyofS){ ... }

This should not be an assertion function because:

 (keyof S & number) | (keyof S & symbol) | (keyof S & string)
= keyof S & (number | symbol | string)
= keyof S & PropertyKey
= keyof S

TS isn't able to figure that out, however, so we get a meaningless assertion predicate.

used1; used2;

function f() {
function f(a, b) {

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

This diff is clearly wrong and a bug in my PR. There's a similar issue with the existing inferred type predicates change, see #58493. The fix for that should also apply here.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I confirmed that Mateusz Burzyński (@Andarist)'s PR #58514 also fixes this.

@fatcerberus

Copy link
Copy Markdown

If this is different than the initial type of the parameter, then we've got an assertion function.

This feels like it’s going to turn a lot of functions into assertions that were never intended to be, just because a parameter was narrowed somewhere in the function.

@danvk

Copy link
Copy Markdown
ContributorAuthor

If this is different than the initial type of the parameter, then we've got an assertion function.

This feels like it’s going to turn a lot of functions into assertions that were never intended to be, just because a parameter was narrowed somewhere in the function.

It's not enough for the parameter to be narrowed somewhere in the function. The function has to throw in a way that's tied to that narrowing.

We could do an experiment similar to #58173 to see how often this triggers.

@fatcerberus

Copy link
Copy Markdown

Ah, okay - you didn’t mention that in the description in the OP, the algorithm you laid out was just that you check all the return points, not also the throwing points.

@danvk

Copy link
Copy Markdown
ContributorAuthor

Ah, okay - you didn’t mention that in the description in the OP, the algorithm you laid out was just that you check all the return points, not also the throwing points.

The algorithm only looks at parameter types when you return, or (important!) at the implicit return at the end of a function. When you union those types, the only way I can think of that you'd get something distinct from the initial parameter type is by having a code path that throws or does the equivalent (calls another assertion function or never-returning function, or goes into an infinite loop).

Maybe an example would make it clearer how this works:

functionassertABC(x: 'A'|'B'|'C'|'D'|'E'){if(x==='A'){return;// type of x here is 'A'}elseif(x==='B'||x==='C'){thrownewError();}// implicit return; type of x here is 'D' | E'}

Unioning the types of x gives 'A' | 'D' | 'E'. Since 'A' | D' | 'E' is distinct from 'A' | 'B' | 'C' | 'D' | 'E', we have a type assertion function.

If you take a look at the code for the algorithm, it's all about return. The association with throw is implied by the check on the types.

@fatcerberus

Bruce Pascoe (fatcerberus) commented May 10, 2024

Copy link
Copy Markdown

Ah, so it’s based on how TS re-merges control-flow branches by unioning the narrowed types back together, that’s clever. However do note - that can sometimes create an observably different type on the other side (see: subtype reduction, introducing intersections, etc.)

@fatcerberus

Copy link
Copy Markdown

Forgive me if you’ve accounted for all this already - I’m just spouting the caveats that come to mind when I think about this.

@danvk

Copy link
Copy Markdown
ContributorAuthor

Ah, so it’s based on how TS re-merges control-flow branches by unioning the narrowed types back together, that’s clever. However do note - that can sometimes create an observably different type on the other side (see: subtype reduction, introducing intersections, etc.)

I won't infer an assertion predicate so long as the initial parameter type is assignable to the asserted type, so superficial differences shouldn't matter. But there are some cases where TS can't figure out the relationship. There's one example of this in the baselines (see my comments on the code). There will probably be others in the wild.

This change would feel less aggressive if I could detect whether there was a code path that throws in the function, but I couldn't find anything that quite did what I wanted.

@jakebailey

Copy link
Copy Markdown
Member

@typescript-bot

TypeScript Bot (typescript-bot) commented May 10, 2024

Copy link
Copy Markdown
Contributor

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

CommandStatusResults
test top400✅ Started👀 Results
user test this✅ Started✅ Results
run dt✅ Started✅ Results
perf test this faster✅ Started👀 Results
pack this✅ Started✅ Results

@typescript-bot

TypeScript Bot (typescript-bot) commented May 10, 2024

Copy link
Copy Markdown
Contributor

Hey Jake Bailey (@jakebailey), 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/161690/artifacts?artifactName=tgz&fileId=0BFA3D3A0A0BB0B903EE356283DCF9D638B724930087ECCE5D71B4C18A4DA8BB02&fileName=/typescript-5.5.0-insiders.20240510.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.5.0-pr-58495-9".;

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey Jake Bailey (@jakebailey), the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the user tests comparing main and refs/pull/58495/merge:

Everything looks good!

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey)
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-Unions - node (v18.15.0, x64)
Errors3030~~~p=1.000 n=6
Symbols62,15462,154~~~p=1.000 n=6
Types50,24850,255+7 (+ 0.01%)~~p=0.001 n=6
Memory used192,824k (± 0.77%)193,524k (± 0.95%)+700k (+ 0.36%)192,296k195,932kp=0.031 n=6
Parse Time1.55s (± 1.08%)1.54s (± 1.95%)~1.51s1.58sp=0.681 n=6
Bind Time0.86s (± 1.40%)0.86s (± 0.47%)~0.86s0.87sp=0.863 n=6
Check Time11.29s (± 0.59%)11.32s (± 0.63%)~11.23s11.40sp=0.748 n=6
Emit Time3.15s (± 0.33%)3.14s (± 0.82%)~3.11s3.19sp=0.112 n=6
Total Time16.86s (± 0.49%)16.86s (± 0.43%)~16.74s16.93sp=0.872 n=6
angular-1 - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols944,110944,107-3 (- 0.00%)~~p=0.001 n=6
Types407,140407,147+7 (+ 0.00%)~~p=0.001 n=6
Memory used1,222,027k (± 0.00%)1,222,174k (± 0.00%)+147k (+ 0.01%)1,222,093k1,222,232kp=0.008 n=6
Parse Time8.07s (± 0.31%)8.12s (± 0.64%)+0.05s (+ 0.66%)8.05s8.20sp=0.043 n=6
Bind Time2.25s (± 0.67%)2.25s (± 0.73%)~2.22s2.26sp=1.000 n=6
Check Time36.49s (± 0.33%)36.59s (± 0.44%)~36.34s36.81sp=0.229 n=6
Emit Time17.53s (± 0.66%)17.57s (± 0.40%)~17.49s17.69sp=0.423 n=6
Total Time64.33s (± 0.30%)64.53s (± 0.24%)~64.28s64.70sp=0.109 n=6
mui-docs - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols1,961,2831,961,283~~~p=1.000 n=6
Types696,900696,939+39 (+ 0.01%)~~p=0.001 n=6
Memory used1,777,974k (± 0.00%)1,778,082k (± 0.00%)+108k (+ 0.01%)1,778,048k1,778,110kp=0.005 n=6
Parse Time9.86s (± 0.38%)9.86s (± 0.31%)~9.81s9.90sp=0.686 n=6
Bind Time3.36s (± 0.71%)3.37s (± 0.82%)~3.32s3.40sp=0.370 n=6
Check Time82.68s (± 0.18%)82.72s (± 0.23%)~82.45s83.02sp=1.000 n=6
Emit Time0.21s (± 3.95%)0.20s (± 2.54%)~0.20s0.21sp=0.523 n=6
Total Time96.12s (± 0.12%)96.15s (± 0.22%)~95.89s96.49sp=1.000 n=6
self-build-src - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,220,4001,220,443+43 (+ 0.00%)~~p=0.001 n=6
Types258,967258,989+22 (+ 0.01%)~~p=0.001 n=6
Memory used2,335,959k (± 0.03%)2,336,372k (± 0.04%)~2,335,223k2,337,305kp=0.471 n=6
Parse Time4.97s (± 1.31%)4.95s (± 0.83%)~4.91s5.00sp=0.378 n=6
Bind Time1.88s (± 0.73%)1.88s (± 0.93%)~1.85s1.90sp=1.000 n=6
Check Time33.77s (± 0.36%)33.79s (± 0.32%)~33.62s33.91sp=0.936 n=6
Emit Time2.65s (± 2.29%)2.63s (± 2.95%)~2.51s2.74sp=0.521 n=6
Total Time43.30s (± 0.24%)43.25s (± 0.29%)~43.02s43.37sp=0.575 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,220,4001,220,443+43 (+ 0.00%)~~p=0.001 n=6
Types258,967258,989+22 (+ 0.01%)~~p=0.001 n=6
Memory used2,411,497k (± 0.01%)2,411,343k (± 0.02%)~2,410,547k2,412,209kp=0.575 n=6
Parse Time6.31s (± 0.60%)6.30s (± 0.90%)~6.22s6.38sp=0.810 n=6
Bind Time2.05s (± 0.95%)2.04s (± 1.13%)~2.02s2.07sp=0.808 n=6
Check Time40.18s (± 0.36%)40.26s (± 0.30%)~40.09s40.45sp=0.298 n=6
Emit Time3.20s (± 2.60%)3.19s (± 1.84%)~3.08s3.25sp=0.470 n=6
Total Time51.75s (± 0.42%)51.79s (± 0.29%)~51.61s52.01sp=0.689 n=6
self-compiler - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols256,559256,601+42 (+ 0.02%)~~p=0.001 n=6
Types104,270104,285+15 (+ 0.01%)~~p=0.001 n=6
Memory used425,708k (± 0.03%)425,822k (± 0.01%)~425,752k425,882kp=0.066 n=6
Parse Time3.38s (± 0.63%)3.37s (± 0.49%)~3.34s3.38sp=0.331 n=6
Bind Time1.31s (± 0.89%)1.31s (± 0.57%)~1.30s1.32sp=0.796 n=6
Check Time17.93s (± 0.34%)17.97s (± 0.38%)~17.87s18.03sp=0.335 n=6
Emit Time1.37s (± 2.14%)1.37s~~~p=0.655 n=6
Total Time23.99s (± 0.22%)24.02s (± 0.29%)~23.92s24.08sp=0.688 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors3535~~~p=1.000 n=6
Symbols224,575224,583+8 (+ 0.00%)~~p=0.001 n=6
Types93,78593,792+7 (+ 0.01%)~~p=0.001 n=6
Memory used369,898k (± 0.03%)369,935k (± 0.03%)~369,870k370,123kp=0.688 n=6
Parse Time3.48s (± 0.47%)3.51s (± 0.67%)~3.48s3.53sp=0.122 n=6
Bind Time1.93s (± 0.53%)1.93s (± 0.76%)~1.92s1.96sp=0.605 n=6
Check Time19.36s (± 0.40%)19.36s (± 0.42%)~19.26s19.49sp=0.872 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time24.77s (± 0.35%)24.80s (± 0.34%)~24.69s24.94sp=0.748 n=6
vscode - node (v18.15.0, x64)
Errors02🔻+2 (+ ∞%)~~p=0.001 n=6
Symbols2,820,4912,820,496+5 (+ 0.00%)~~p=0.001 n=6
Types956,787956,831+44 (+ 0.00%)~~p=0.001 n=6
Memory used2,992,366k (± 0.00%)2,992,554k (± 0.00%)+188k (+ 0.01%)2,992,461k2,992,599kp=0.005 n=6
Parse Time13.84s (± 0.33%)13.83s (± 0.36%)~13.75s13.88sp=0.936 n=6
Bind Time4.16s (± 2.07%)4.30s (± 2.20%)~4.11s4.37sp=0.063 n=6
Check Time73.32s (± 0.29%)73.45s (± 0.63%)~72.95s74.28sp=0.689 n=6
Emit Time23.64s (± 0.62%)23.40s (± 0.60%)-0.24s (- 1.00%)23.25s23.66sp=0.020 n=6
Total Time114.95s (± 0.22%)114.98s (± 0.52%)~114.36s116.12sp=0.689 n=6
webpack - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols265,866265,866~~~p=1.000 n=6
Types108,401108,402+1 (+ 0.00%)~~p=0.001 n=6
Memory used410,604k (± 0.01%)410,596k (± 0.01%)~410,547k410,639kp=1.000 n=6
Parse Time4.77s (± 1.10%)4.75s (± 0.54%)~4.71s4.79sp=0.169 n=6
Bind Time2.08s (± 0.88%)2.07s (± 1.22%)~2.03s2.10sp=0.622 n=6
Check Time21.00s (± 0.26%)21.07s (± 0.28%)~20.99s21.16sp=0.093 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time27.85s (± 0.30%)27.88s (± 0.31%)~27.79s28.03sp=0.689 n=6
xstate-main - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols524,576524,576~~~p=1.000 n=6
Types178,847178,851+4 (+ 0.00%)~~p=0.001 n=6
Memory used462,623k (± 0.03%)462,577k (± 0.00%)~462,533k462,600kp=1.000 n=6
Parse Time3.12s (± 1.24%)3.11s (± 0.86%)~3.08s3.16sp=0.570 n=6
Bind Time1.17s (± 0.76%)1.17s (± 0.76%)~1.16s1.18sp=1.000 n=6
Check Time18.21s (± 0.64%)18.21s (± 0.57%)~18.08s18.33sp=0.936 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time22.49s (± 0.49%)22.50s (± 0.42%)~22.37s22.62sp=0.873 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)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@danvk

Copy link
Copy Markdown
ContributorAuthor

Perf impact looks pretty minimal… but what are those two new errors in VS Code?

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the top 400 repos comparing main and refs/pull/58495/merge:

Something interesting changed - please have a look.

Details

darkreader/darkreader

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

tests/inject/tsconfig.json

src/tsconfig.json

src/api/tsconfig.json

invoke-ai/InvokeAI

invokeai/frontend/web/tsconfig.json

microsoft/vscode

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

src/tsconfig.tsec.json

src/tsconfig.json

@fatcerberus

Copy link
Copy Markdown

Assertions require every name in the call target to be declared with an explicit type annotation.

Ouch. I forgot that was something the compiler checked for. The existence of that error means you have to be very careful about exactly what you infer as an assertion…

@danvk

Copy link
Copy Markdown
ContributorAuthor

Summary of breaks (#58495 (comment)):

  • darkreader: we inferred that an arrow function was a type assertion predicate, which doesn't generally work.
  • InvokeAI: same; validateBaseCompatibility is an arrow function. This PR correctly infers that it returns a type assertion predicate, but this results in TS2775. If it were a function statement, the inferred type assertion predicate works fine.
  • vscode: In this case, we infer a type assertion predicate for a method. Again, this doesn't always work and can produce TS2776. But that's not what happens here. The ExtHostTreeView.validateTreeItem method becomes a type assertion predicate. This, in turn, exposes what I believe had been a latent TS bug: Narrowing by type predicate fails to produce intersection type with weak type #58518

The fix for all of these is to not infer type assertion predicates for methods or arrow functions because this can produce a confusing error at the call site. See #33622 for why. This definitely limits the scope of this PR: the latest version only runs on plain old function statements.

I think the nicest win from this PR is that it lets type predicates naturally flow through assertion wrappers:

declarefunctionisFoo(x: any): x is Foo;// function inferFromType(x: unknown): asserts x is FoofunctioninferFromType(x: unknown){if(!isFoo(x)){thrownewError();}}

@Andarist

Copy link
Copy Markdown
Contributor

I think the nicest win from this PR is that it lets type predicates naturally flow through assertion wrappers:

This is dope 🚀

@jakebailey

Copy link
Copy Markdown
Member

TypeScript Bot (@typescript-bot) test it
TypeScript Bot (@typescript-bot) pack this

@typescript-bot

TypeScript Bot (typescript-bot) commented May 13, 2024

Copy link
Copy Markdown
Contributor

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

CommandStatusResults
test top400✅ Started✅ Results
user test this✅ Started👀 Results
run dt✅ Started✅ Results
perf test this faster✅ Started👀 Results
pack this✅ Started✅ Results

@typescript-bot

TypeScript Bot (typescript-bot) commented May 13, 2024

Copy link
Copy Markdown
Contributor

Hey Jake Bailey (@jakebailey), 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/161715/artifacts?artifactName=tgz&fileId=33CA50AFB7B259ACD3FE936AA8261E8754CA2DEC5411359B7E3C7C6088AA876F02&fileName=/typescript-5.5.0-insiders.20240513.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.5.0-pr-58495-20".;

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey Jake Bailey (@jakebailey), the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the user tests comparing main and refs/pull/58495/merge:

Something interesting changed - please have a look.

Details

minimatch

/mnt/ts_downloads/_/m/minimatch/tsconfig.json

  • [NEW] error TS2775: Assertions require every name in the call target to be declared with an explicit type annotation.
    • /mnt/ts_downloads/_/m/minimatch/node_modules/minimatch/minimatch.js(116,3)
    • /mnt/ts_downloads/_/m/minimatch/node_modules/minimatch/minimatch.js(133,3)
    • /mnt/ts_downloads/_/m/minimatch/node_modules/minimatch/minimatch.js(260,3)
    • /mnt/ts_downloads/_/m/minimatch/node_modules/minimatch/minimatch.js(297,3)

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey)
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-Unions - node (v18.15.0, x64)
Errors3030~~~p=1.000 n=6
Symbols62,15462,154~~~p=1.000 n=6
Types50,24850,252+4 (+ 0.01%)~~p=0.001 n=6
Memory used193,496k (± 0.95%)195,371k (± 0.77%)+1,874k (+ 0.97%)192,313k196,084kp=0.020 n=6
Parse Time1.55s (± 1.95%)1.55s (± 1.49%)~1.51s1.58sp=1.000 n=6
Bind Time0.86s (± 0.94%)0.86s (± 0.47%)~0.86s0.87sp=0.584 n=6
Check Time11.28s (± 0.34%)11.32s (± 0.32%)~11.30s11.39sp=0.081 n=6
Emit Time3.14s (± 0.55%)3.13s (± 0.87%)~3.09s3.16sp=1.000 n=6
Total Time16.83s (± 0.36%)16.86s (± 0.26%)~16.82s16.94sp=0.295 n=6
angular-1 - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols944,110944,111+1 (+ 0.00%)~~p=0.001 n=6
Types407,140407,144+4 (+ 0.00%)~~p=0.001 n=6
Memory used1,222,086k (± 0.00%)1,222,194k (± 0.00%)+108k (+ 0.01%)1,222,138k1,222,260kp=0.020 n=6
Parse Time6.78s (± 0.63%)6.77s (± 0.28%)~6.75s6.80sp=0.810 n=6
Bind Time1.88s (± 0.64%)1.89s (± 0.40%)~1.88s1.90sp=0.111 n=6
Check Time31.25s (± 0.53%)31.34s (± 0.43%)~31.13s31.53sp=0.298 n=6
Emit Time14.72s (± 0.54%)14.77s (± 0.77%)~14.64s14.93sp=0.574 n=6
Total Time54.62s (± 0.26%)54.77s (± 0.39%)~54.55s55.03sp=0.128 n=6
mui-docs - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols1,961,3491,961,349~~~p=1.000 n=6
Types696,910696,910~~~p=1.000 n=6
Memory used1,778,101k (± 0.00%)1,778,109k (± 0.00%)~1,778,068k1,778,142kp=0.521 n=6
Parse Time6.78s (± 0.31%)6.79s (± 0.59%)~6.77s6.87sp=0.655 n=6
Bind Time2.31s (± 0.33%)2.31s (± 0.60%)~2.29s2.32sp=0.453 n=6
Check Time57.05s (± 0.49%)56.97s (± 0.64%)~56.51s57.51sp=0.689 n=6
Emit Time0.14s0.14s~~~p=1.000 n=6
Total Time66.29s (± 0.43%)66.20s (± 0.52%)~65.73s66.73sp=0.575 n=6
self-build-src - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,221,1201,221,163+43 (+ 0.00%)~~p=0.001 n=6
Types259,211259,228+17 (+ 0.01%)~~p=0.001 n=6
Memory used2,337,130k (± 0.02%)2,337,212k (± 0.03%)~2,336,192k2,338,326kp=1.000 n=6
Parse Time4.98s (± 1.51%)4.99s (± 0.83%)~4.93s5.03sp=1.000 n=6
Bind Time1.87s (± 0.76%)1.88s (± 0.78%)~1.86s1.90sp=0.222 n=6
Check Time33.72s (± 0.33%)33.81s (± 0.39%)~33.64s33.96sp=0.378 n=6
Emit Time2.67s (± 1.96%)2.62s (± 2.44%)~2.55s2.71sp=0.172 n=6
Total Time43.26s (± 0.29%)43.33s (± 0.23%)~43.23s43.48sp=0.378 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,221,1201,221,163+43 (+ 0.00%)~~p=0.001 n=6
Types259,211259,228+17 (+ 0.01%)~~p=0.001 n=6
Memory used2,411,894k (± 0.02%)2,412,608k (± 0.04%)~2,411,592k2,413,650kp=0.173 n=6
Parse Time5.22s (± 0.95%)5.23s (± 1.18%)~5.16s5.34sp=0.873 n=6
Bind Time1.69s (± 0.24%)1.69s (± 0.30%)~1.69s1.70sp=0.114 n=6
Check Time34.31s (± 0.32%)34.26s (± 0.38%)~34.08s34.45sp=0.378 n=6
Emit Time2.69s (± 0.47%)2.64s (± 3.18%)~2.55s2.75sp=0.378 n=6
Total Time43.93s (± 0.30%)43.84s (± 0.45%)~43.53s44.02sp=0.521 n=6
self-compiler - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols256,716256,758+42 (+ 0.02%)~~p=0.001 n=6
Types104,288104,302+14 (+ 0.01%)~~p=0.001 n=6
Memory used425,755k (± 0.02%)425,930k (± 0.01%)+175k (+ 0.04%)425,883k425,967kp=0.005 n=6
Parse Time3.37s (± 0.41%)3.38s (± 0.64%)~3.35s3.41sp=0.462 n=6
Bind Time1.32s (± 0.68%)1.32s (± 0.89%)~1.31s1.34sp=0.672 n=6
Check Time17.89s (± 0.42%)17.93s (± 0.29%)~17.86s17.99sp=0.297 n=6
Emit Time1.35s (± 0.94%)1.37s (± 1.07%)+0.02s (+ 1.60%)1.36s1.40sp=0.032 n=6
Total Time23.93s (± 0.29%)24.00s (± 0.21%)+0.07s (+ 0.31%)23.94s24.07sp=0.044 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors3535~~~p=1.000 n=6
Symbols224,575224,583+8 (+ 0.00%)~~p=0.001 n=6
Types93,78593,791+6 (+ 0.01%)~~p=0.001 n=6
Memory used369,965k (± 0.04%)369,917k (± 0.02%)~369,837k370,027kp=1.000 n=6
Parse Time2.82s (± 0.92%)2.83s (± 0.73%)~2.81s2.86sp=0.685 n=6
Bind Time1.58s (± 0.84%)1.59s (± 1.04%)~1.57s1.61sp=0.738 n=6
Check Time15.68s (± 0.48%)15.69s (± 0.22%)~15.63s15.72sp=0.809 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time20.09s (± 0.42%)20.11s (± 0.28%)~20.03s20.19sp=0.574 n=6
vscode - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols2,821,5172,821,518+1 (+ 0.00%)~~p=0.001 n=6
Types957,198957,198~~~p=1.000 n=6
Memory used2,993,753k (± 0.00%)2,993,703k (± 0.00%)~2,993,596k2,993,776kp=0.230 n=6
Parse Time13.80s (± 0.26%)13.82s (± 0.11%)~13.80s13.84sp=0.167 n=6
Bind Time4.14s (± 0.52%)4.14s (± 0.36%)~4.13s4.17sp=0.742 n=6
Check Time73.44s (± 0.34%)73.18s (± 0.19%)~73.02s73.37sp=0.066 n=6
Emit Time23.48s (± 0.35%)23.51s (± 0.67%)~23.32s23.73sp=0.873 n=6
Total Time114.86s (± 0.23%)114.65s (± 0.15%)~114.44s114.94sp=0.199 n=6
webpack - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols265,866265,866~~~p=1.000 n=6
Types108,401108,401~~~p=1.000 n=6
Memory used410,651k (± 0.03%)410,560k (± 0.02%)~410,508k410,651kp=0.128 n=6
Parse Time4.76s (± 0.84%)4.77s (± 1.23%)~4.68s4.85sp=0.936 n=6
Bind Time2.07s (± 0.66%)2.05s (± 0.95%)-0.02s (- 1.21%)2.02s2.07sp=0.033 n=6
Check Time20.98s (± 0.36%)20.96s (± 0.27%)~20.89s21.04sp=0.378 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time27.82s (± 0.38%)27.77s (± 0.30%)~27.68s27.87sp=0.295 n=6
xstate-main - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols524,639524,639~~~p=1.000 n=6
Types178,906178,906~~~p=1.000 n=6
Memory used462,735k (± 0.01%)462,750k (± 0.01%)~462,650k462,811kp=0.572 n=6
Parse Time3.12s (± 0.81%)3.12s (± 0.55%)~3.09s3.14sp=0.807 n=6
Bind Time1.16s (± 0.35%)1.16s (± 1.18%)~1.15s1.18sp=0.796 n=6
Check Time18.34s (± 0.58%)18.35s (± 0.54%)~18.16s18.44sp=1.000 n=6
Emit Time0.00s0.00s (±244.70%)~0.00s0.01sp=0.405 n=6
Total Time22.63s (± 0.52%)22.63s (± 0.44%)~22.46s22.73sp=1.000 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)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the top 400 repos comparing main and refs/pull/58495/merge:

Everything looks good!

@danvk

Copy link
Copy Markdown
ContributorAuthor

At first I thought the minimatch break had something with old-fashioned JS constructor function statements that were inferred to be type predicates. But it turned out to be more straightforward. The relevant code is here and all the failures are calls to this function:

varMAX_PATTERN_LENGTH=1024*64varassertValidPattern=function(pattern){if(typeofpattern!=='string'){thrownewTypeError('invalid pattern')}if(pattern.length>MAX_PATTERN_LENGTH){thrownewTypeError('pattern is too long')}}

So I also need to exclude function expressions from inference, not just arrow functions.

@danvk
Dan Vanderkam (danvk) marked this pull request as ready for review May 15, 2024 13:38
@typescript-bot

Copy link
Copy Markdown
Contributor

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

@fatcerberus

Copy link
Copy Markdown

Ironically, inferring assertValidPattern as an assertion predicate is actually correct! But unfortunately it hits the limitation that requires them to be explicitly annotated...

@danvk

Copy link
Copy Markdown
ContributorAuthor

Ironically, inferring assertValidPattern as an assertion predicate is actually correct! But unfortunately it hits the limitation that requires them to be explicitly annotated...

Right. So far as I'm aware, the algorithm is correct: it will never infer a type assertion predicate that's inaccurate. But there are many situations (methods, arrow functions, function expressions) where it will push you right into TS2775 / TS2776.

@jakebailey

Copy link
Copy Markdown
Member

@typescript-bot

TypeScript Bot (typescript-bot) commented May 15, 2024

Copy link
Copy Markdown
Contributor

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

CommandStatusResults
test top400✅ Started✅ Results
user test this✅ Started✅ Results
run dt✅ Started✅ Results
perf test this faster✅ Started👀 Results
pack this✅ Started✅ Results

@typescript-bot

TypeScript Bot (typescript-bot) commented May 15, 2024

Copy link
Copy Markdown
Contributor

Hey Jake Bailey (@jakebailey), 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/161774/artifacts?artifactName=tgz&fileId=93993D75141F9F8A88E91035A3BFD6BBFA39DEB63210D37972D1CB42488948E902&fileName=/typescript-5.5.0-insiders.20240515.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.5.0-pr-58495-31".;

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the user tests comparing main and refs/pull/58495/merge:

Everything looks good!

@typescript-bot

Copy link
Copy Markdown
Contributor

Hey Jake Bailey (@jakebailey), the results of running the DT tests are ready.

Everything looks the same!

You can check the log here.

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey)
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
MetricbaselineprDeltaBestWorstp-value
Compiler-Unions - node (v18.15.0, x64)
Errors3030~~~p=1.000 n=6
Symbols62,15462,154~~~p=1.000 n=6
Types50,24850,252+4 (+ 0.01%)~~p=0.001 n=6
Memory used194,089k (± 1.00%)192,991k (± 0.76%)~192,282k195,989kp=0.936 n=6
Parse Time1.30s (± 0.93%)1.30s (± 0.31%)~1.30s1.31sp=0.863 n=6
Bind Time0.72s0.72s~~~p=1.000 n=6
Check Time9.53s (± 0.47%)9.59s (± 0.18%)~9.57s9.61sp=0.053 n=6
Emit Time2.64s (± 0.62%)2.62s (± 0.95%)~2.59s2.65sp=0.462 n=6
Total Time14.19s (± 0.41%)14.23s (± 0.29%)~14.18s14.27sp=0.332 n=6
angular-1 - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols944,110944,111+1 (+ 0.00%)~~p=0.001 n=6
Types407,140407,144+4 (+ 0.00%)~~p=0.001 n=6
Memory used1,222,144k (± 0.00%)1,222,202k (± 0.01%)~1,222,065k1,222,277kp=0.149 n=6
Parse Time6.80s (± 0.54%)6.79s (± 0.57%)~6.76s6.86sp=0.746 n=6
Bind Time1.88s (± 0.27%)1.88s (± 0.52%)~1.87s1.89sp=0.348 n=6
Check Time31.36s (± 0.50%)31.28s (± 0.36%)~31.17s31.48sp=0.470 n=6
Emit Time14.80s (± 0.37%)14.78s (± 0.33%)~14.72s14.85sp=0.630 n=6
Total Time54.84s (± 0.34%)54.72s (± 0.25%)~54.56s54.87sp=0.173 n=6
mui-docs - node (v18.15.0, x64)
Errors55~~~p=1.000 n=6
Symbols1,964,1761,964,176~~~p=1.000 n=6
Types819,283819,283~~~p=1.000 n=6
Memory used1,849,631k (± 0.00%)1,849,667k (± 0.00%)~1,849,599k1,849,710kp=0.128 n=6
Parse Time6.78s (± 0.27%)6.77s (± 0.45%)~6.74s6.83sp=0.677 n=6
Bind Time2.30s (± 0.84%)2.28s (± 0.46%)~2.27s2.30sp=0.218 n=6
Check Time58.72s (± 0.36%)58.76s (± 0.16%)~58.64s58.91sp=0.689 n=6
Emit Time0.14s (± 2.88%)0.14s (± 5.69%)~0.14s0.16sp=1.000 n=6
Total Time67.93s (± 0.31%)67.96s (± 0.12%)~67.85s68.09sp=0.936 n=6
self-build-src - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,221,2211,221,264+43 (+ 0.00%)~~p=0.001 n=6
Types259,523259,540+17 (+ 0.01%)~~p=0.001 n=6
Memory used2,362,550k (± 2.61%)2,362,575k (± 2.60%)~2,336,165k2,488,304kp=0.936 n=6
Parse Time5.02s (± 0.73%)4.97s (± 1.22%)~4.91s5.04sp=0.336 n=6
Bind Time1.87s (± 0.48%)1.90s (± 0.97%)+0.03s (+ 1.52%)1.88s1.93sp=0.007 n=6
Check Time33.82s (± 0.62%)33.94s (± 0.29%)~33.80s34.04sp=0.336 n=6
Emit Time2.64s (± 3.02%)2.65s (± 3.84%)~2.58s2.84sp=0.936 n=6
Total Time43.37s (± 0.69%)43.48s (± 0.26%)~43.31s43.61sp=0.297 n=6
self-build-src-public-api - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols1,221,2211,221,264+43 (+ 0.00%)~~p=0.001 n=6
Types259,523259,540+17 (+ 0.01%)~~p=0.001 n=6
Memory used2,414,011k (± 0.03%)2,413,361k (± 0.02%)~2,412,776k2,413,868kp=0.128 n=6
Parse Time6.26s (± 0.82%)6.28s (± 1.55%)~6.15s6.42sp=0.936 n=6
Bind Time2.04s (± 1.30%)2.04s (± 0.62%)~2.02s2.05sp=1.000 n=6
Check Time40.27s (± 0.21%)40.31s (± 0.15%)~40.20s40.37sp=0.518 n=6
Emit Time3.11s (± 2.72%)3.16s (± 3.29%)~3.04s3.27sp=0.423 n=6
Total Time51.71s (± 0.23%)51.80s (± 0.32%)~51.54s51.96sp=0.378 n=6
self-compiler - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols256,767256,809+42 (+ 0.02%)~~p=0.001 n=6
Types104,587104,601+14 (+ 0.01%)~~p=0.001 n=6
Memory used426,112k (± 0.01%)426,185k (± 0.01%)+73k (+ 0.02%)426,109k426,238kp=0.045 n=6
Parse Time3.36s (± 0.62%)3.35s (± 0.48%)~3.33s3.37sp=0.465 n=6
Bind Time1.31s (± 0.62%)1.32s (± 0.62%)~1.31s1.33sp=0.666 n=6
Check Time17.84s (± 0.31%)17.89s (± 0.34%)~17.82s17.98sp=0.147 n=6
Emit Time1.38s (± 1.61%)1.36s (± 1.57%)~1.33s1.38sp=0.072 n=6
Total Time23.89s (± 0.19%)23.91s (± 0.29%)~23.81s23.99sp=0.687 n=6
ts-pre-modules - node (v18.15.0, x64)
Errors3535~~~p=1.000 n=6
Symbols224,575224,583+8 (+ 0.00%)~~p=0.001 n=6
Types93,78593,791+6 (+ 0.01%)~~p=0.001 n=6
Memory used369,897k (± 0.03%)369,921k (± 0.02%)~369,780k370,041kp=1.000 n=6
Parse Time3.52s (± 0.66%)3.50s (± 1.12%)~3.44s3.56sp=0.376 n=6
Bind Time1.93s (± 0.89%)1.95s (± 1.10%)~1.93s1.98sp=0.163 n=6
Check Time19.40s (± 0.29%)19.36s (± 0.41%)~19.25s19.47sp=0.688 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time24.85s (± 0.26%)24.81s (± 0.39%)~24.66s24.92sp=0.518 n=6
vscode - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols2,823,9412,823,942+1 (+ 0.00%)~~p=0.001 n=6
Types957,912957,912~~~p=1.000 n=6
Memory used2,996,285k (± 0.00%)2,996,309k (± 0.00%)~2,996,200k2,996,378kp=0.298 n=6
Parse Time17.02s (± 0.39%)16.98s (± 0.22%)~16.93s17.04sp=0.223 n=6
Bind Time5.04s (± 0.29%)5.04s (± 0.27%)~5.02s5.05sp=0.933 n=6
Check Time89.44s (± 0.22%)89.28s (± 0.35%)~88.92s89.84sp=0.229 n=6
Emit Time28.83s (± 0.59%)28.77s (± 0.40%)~28.59s28.88sp=0.810 n=6
Total Time140.33s (± 0.25%)140.06s (± 0.22%)~139.76s140.66sp=0.128 n=6
webpack - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols265,866265,866~~~p=1.000 n=6
Types108,401108,401~~~p=1.000 n=6
Memory used410,516k (± 0.01%)410,529k (± 0.02%)~410,484k410,672kp=0.810 n=6
Parse Time3.84s (± 1.36%)3.82s (± 0.85%)~3.79s3.87sp=0.870 n=6
Bind Time1.67s (± 0.83%)1.66s (± 0.31%)~1.66s1.67sp=0.928 n=6
Check Time16.93s (± 0.20%)16.95s (± 0.29%)~16.90s17.01sp=0.572 n=6
Emit Time0.00s0.00s~~~p=1.000 n=6
Total Time22.44s (± 0.35%)22.44s (± 0.30%)~22.34s22.54sp=0.936 n=6
xstate-main - node (v18.15.0, x64)
Errors00~~~p=1.000 n=6
Symbols524,639524,639~~~p=1.000 n=6
Types178,906178,906~~~p=1.000 n=6
Memory used462,680k (± 0.03%)462,702k (± 0.01%)~462,612k462,808kp=0.423 n=6
Parse Time3.12s (± 0.24%)3.11s (± 0.55%)~3.08s3.13sp=0.280 n=6
Bind Time1.17s (± 0.76%)1.16s (± 0.54%)~1.15s1.17sp=0.070 n=6
Check Time18.21s (± 0.85%)18.33s (± 0.21%)~18.29s18.40sp=0.296 n=6
Emit Time0.00s (±154.76%)0.00s~~~p=0.174 n=6
Total Time22.50s (± 0.68%)22.60s (± 0.21%)~22.54s22.67sp=0.419 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)
BenchmarkNameIterations
Currentpr6
Baselinebaseline6

Developer Information:

Download Benchmarks

@typescript-bot

Copy link
Copy Markdown
Contributor

Jake Bailey (@jakebailey) Here are the results of running the top 400 repos comparing main and refs/pull/58495/merge:

Everything looks good!

@dgreensp

Copy link
Copy Markdown

This is incredible work! Hope to see it land :)

Am I correct that this allows a function to assert things about multiple parameters?

@andriyor

Copy link
Copy Markdown

Is there any chance it will be merged?

@typescript-bot

Copy link
Copy Markdown
Contributor

With 6.0 out as the final release vehicle for this codebase, we're closing all PRs that don't fit the merge criteria for post-6.0 patches. If you think this was a mistake and this PR fits the post-6.0 patch criteria, please post to the 6.0 iteration issue with details (specifically, which PR and which patch criteria it satisfies).

Next steps for PRs:

  • For crash bugfixes or language service improvements, PRs are currently accepted at the typescript-go repo
  • Changes to type system behavior should wait until after 7.0, at which point mainline TypeScript development will resume in this repository with the Go codebase
  • Library file updates (lib.d.ts etc) continue to live in this repo or the DOM Generator repo as appropriate

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

Labels

For Uncommitted BugPR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@danvk@fatcerberus@jakebailey@typescript-bot@Andarist@dgreensp@andriyor@RyanCavanaugh