Skip to content

[experiment] edge-local relation depth cutoffs - #65704

Closed
Jake Bailey (jakebailey) wants to merge 79 commits into
microsoft:mainfrom
jakebailey:experiment-edge-cutoff
Closed

Jake Bailey (jakebailey) wants to merge 79 commits into
microsoft:mainfrom
jakebailey:experiment-edge-cutoff

Conversation

@jakebailey

Copy link
Copy Markdown
Member

for testing

These tests are added before the changes they cover, so that each
change shows in their baselines.
isDeeplyNestedType counts only occurrences of a recursion identity newer
than the previous one, using type ids for "newer", so whether a
comparison gave up as deeply nested depended on which code had been
checked before. It now compares generations: a type's generation is one
more than the highest generation of the types it was built from.

An occurrence of a higher generation was built by the recursion and
counts. One of a lower generation is a nested type argument or member,
and counts only if it is a conditional type, an indexed access, or
another type that evaluating a step can make with fewer layers, and
the previous occurrence was not built from it. A copy of the previous
union or intersection with the same constituents, such as one that lost
its alias, is the same level of nesting (seen in BlockNote and
type-fest), unless both have aliases, whose type arguments can keep
growing while the constituents stay the same (seen in tambo).

Comparing the RpcStub types of capnweb, which form a variance
circularity, recurses through deeply nested instantiations, and reached
the instantiation limit before this (seen in cloudflare-os).

Fixes 17873
Fixes 34099
Fixes 60453
Fixes 64757
CompareTypes orders the constituents of unions, and so printed types,
union deduplication, and everything derived from them. Many types it
cannot tell apart fell through to the type id, which follows creation
order, so these results depended on which code had been checked before.
Most such ties were copies: checking the same expression again
(inference passes, overload resolution, contextual re-checks) created a
new type with identical content every time.

Types that are the same by content are now interned, so the same
inputs yield the same type whenever and however often they are
computed:

- object literal types;
- spread results and the property symbols they synthesize;
- widened, regular, and padded copies of object literals;
- object rest types;
- types implied by binding patterns;
- intersections with the same constituents, flags, and alias.

Interned object types are keyed by their members in table order, so
spreads such as { ...a, ...b } and { ...b, ...a } stay distinct and
each keeps its own property order.

Types that remain distinct are ordered by how they were derived:

- type parameters sharing a symbol (tuple elements, clones made for
  signature and mapped type instantiation, distributive and
  restrictive copies) by the kind of copy, then by their origin and
  the instantiation they were made for;
- fresh and regular literal types, array literal types after the
  references they were cloned from, and object literal copies by the
  flags they were created with;
- object literal, rest, and binding pattern types by the declarations
  and names of their members;
- tuple targets by their label declarations;
- indexed access types by their access flags.

The pseudo-type printer reused the declared type of an inferred
property assignment when the expression's widened type matched, but
that type is widened without the context of its object literal and
can differ from the real one. It is now reused only when equivalent.

Interning lets a comparison reuse a cached relation result that would
otherwise have been computed again for a fresh copy of a type. A result
computed while the return type of a signature still being resolved
reads as any holds only until that return type is known, so it is no
longer cached. Otherwise, relating the arguments of a call whose return
type is being inferred from them caches a success, and the call no
longer reports that no overload matches (seen in lexical).
compareNodes ordered nodes of a file by position only, so distinct
nodes starting together, such as a source file and its first statement
or adjacent missing nodes, compared as equal, and sorting them kept
whichever order they were found in. They are now ordered as they
appear in the tree, so that a node compares equal only to itself.
Symbols the checker derives from a declared one, such as the members of
mapped types or readonly copies of object literal properties, share its
declaration and name, so compareSymbols ordered them by symbol id.
Symbol ids are assigned in the order symbols are first used, which
depends on which code was checked before. They are now ordered by
whether they are transient and by their check flags first.
Object types derived from others, such as spreads and widened copies,
are interned by their member symbols in member table order and by
their index signatures. Object literal types are interned by the
flags, name types, and types of their members. Both were ordered only
by the declarations, optionality, and types of their members. A spread
over a union can make types that differ only in the order of their
members, such as { ...a, ...b } and { ...b, ...a }, and these were left
to the type id. Widened copies of types implied by binding patterns
have no symbol and were not ordered by their members at all.

They are now ordered by everything they are interned by, the member
symbols last, so that a type compares equal only to itself.
The instantiations of a conditional type are cached on its root, but
distributive and tail-recursive evaluation create deferred conditional
types without that cache, so the same deferred conditional type, with
the same root, mappings, and alias, could be created more than once.
Such copies can be told apart only by type id, which follows the order
in which code was checked. Deferred conditional types are now interned
by their root, the content of their mapper, and their alias.

Those made for a constraint stay apart from the others, as the
instantiation caches of a conditional type already keep them:
evaluating a conditional type for a constraint can include its true
branch where evaluating it otherwise would not. Sharing the deferred
types made for one with the other reused the comparisons reached from
them, and checking calls with SetOptional of generic keys then exceeded
the instantiation depth limit (seen in type-fest).

Instantiations of InferData and UnpackKeyValue, whose recursion is
bounded, are no longer reported as infinitely circular when inferred
through a closure (boundedRecursiveTypeInferredThroughClosure).
Symbols the checker makes from others, such as the properties a spread
merges or copies, the members of mapped types, instantiated symbols,
and the copies of a module symbol made for each import of it, share the
declaration, name, and flags of the symbol they are made from, and were
ordered by symbol id, which follows the order in which symbols are
first used. They are now ordered by the symbols, types, and imports
they are made from, which are recorded when they are created.

The symbols made for unresolved names share their name, and are
ordered by the unresolved names that qualify them, as Bidi.Event and
Protocol.Cdp.Event are when neither module is found (seen in
puppeteer and DefinitelyTyped).
The type of a module with a synthetic default import is a spread under
a type literal symbol, and widening it makes a copy with the same
symbol. Neither is an object literal, so nothing but their type ids
distinguished them. Unnamed object types are now also ordered by the
flags recording how they were created.
Instantiations of distinct object literal types made by the same
declaration, such as the copies a call makes when it infers from an
argument twice, were ordered only by their mappers. Instantiations with
mappers of the same content then compared as equal and fell back to
the type id (seen in t3code). They are now ordered by the type they
instantiate first.
Inferring from string literals to keyof T infers to T from an object
type with an any-typed property per literal, which was made anew every
time, so inferring from the same literals twice yielded types that
could be told apart only by type id (seen in tanstack-router). They
are now interned by the literals and whether the source includes
string.
The members of a type implied by a binding pattern have no
declarations, so types implied by two patterns with the same names,
and their widened copies, could be told apart only by their member
symbols, which were ordered by symbol id (seen in vscode). Each member
now records the binding element declaring it, as TypeScript's checker
does, and is ordered by that element. Types that record the pattern
implying them are also ordered by that pattern before their members.
compareTypeMappers compared simple, array, and merged mappers by their
mappings and treated all others as equal. Symbols instantiated through
composite mappers with different mappings then compared as equal and
fell back to the symbol id (seen in sentry). Composite mappers are now
compared by the two mappers they compose, and deferred conditional
types are interned by them too.
Spreading a union of one object type and empty objects makes an object
type with the properties of the object type made optional. A new type
with new properties was made every time, so spreading the same union
twice yielded types that could be told apart only by their properties'
symbol ids (seen in tanstack-router). They are now interned by the
object type and whether the spread is readonly.
Type ids follow the order in which types are created, and symbol ids
the order in which symbols are first used, both of which depend on
which code was checked before. Ordering by them made union order,
printed types, and everything derived from them depend on check order.
Types and symbols are now ordered by their content, so that a value
compares equal only to itself and a sorted list of them is a set by
identity. Reaching the id fallback means two distinct values cannot be
told apart, and is now an assertion failure, except for the types
created with the checker, such as the intrinsic types and the variance
markers, whose order of creation is fixed.
checkAssertion runs in several check modes, such as when a call is
first checked without its context sensitive arguments, and each run
overwrote the operand type kept for the deferred comparability check.
That check used whichever was stored last, so its result depended on
the order in which the assertion was checked.

The deferred check now uses the cached normal type of the operand. The
assertion itself only needs the operand type for `as const`, and the
operand of a non-const assertion is contextually typed by the asserted
type alone, so in any check mode the assertion computes the cached
type the deferred check will read, with inference for an enclosing
call hidden from the operand. This is the result the deferred check
would produce on its own, and checks each operand once rather than
again with fresh flow analysis in the deferred check.
The type of a destructured parameter's binding elements depended on
whether the parameter's type happened to be cached already. For
example, in non-strict mode

    (({ [a()?.d]: c = "" }) => {})();

reported TS2537 when 'c' was queried before the IIFE call resolved
the parameter (its declared type is the undefined widening type),
but not otherwise. Conversely, in

    f7({ a: {} });
    function f7({ a: { x = 0, y = 0 } } = { a: {} }) {}

calling f7 first made 'x' and 'y' errors of type any.

Make the choice depend only on the declaration. Parameters of
context-sensitive functions take their type from contextual
assignment, so ask for the parameter's type. Everything else uses
the type derived from the declaration, as it did when nothing was
cached. Asking for the parameter's type unconditionally instead
introduces circularities in patterns whose initializers reference
sibling elements.
A context-sensitive function is typed in parts: the enclosing call
assigns its parameters their contextual types, completes its signature
with the type parameters of a generic contextual signature, and checks
it. Queries that reached the function before or during those steps saw
it incomplete and cached the types they derived from it.

The first query of such a parameter returned the type it computed
itself from the final signature, while every later query returned the
type the enclosing call assigned. In

    declare function fun<T>(g: (x: T) => T, h: (y: T) => T, x: T): T;
    fun((Math.random() < 0.5 ? (x => x) : (x => undefined)), x => x, 10);

the last 'x' was number when the call was checked first, but any when
'x' was queried first. The assigned type is now returned whenever one
exists, as the original comment intended.

Type aliases in the body read the signature's type parameters as outer
type parameters, so querying such an alias first resolved its
conditional types eagerly. In

    declare function f(fun: <T>(t: T) => void): void
    f(function self(t) {
        const s = self;
        type P = Parameters<typeof s>;
    });

P was [t: unknown] when the call was checked first, but [t: T] when P
was asked for first. Assigning the contextual parameter types, which
completes the signature, is now split from the rest of the contextual
check, and every way to obtain the signature requests it: the type of
the function's symbol, before anything resolves its members, and the
signature of its declaration. Contextual typing can reach the
enclosing call while the signature is being created, so the signature
created there is kept rather than replacing the one that was
contextually typed. In JavaScript, a @type tag on the function still
supplies the signature whose parameters are assigned, as it supplies
the signature of the function's symbol (seen in webpack).

When resolving a function expression's members reached the function
again through its enclosing call, the contextual check saw an empty
signature list and gave up, yet left the node marked as checked, so
implicit any errors could be lost depending on which query got there
first. The deferred function check now requests the contextual check,
so it is performed at least once.

Fixes 42175
Generic calls nested in the arguments of other generic calls, or in
context-sensitive functions passed to them, depend on the enclosing
call for their contextual type and parameter types, and the enclosing
call infers from them in turn. When the inner call was queried first,
it was already marked as resolving by the time its contextual type
resolved the enclosing call, so the enclosing inference saw a
placeholder and both calls cached results that a check in source
order never produces.

Computing the contextual type of a call nested in an argument of an
enclosing call before resolving it resolves the enclosing call first,
as source order does. Other contexts are not resolved ahead of time,
since computing them may evaluate expressions that checking does not,
such as the target of a destructuring assignment.

Resolving a call's signature can also be requested while checking one
of its arguments. Errors that resolution reports at the current node,
such as an instantiation depth error, were located at whichever node
asked first, so checking an argument ahead of its call moved the error
onto the argument. Resolution is now located at the call.

For 55640
Asking for the symbol of a property access that hits an index
signature stored the index symbol as the access's resolved symbol.
Checking a delete expression reads that link to decide whether the
operand must be optional, so a prior symbol query turned `delete a.x`
on an index signature into an error that a plain check does not
report. The type of the index symbol at such an access, which hovers
show, now looks the index symbol up again rather than reading it from
links.

A single signature type produced by higher order inference is
instantiated with the full mapper combined in, since its signature can
reference type parameters other than the outer type parameters of its
declaration. The instantiation cache was keyed only by the mapped
outer type parameters, so two instantiations differing in another type
parameter (here the this type) shared whichever result was computed
first, and checking `outer.log` gave it the type of `inner.log`. Such
instantiations are no longer cached.
Explaining why a name failed to resolve looks up other symbols, for
example to find a spelling suggestion, and that can resolve aliases.
When the failed name was the target of an alias, the suggestion lookup
re-entered the alias being resolved, or skipped it, depending on which
aliases were already in progress. In declarationEmitUnknownImport that
decided whether two "Circular definition of import alias" errors were
reported: they appeared when the import was checked first, and not
when the export specifier was resolved first.

Defer the explanation until no resolution is in progress, so it only
observes finished results. The circularity errors that were artifacts
of the suggestion lookup are no longer reported.
When one reference hit the flow analysis depth limit, flow analysis
was disabled for every later reference in the same function or module
body, so the type of a reference depended on whether another reference
in the body had been analyzed before it. Each reference now gives up
only when its own analysis hits the limit.

Shared flow node results are cached for the duration of one flow
analysis, including incomplete results computed under a loop back
edge. Once that loop's back edge has been exited and the loop label
has a complete type, they are stale. Reusing them made a reference's
type depend on which reference was analyzed first: in
exhaustiveSwitchCheckCircularity, querying the reference inside the
loop before the switch expression produced `never` instead of "bbb".
An incomplete shared result is now reused only while the loop that
was innermost when it was computed is still being analyzed.
A computed property name stored a placeholder type while its expression
was checked, and returned the placeholder when re-entered. That kept the
cycle off the resolution stack, so the computations in between did not
fail, and the placeholder `{}` escaped into messages when checking
entered through the property name, while `any` did when it entered
through the variable it references. In blockScopedBindingUsedBeforeDef,
the error read "Type '{}' cannot be used as an index type" or "Type
'any' ..." depending on which of them was checked first.

Resolve computed property names on the resolution stack, failing with
the error type on re-entry like other circular resolutions.
A relation that succeeds while an outer comparison is still in
progress has only been shown to hold under the outer comparison's
assumption. Caching it globally made later lookups depend on which
comparison happened to run first. The same was true for results cut
short by depth limits measured against outer resolutions.

Each result now tracks the lowest resolution it depends on and whether
it was truncated. Results are cached globally only when the comparison
that introduced their assumptions completes, and truncated results
only at their own head. Failures remain cached immediately, since
assumptions only ever make a relation more likely to succeed. A
comparison that only relates by assuming comparisons within it is
reported as related once it completes, whether it is computed or read
from the cache.

Comparisons of types referencing constrained type parameters are
considered related while the same comparison with unconstrained type
parameters is in progress, since constraints only make more types
related. A completed comparison found to succeed now counts the same
way. That only went unnoticed because completed comparisons used to
stay in progress until the outermost one completed; without it,
relating structurally identical generic interfaces creates ten times
the types.
Instantiating a signature copies a parameter unless the parameter's type
has already been resolved, so whether the parameter in a signature's
printed scope is the declared one depends on the types checked before.
Both name the same declaration, so treating only the declared one as the
same reference made printing a reused annotation depend on check order.
Computing the values of an enum's members type-checked each computed
initializer to report one that is not a number. The initializer may
refer to the enum itself, whose type then reads member values that are
still being computed, so the enum's type depended on whether its values
were first computed by checking it or by asking for its type.

The values do not depend on the initializer's type, so the check now
happens when the member is checked, as for any other error in an
initializer.
Instantiating a symbol returned the symbol itself if its type was
already resolved and could not contain type variables, and an
instantiated symbol otherwise. Which one a member of an instantiated
type is then depended on whether its declared type had been resolved
first, which shows wherever symbols are displayed: hovering over the
same property could show A<T>.x or A<"a">.x.

Always instantiating would also change types. Instantiating an
instantiated symbol starts over from its target with the mappers
combined, and that can evaluate differently than instantiating twice:
for E := {}, E['V'][K] becomes unknown, but with K := never as well it
becomes never, rejecting arguments that the shortcut accepted. So an
instantiation of a symbol whose types have nothing left to instantiate
keeps those types.
Declaration emit marks the declarations it depends on as visible, such
as those an export assignment names. Whether a declaration is visible
was cached together with those marks, so a declaration whose visibility
was asked before emit marked its container, as hovering over a use of it
does, stayed invisible, and emit left it out. Caching only the
visibility the rules of a declaration give, and applying the marks when
asked, gives the same answer whenever emit marks them.
The node builder resolves names to decide whether it can reuse a type
node written in the source, which marked them referenced. Printing a
type, as hovering does, then hid unused declaration errors that
checking alone reports.

Fixes 65616
Resolving the name of a JSDoc link, as hovering over a documented
declaration does, checks it as an expression, which marked the imports
it names as referenced. Emit then kept imports that checking alone
elides.
A checker's memos are not its only state: it also holds the state of the
computations in progress, such as the contextual types pushed for the
nodes being checked, the resolutions on the stack, and the cycles being
resolved. The next request reads anything a request leaves there, so
none of it may outlast the request that set it.

Every field of Checker is now either listed as the state of the
computations in progress, which the test harness checks is at rest
after every request it makes, or listed with the reason it is not, as
the fields of the memo store and links already are. A few fields kept
indices or flags after the computation using them finished, which
nothing read: the lowest cycle head observed, the cycle flag of errors
collected at the current node, the start of a circularity, of a
reverse mapping and of a depth limit. They are now left at rest too.
When a variance measurement reaches a type whose measurement is in
progress, the results cached until the outermost measurement finishes
may be discarded, in case the measurement did not start at the
canonical entry of its circularity. Until then, checking switched to
recording: storing the effects of each result to apply later, and
accounting for them on every read of a cached result. Few measurements
are ever discarded, a handful per project, but recording roughly
doubles the cost of the work done in the meantime, and each checker
measures the shared types again, so with several checkers it accounts
for most of the extra time these changes cost on xstate.

So checking keeps applying effects during a variance cycle, except
those that discarding the measurement would have to take back: errors,
suggestions and deferred diagnostics are held until nothing can
discard them, and dropped with the results if the measurement is.
Every memoized computation records its key as in progress and removes
it when it finishes, so that re-entering it is caught as a cycle.
Nearly every lookup finds nothing, yet the hash table made each
computation pay for an insertion and a deletion that shifts probe
sequences. Counting keys per slot makes the common case one load and
one increment; the rare hit searches the resolution stack, which
already holds the keys.
Each memo map kept its own record of the entries being computed: their
keys, where on the resolution stack each was, and, once there were
many, a count of each key. The checker already counts every other
computation in progress and finds it on the resolution stack, so map
entries are now counted with the rest by a hash of the map and key,
and found on the resolution stack when the count says one may be in
progress. A map keeps only the keys themselves, which a resolution has
no room for.
…ested

Finding a computation in progress searched the whole resolution stack
whenever its slot of the resolving table was taken, and marking the
computations that read an incomplete result walked the stack above it.
With thousands of computations in progress, as in an instantiation that
runs away, nearly every slot is taken, so both cost time proportional to
the depth on every step, and nesting deeply took quadratic time.

Only the computations a search can find, those of memo cells counted as
in progress, are linked from their slots. A computation re-entering one
in progress runs again without being counted, and linking it as well
let a runaway re-entry of one key build a chain that every search for
the key walked to the end (seen in 63040).
The limit on the depth of the whole instantiation stack failed an
instantiation at whatever depth the stack reached, which depends on how
much of what it needed was cached before, so whether a finite but deep
instantiation failed depended on the order types were checked in.

Caching only ever shortens the stack, so an instantiation that would stay
below a limit computed from scratch stays below it in any order. The
limit is now a guard against runaway instantiations, far above any finite
one in real code (the deepest measured, in arktype's tests, nests 189
instantiations computed from scratch), while the limit on each
computation still reports deep ones. An instantiation reaching the guard
fails as a whole wherever it is computed or reused, so an infinite one
fails the same way in any order.
A cycle that passes through a member table in progress is computed again
as if the table had been entered first, with everything below the table
hidden. The table's own memoized computation sits just below its type
resolution, so it was hidden too, and reading the table then failed the
recomputation instead of reading the table. Which member of such a cycle
failed then depended on where the cycle was entered: a type alias read
through an index signature was circular when queried first, and a
parameter typed through a class's base was circular when its class was
checked first.

Fixes 64998
For 61721
A cycle yield recomputes a member of the cycle with the computations in
progress hidden. Reading a member table being resolved below the yield
failed the recomputation, since the table it would see is whatever part
of it has been published. A table that has published nothing is instead
resolved again from scratch inside the yield, so there is nothing
incomplete to read, and failing there reported a circularity for a
property only when its class was checked before its type was queried.

Fixes 61711
A variance measurement must give the same variances wherever it is
first requested. The outermost measurement hid the type resolutions in
progress below it, but memoized computations in progress stayed
visible. When a query reached the return type of a method first, the
measurement of its class re-entered the subtype reduction of that
return type in progress below, treated it as a cycle and discarded the
variances and the reduced type, so the method's return type depended
on whether the class or the method was checked first.

The outermost measurement is now a cycle yield, which hides every
computation in progress below it, together with the contextual types,
inference contexts and depth limits they entered.
When a qualified name used as a type does not resolve, the error
suggests typeof if the name resolves as a value, which needs the type
of the value its first identifier refers to. In

    declare const n: n.T;
    declare namespace n {}

that type is the annotation being resolved. Checking the annotation
first made it the head of the cycle, and the missing member it reports
was dropped along with the other results computed from the incomplete
annotation, so it was reported only when the type of n was queried
first. The type of a value used within its own declaration can depend
on the name being resolved, so no suggestion is made there, and the
missing member is reported in every order, without a circularity error.

(seen in 18163)
Reaching the limit on the instantiation stack failed every
instantiation in progress. A computation that resolves part of a type
whenever it is first needed, like the element type of a deferred array
type, is reached inside an instantiation or not depending on who needs
it first, so whether the instantiation needing it failed as a whole
depended on order. In

    type A = A[];
    const r = ([] as A).flat(Infinity);

r was any[] when the element type of A was resolved first, but any when
the call was checked first. Reaching the limit now fails only the
instantiations in progress in the innermost computation other than of a
cached instantiation, which fail the same way wherever the computation
is reached, so r is any[] in every order, as in TypeScript 6. A result
carrying the error no longer fails an instantiation reading it, as
computing it there would fail only within it.

Inside a cycle in progress, the innermost such computation can be one
re-entered just below the limit, whose own instantiations are finite.
Failing only it let the rest of the cycle go on at the limit, failing
computations that are finite and taking exponential time on recursions
with two branches. The computation that fails is now the one at the
head of the cycle, as the results computed in a cycle are kept or
discarded together.

A conditional type instantiation already known to fail was cached as
the error type before its failure was reported, so the instantiations
reusing it reported nothing and failed nothing. It now ends as other
instantiations do, and no instantiation known to fail is cached (seen
in fuzzing instantiationStackLimitCheckOrder and
recursiveConditionalCrash4).

For 49280
A base constraint keeps how deep its own walk went, so that a walk
reusing it can tell whether computing it again there would give up.
Comparisons are about to keep the same kind of record for their
cached failures, so the record becomes a type of its own, a height,
with the checks both need.

The multiplication spreading the bits of a key over the high bits,
which several tables and filters index by, is likewise written once.
Whether a comparison is too complex depended on how many of the
results it needs were cached by comparisons made before it, so the
same assignment could be an error in one check order and not another.

Charge each reused result, once per comparison, the results that
computing it cached, and count a comparison only too complex for
those charges again with no result cached, which decides it exactly.

The charge is kept in the spare upper bits of each cached result. A map
of charges kept apart from the results held an entry for about half of
them, which raised memory use by more than half (seen in 63854).
A cycle of interfaces extending each other kept different base types
depending on which interface's base types were resolved first: the
one entered first lost its base, and the others kept theirs. Asking
for the members of one interface before checking the declarations
could leave another without the properties it inherits.

Resolve such a cycle from the class or interface declared first, as
cycles through the types of symbols and the return types of
signatures already are. Resolving the cycle's first member may resolve
the base types the cycle re-entered, which are then kept, and a
computation of base types resumed after the cycle resolved them keeps
that result rather than adding its own.
The declared members of a class or interface are marked resolved before
their index signatures are, as the types of those may refer back to the
type. Resolving the members of the type while its declared members were
still in progress, as checking the inherited properties of an interface
with several bases does, or as resolving the members of its reference
with its this type does, read the declared members without noticing the
re-entry. The members were then resolved for good without the index
signature, and keyof the type cached without it. Both keyof the type
and whether its index signature existed depended on whether the type
was checked before its members were otherwise needed, and so, with
several checkers, on how files were assigned to them. Re-entering the
declared members is a cycle like re-entering any other computation in
progress, so results derived from the incomplete members are computed
again once they are complete.

Fixes 65543
An error that computing a cached result reports at the node being
checked is reported at every node whose check reaches the result, as it
would be had that node been checked first. A union type and its first
constituent start at the same position, and both reach the result of
resolving the constituent, so such an error was reported twice at one
position, over spans of different lengths that are not deduplicated.
The error is reported at the outermost type node starting where the
node being checked starts.

(seen in 64384)
Holding a check's effects during variance cycles leaves results with
effects still to replay, and a few keep them for long, for example when
the only read that would replay them was discarded with a variance
measurement. While any result had pending effects, every read of a
cached result took the slow path that looks for them, so a single one
slowed all the checking after it (seen in xstate). The keys of results
given pending effects are now kept in a filter, and a read takes the
slow path only for a key that may have them.
Candidate selection (discriminants, strict arity, inference of generic
signatures) can make a comparison fail because an outer comparison in
progress is assumed related. The new namespaces of
relationCycleNonMonotoneCheckOrder compare such an outer pair first, so
that the failure computed under the assumption is the one cached, and
its baselines differ between check orders.

The other tests cover cases that a fix for this has to handle: a cycle
whose first comparison fails, a cycle compared again from a member that
finds a lesser member, relaters taken from the pool while a cycle is
compared again, a cycle compared again while a superseded variance
measurement is in progress, and assumptions on comparisons deeper than
64 levels. Their baselines agree in every check order.
A failure was cached as soon as it was computed, on the grounds that
what fails under assumptions also fails without them. Candidate
selection (discriminants, strict arity, inference of generic
signatures) breaks that: assuming an outer comparison in progress
related can select a candidate that then fails, so a failure computed
under the assumption can be a success when compared on its own. Which
of the two was cached depended on which comparison was reached first,
and so on check order. A cycle with such a negative dependency can
also have no answer that is the same from every entry point.

A result now carries the comparisons in progress that it assumed, as a
mask of their depths, and failures are held with successes until the
comparisons they assumed complete. Comparisons from depth 63 on share
the last bit, which only the comparison at depth 63 clears, so a result
assuming any of them stays provisional until then and keeps the
dependency. A refuted assumption discards only the results that
depended on it, and failures that depend on no comparison in progress
are cached as before.

A cycle that fails at its head, or that holds a failure, is answered as
if its least member were compared first: that member is compared from
scratch in a relater of its own, which caches the results, and the head
is compared again. The guard against comparing a member this way twice
holds only the members compared this way, so a member found to be less
while comparing again moves the entry point again. The relater keeps
no guard storage in the pool, since the relater that lent it still uses
it, and it continues the outermost comparison, so that a superseded
variance measurement stops it as it stops the rest. Comparing the head
again reports only its own reliability flags.

relationCycleNonMonotoneCheckOrder now agrees in every check order. In
relationCycleHeadFailureCheckOrder and
relationCycleRestartPoolCheckOrder, the answer of the cycle changes
alike in every order, to the one from its least member.
inferFromTypeArgumentsNoInfiniteRecursion no longer reports TS2589.
Relating its recursive alias to a variance marker unrolls a level per
comparison until a depth cut-off answers Maybe; a failure enclosing that
Maybe used to discard it, so the same pair was compared from scratch
deeper in the walk and unrolled further, until instantiation reached its
depth limit. A failure now discards only the results that assumed it, so
the Maybe answers the pair. The error depended on check order as well
(checking the type of R first reported a second one), and TypeScript 6.0
reports none.
@typescript-automation typescript-automation Bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Nov 26, 2026
@jakebailey

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) test it

@typescript-automation

typescript-automation Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

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

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

@typescript-automation

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
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - native
Errors 41 41 ~ ~ ~ p=1.000 n=20
Symbols 88,381 101,456 🔻+13,075 (+14.79%) ~ ~ p=0.000 n=20
Types 79,151 79,314 +163 (+ 0.21%) ~ ~ p=0.000 n=20
Memory Used 106,309k (± 0.03%) 112,393k (± 0.02%) 🔻+6,087k (+ 5.73%) 112,300k 112,447k p=0.000 n=20
Memory Allocs 1,045,792 (± 0.01%) 1,244,785 (± 0.01%) 🔻+198,992 (+19.03%) 1,244,536 1,245,625 p=0.000 n=20
Config Time 0.000s 0.000s (±208.60%) ~ 0.000s 0.001s p=1.000 n=20
Parse Time 0.038s (± 3.27%) 0.037s (± 2.54%) ~ 0.035s 0.042s p=0.559 n=20
Bind Time 0.013s (± 8.52%) 0.013s (± 8.47%) ~ 0.010s 0.018s p=0.570 n=20
Check Time 0.382s (± 0.88%) 0.441s (± 0.63%) 🔻+0.059s (+15.52%) 0.431s 0.452s p=0.000 n=20
Emit Time 0.221s (± 1.78%) 0.243s (± 1.61%) 🔻+0.021s (+ 9.47%) 0.228s 0.262s p=0.000 n=20
Total Time 0.660s (± 0.98%) 0.741s (± 0.84%) 🔻+0.079s (+11.94%) 0.720s 0.763s p=0.000 n=20
angular-1 - native
Errors 63 68 🔻+5 (+ 7.94%) ~ ~ p=0.000 n=20
Symbols 753,805 814,769 🔻+60,964 (+ 8.09%) ~ ~ p=0.000 n=20
Types 546,821 544,857 -1,964 (- 0.36%) ~ ~ p=0.000 n=20
Memory Used 642,682k (± 0.02%) 681,554k (± 0.01%) 🔻+38,876k (+ 6.05%) 681,303k 681,862k p=0.000 n=20
Memory Allocs 8,307,705 (± 0.03%) 9,554,400 (± 0.02%) 🔻+1,246,492 (+15.00%) 9,548,924 9,564,016 p=0.000 n=20
Config Time 0.013s (± 1.71%) 0.014s (± 1.77%) +0.000s (+ 0.00%) 0.013s 0.014s p=0.039 n=20
Parse Time 0.218s (± 2.18%) 0.218s (± 2.68%) ~ 0.202s 0.256s p=0.756 n=20
Bind Time 0.068s (±11.88%) 0.070s (±11.20%) ~ 0.057s 0.101s p=0.931 n=20
Check Time 1.140s (± 0.92%) 1.396s (± 1.01%) 🔻+0.258s (+22.62%) 1.349s 1.431s p=0.000 n=20
Emit Time 0.782s (± 0.45%) 0.823s (± 0.47%) 🔻+0.041s (+ 5.20%) 0.809s 0.840s p=0.000 n=20
Total Time 2.240s (± 0.48%) 2.540s (± 0.48%) 🔻+0.301s (+13.44%) 2.500s 2.587s p=0.000 n=20
arktype - native
Errors 0 0 ~ ~ ~ p=1.000 n=20
Symbols 676,875 732,369 🔻+55,494 (+ 8.20%) ~ ~ p=0.000 n=20
Types 937,868 897,893 🟩-39,975 (- 4.26%) ~ ~ p=0.000 n=20
Memory Used 473,782k (± 0.01%) 513,763k (± 0.01%) 🔻+39,986k (+ 8.44%) 513,502k 513,909k p=0.000 n=20
Memory Allocs 11,786,546 (± 0.01%) 11,482,239 (± 0.02%) -304,611 (- 2.58%) 11,478,522 11,492,216 p=0.000 n=20
Config Time 0.002s 0.002s ~ ~ ~ p=1.000 n=20
Parse Time 0.071s (± 3.19%) 0.069s (± 2.65%) ~ 0.063s 0.078s p=0.418 n=20
Bind Time 0.021s (± 8.56%) 0.022s (±11.30%) ~ 0.018s 0.034s p=0.629 n=20
Check Time 1.506s (± 0.54%) 1.846s (± 0.48%) 🔻+0.340s (+22.57%) 1.809s 1.872s p=0.000 n=20
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Total Time 1.644s (± 0.40%) 1.980s (± 0.40%) 🔻+0.337s (+20.49%) 1.943s 2.010s p=0.000 n=20
class-transformer - native
Errors 0 0 ~ ~ ~ p=1.000 n=20
Symbols 45,379 45,830 +451 (+ 0.99%) ~ ~ p=0.000 n=20
Types 7,571 7,218 🟩-353 (- 4.66%) ~ ~ p=0.000 n=20
Memory Used 27,704k (± 0.04%) 29,080k (± 0.02%) 🔻+1,378k (+ 4.97%) 29,057k 29,105k p=0.000 n=20
Memory Allocs 231,598 (± 0.04%) 247,958 (± 0.04%) 🔻+16,358 (+ 7.06%) 247,620 248,377 p=0.000 n=20
Config Time 0.001s 0.001s ~ ~ ~ p=1.000 n=20
Parse Time 0.017s (± 2.95%) 0.016s (± 1.94%) -0.001s (- 2.99%) 0.015s 0.017s p=0.004 n=20
Bind Time 0.006s (± 9.62%) 0.006s (±10.44%) ~ 0.004s 0.008s p=0.267 n=20
Check Time 0.014s (± 6.41%) 0.018s (± 5.90%) 🔻+0.003s (+23.08%) 0.016s 0.022s p=0.001 n=20
Emit Time 0.016s (± 6.15%) 0.018s (± 6.17%) 🔻+0.002s (+13.56%) 0.014s 0.022s p=0.035 n=20
Total Time 0.056s (± 1.49%) 0.061s (± 1.23%) 🔻+0.005s (+ 8.09%) 0.058s 0.064s p=0.000 n=20
effect - native
Errors 4 4 ~ ~ ~ p=1.000 n=20
Symbols 1,233,598 1,342,248 🔻+108,650 (+ 8.81%) ~ ~ p=0.000 n=20
Types 890,152 885,380 -4,772 (- 0.54%) ~ ~ p=0.000 n=20
Memory Used 938,545k (± 0.01%) 999,571k (± 0.01%) 🔻+61,015k (+ 6.50%) 998,966k 1,000,223k p=0.000 n=20
Memory Allocs 11,688,158 (± 0.07%) 12,298,676 (± 0.02%) 🔻+615,156 (+ 5.26%) 12,293,572 12,320,315 p=0.000 n=20
Config Time 0.006s 0.006s ~ ~ ~ p=1.000 n=20
Parse Time 0.329s (± 1.24%) 0.329s (± 1.66%) ~ 0.309s 0.349s p=0.898 n=20
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Check Time 1.799s (± 0.52%) 2.263s (± 0.47%) 🔻+0.464s (+25.81%) 2.219s 2.306s p=0.000 n=20
Emit Time 0.947s (± 3.06%) 0.996s (± 2.77%) 🔻+0.054s (+ 5.67%) 0.870s 1.088s p=0.024 n=20
Total Time 3.252s (± 0.78%) 3.759s (± 0.61%) 🔻+0.514s (+15.80%) 3.648s 3.831s p=0.000 n=20
mui-docs - native
Errors 11,405 11,405 ~ ~ ~ p=1.000 n=20
Symbols 3,692,472 3,819,271 +126,799 (+ 3.43%) ~ ~ p=0.000 n=20
Types 1,350,271 1,218,765 🟩-131,506 (- 9.74%) ~ ~ p=0.000 n=20
Memory Used 1,652,599k (± 0.07%) 1,827,782k (± 0.07%) 🔻+174,870k (+10.58%) 1,823,470k 1,834,573k p=0.000 n=20
Memory Allocs 24,322,569 (± 0.06%) 25,146,867 (± 0.06%) +829,280 (+ 3.41%) 25,080,921 25,225,435 p=0.000 n=20
Config Time 0.014s (± 1.35%) 0.014s (± 1.35%) ~ 0.014s 0.015s p=0.391 n=20
Parse Time 0.549s (± 2.10%) 0.554s (± 2.09%) ~ 0.515s 0.601s p=0.595 n=20
Bind Time 0.002s (± 9.21%) 0.002s (±18.87%) ~ 0.002s 0.006s p=0.335 n=20
Check Time 5.444s (± 0.31%) 6.372s (± 0.77%) 🔻+0.934s (+17.16%) 6.186s 6.522s p=0.000 n=20
Emit Time 0.586s (± 5.13%) 0.515s (± 2.57%) 🟩-0.061s (-10.36%) 0.494s 0.568s p=0.000 n=20
Total Time 7.534s (± 0.74%) 8.362s (± 0.46%) 🔻+0.805s (+10.69%) 8.227s 8.502s p=0.000 n=20
sentry - native
Errors 1 1 ~ ~ ~ p=1.000 n=20
Symbols 4,781,856 5,101,854 🔻+319,998 (+ 6.69%) ~ ~ p=0.000 n=20
Types 2,590,628 2,475,139 🟩-115,489 (- 4.46%) ~ ~ p=0.000 n=20
Memory Used 2,792,408k (± 0.04%) 3,028,970k (± 0.04%) 🔻+236,155k (+ 8.46%) 3,025,176k 3,034,209k p=0.000 n=20
Memory Allocs 73,754,965 (± 0.05%) 75,344,284 (± 0.06%) +1,584,555 (+ 2.15%) 75,127,844 75,614,829 p=0.000 n=20
Config Time 0.044s (± 0.62%) 0.044s (± 0.55%) ~ 0.043s 0.044s p=0.403 n=20
Parse Time 0.986s (± 2.01%) 0.970s (± 1.78%) ~ 0.914s 1.039s p=0.275 n=20
Bind Time 0.296s (± 9.27%) 0.312s (±12.03%) ~ 0.249s 0.465s p=0.956 n=20
Check Time 13.184s (± 0.41%) 16.042s (± 0.28%) 🔻+2.850s (+21.62%) 15.909s 16.266s p=0.000 n=20
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Total Time 14.579s (± 0.30%) 17.436s (± 0.19%) 🔻+2.853s (+19.57%) 17.295s 17.618s p=0.000 n=20
social-app - native
Errors 0 0 ~ ~ ~ p=1.000 n=20
Symbols 1,839,004 2,106,795 🔻+267,791 (+14.56%) ~ ~ p=0.000 n=20
Types 1,147,065 1,135,760 -11,305 (- 0.99%) ~ ~ p=0.000 n=20
Memory Used 938,520k (± 0.02%) 1,057,150k (± 0.01%) 🔻+118,647k (+12.64%) 1,056,606k 1,057,573k p=0.000 n=20
Memory Allocs 13,253,401 (± 0.11%) 14,701,802 (± 0.10%) 🔻+1,445,988 (+10.91%) 14,655,395 14,756,222 p=0.000 n=20
Config Time 0.013s (± 2.00%) 0.013s (± 1.65%) ~ 0.013s 0.014s p=0.285 n=20
Parse Time 0.335s (± 1.91%) 0.332s (± 1.72%) ~ 0.311s 0.356s p=0.568 n=20
Bind Time 0.084s (± 9.35%) 0.086s (±11.75%) ~ 0.069s 0.142s p=0.205 n=20
Check Time 2.865s (± 0.49%) 3.272s (± 0.37%) 🔻+0.405s (+14.13%) 3.230s 3.317s p=0.000 n=20
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Total Time 3.323s (± 0.31%) 3.727s (± 0.53%) 🔻+0.405s (+12.19%) 3.665s 3.800s p=0.000 n=20
strada-build-src - native
Errors 0 0 ~ ~ ~ p=1.000 n=20
Symbols 1,182,507 1,241,962 🔻+59,455 (+ 5.03%) ~ ~ p=0.000 n=20
Types 435,504 437,699 +2,195 (+ 0.50%) ~ ~ p=0.000 n=20
Memory Used 1,166,747k (± 0.38%) 1,207,466k (± 0.41%) +41,354k (+ 3.54%) 1,192,386k 1,226,627k p=0.000 n=20
Memory Allocs 39,937,408 (± 0.05%) 42,189,556 (± 0.10%) 🔻+2,237,007 (+ 5.60%) 42,081,017 42,403,015 p=0.000 n=20
Config Time 0.005s (± 8.32%) 0.005s (± 9.80%) ~ 0.003s 0.006s p=0.969 n=20
Parse Time 0.291s (± 1.66%) 0.288s (± 1.52%) ~ 0.268s 0.301s p=0.293 n=20
Bind Time 0.000s (±208.60%) 0.000s (±208.60%) ~ 0.000s 0.001s p=1.000 n=20
Check Time 1.716s (± 0.48%) 2.035s (± 0.34%) 🔻+0.320s (+18.64%) 2.010s 2.066s p=0.000 n=20
Emit Time 0.300s (± 2.48%) 0.281s (± 2.45%) 🟩-0.020s (- 6.80%) 0.262s 0.321s p=0.001 n=20
Total Time 20.438s (± 0.43%) 22.900s (± 0.32%) 🔻+2.465s (+12.06%) 22.584s 23.205s p=0.000 n=20
strada-compiler - native
Errors 0 0 ~ ~ ~ p=1.000 n=20
Symbols 262,139 292,618 🔻+30,479 (+11.63%) ~ ~ p=0.000 n=20
Types 195,077 196,799 +1,722 (+ 0.88%) ~ ~ p=0.000 n=20
Memory Used 221,392k (± 0.02%) 235,583k (± 0.02%) 🔻+14,189k (+ 6.41%) 235,456k 235,752k p=0.000 n=20
Memory Allocs 1,884,652 (± 0.02%) 2,044,777 (± 0.01%) 🔻+160,099 (+ 8.49%) 2,043,752 2,045,589 p=0.000 n=20
Config Time 0.001s 0.001s ~ ~ ~ p=1.000 n=20
Parse Time 0.102s (± 4.28%) 0.106s (± 3.50%) ~ 0.092s 0.120s p=0.216 n=20
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Check Time 0.825s (± 0.33%) 0.987s (± 0.54%) 🔻+0.162s (+19.65%) 0.970s 1.010s p=0.000 n=20
Emit Time 0.092s (± 4.43%) 0.098s (± 6.69%) ~ 0.083s 0.121s p=0.205 n=20
Total Time 1.071s (± 0.71%) 1.242s (± 0.63%) 🔻+0.171s (+15.92%) 1.216s 1.272s p=0.000 n=20
t3code-server - native
Errors 0 0 ~ ~ ~ p=1.000 n=20
Symbols 4,345,111 4,631,113 🔻+286,002 (+ 6.58%) ~ ~ p=0.000 n=20
Types 3,039,273 3,008,982 -30,291 (- 1.00%) ~ ~ p=0.000 n=20
Memory Used 2,393,141k (± 0.03%) 2,614,954k (± 0.02%) 🔻+221,911k (+ 9.27%) 2,613,281k 2,617,007k p=0.000 n=20
Memory Allocs 36,901,470 (± 0.03%) 41,505,337 (± 0.05%) 🔻+4,597,828 (+12.46%) 41,447,088 41,619,005 p=0.000 n=20
Config Time 0.006s 0.006s (± 2.43%) ~ 0.005s 0.006s p=0.346 n=20
Parse Time 0.541s (± 1.98%) 0.550s (± 1.50%) ~ 0.516s 0.576s p=0.134 n=20
Bind Time 0.164s (±12.83%) 0.139s (± 2.48%) ~ 0.132s 0.158s p=0.053 n=20
Check Time 12.208s (± 0.46%) 15.018s (± 0.54%) 🔻+2.806s (+22.99%) 14.681s 15.339s p=0.000 n=20
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Total Time 12.934s (± 0.48%) 15.729s (± 0.52%) 🔻+2.789s (+21.56%) 15.378s 16.058s p=0.000 n=20
tanstack-router - native
Errors 3 3 ~ ~ ~ p=1.000 n=20
Symbols 567,390 622,521 🔻+55,131 (+ 9.72%) ~ ~ p=0.000 n=20
Types 395,720 368,875 🟩-26,845 (- 6.78%) ~ ~ p=0.000 n=20
Memory Used 311,110k (± 0.01%) 344,494k (± 0.01%) 🔻+33,393k (+10.73%) 344,361k 344,592k p=0.000 n=20
Memory Allocs 3,964,537 (± 0.02%) 3,949,894 (± 0.11%) -16,719 (- 0.42%) 3,945,008 3,990,532 p=0.001 n=20
Config Time 0.002s 0.002s ~ ~ ~ p=1.000 n=20
Parse Time 0.081s (± 3.21%) 0.080s (± 3.70%) ~ 0.071s 0.094s p=0.360 n=20
Bind Time 0.026s (±12.45%) 0.025s (±12.57%) ~ 0.020s 0.040s p=0.463 n=20
Check Time 1.004s (± 0.51%) 1.083s (± 0.71%) 🔻+0.077s (+ 7.64%) 1.060s 1.120s p=0.000 n=20
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Total Time 1.117s (± 0.41%) 1.194s (± 0.72%) 🔻+0.078s (+ 6.95%) 1.173s 1.224s p=0.000 n=20
ts-pre-modules - native
Errors 87 87 ~ ~ ~ p=1.000 n=20
Symbols 230,307 259,301 🔻+28,994 (+12.59%) ~ ~ p=0.000 n=20
Types 180,514 182,295 +1,781 (+ 0.99%) ~ ~ p=0.000 n=20
Memory Used 190,438k (± 0.02%) 202,079k (± 0.01%) 🔻+11,648k (+ 6.12%) 201,942k 202,169k p=0.000 n=20
Memory Allocs 1,284,295 (± 0.01%) 1,386,207 (± 0.01%) 🔻+101,892 (+ 7.93%) 1,385,814 1,386,694 p=0.000 n=20
Config Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Parse Time 0.077s (± 3.30%) 0.077s (± 3.36%) ~ 0.067s 0.084s p=0.763 n=20
Bind Time 0.032s (± 8.20%) 0.032s (± 7.59%) ~ 0.025s 0.042s p=0.953 n=20
Check Time 0.554s (± 0.93%) 0.665s (± 0.52%) 🔻+0.110s (+19.87%) 0.652s 0.679s p=0.000 n=20
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Total Time 0.676s (± 0.66%) 0.787s (± 0.45%) 🔻+0.111s (+16.35%) 0.773s 0.799s p=0.000 n=20
vscode - native
Errors 0 0 ~ ~ ~ p=1.000 n=20
Symbols 8,817,585 9,231,768 🔻+414,183 (+ 4.70%) ~ ~ p=0.000 n=20
Types 5,094,812 4,798,649 🟩-296,163 (- 5.81%) ~ ~ p=0.000 n=20
Memory Used 5,879,553k (± 0.02%) 6,100,890k (± 0.01%) +221,319k (+ 3.76%) 6,097,903k 6,104,085k p=0.000 n=20
Memory Allocs 65,055,786 (± 0.03%) 77,572,063 (± 0.01%) 🔻+12,523,704 (+19.25%) 77,554,734 77,641,509 p=0.000 n=20
Config Time 0.048s (± 0.68%) 0.048s (± 0.67%) ~ 0.046s 0.049s p=0.123 n=20
Parse Time 1.853s (± 1.66%) 1.831s (± 2.08%) ~ 1.684s 1.978s p=0.330 n=20
Bind Time 0.582s (± 8.48%) 0.607s (±10.33%) ~ 0.521s 0.912s p=0.702 n=20
Check Time 14.435s (± 0.67%) 17.979s (± 0.46%) 🔻+3.550s (+24.59%) 17.649s 18.164s p=0.000 n=20
Emit Time 4.414s (± 7.29%) 5.185s (± 7.30%) 🔻+0.666s (+15.08%) 4.312s 6.285s p=0.006 n=20
Total Time 21.403s (± 1.26%) 25.723s (± 1.25%) 🔻+4.254s (+19.87%) 24.953s 26.679s p=0.000 n=20
webpack - native
Errors 1,392 1,393 +1 (+ 0.07%) ~ ~ p=0.000 n=20
Symbols 937,500 1,024,171 🔻+86,671 (+ 9.24%) ~ ~ p=0.000 n=20
Types 638,057 630,360 -7,697 (- 1.21%) ~ ~ p=0.000 n=20
Memory Used 759,782k (± 0.02%) 815,669k (± 0.01%) 🔻+55,885k (+ 7.36%) 815,391k 816,206k p=0.000 n=20
Memory Allocs 6,554,282 (± 0.07%) 7,195,287 (± 0.12%) 🔻+639,245 (+ 9.75%) 7,182,193 7,262,915 p=0.000 n=20
Config Time 0.008s (± 2.51%) 0.008s (± 4.16%) ~ 0.008s 0.011s p=0.212 n=20
Parse Time 0.322s (± 2.79%) 0.313s (± 3.36%) ~ 0.277s 0.355s p=0.114 n=20
Bind Time 0.094s (±11.62%) 0.087s (±12.26%) ~ 0.069s 0.135s p=0.595 n=20
Check Time 3.444s (± 0.43%) 4.362s (± 0.33%) 🔻+0.918s (+26.66%) 4.298s 4.428s p=0.000 n=20
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Total Time 3.920s (± 0.52%) 4.821s (± 0.31%) 🔻+0.902s (+23.01%) 4.753s 4.871s p=0.000 n=20
xstate-main - native
Errors 1 1 ~ ~ ~ p=1.000 n=20
Symbols 4,335,650 4,823,104 🔻+487,454 (+11.24%) ~ ~ p=0.000 n=20
Types 4,459,408 3,771,166 🟩-688,242 (-15.43%) ~ ~ p=0.000 n=20
Memory Used 2,398,376k (± 0.01%) 2,517,874k (± 0.01%) 🔻+119,442k (+ 4.98%) 2,517,291k 2,518,768k p=0.000 n=20
Memory Allocs 48,052,055 (± 0.01%) 48,589,788 (± 0.01%) +538,657 (+ 1.12%) 48,571,644 48,604,919 p=0.000 n=20
Config Time 0.004s 0.004s ~ ~ ~ p=1.000 n=20
Parse Time 0.219s (± 2.32%) 0.211s (± 2.16%) 🟩-0.008s (- 3.76%) 0.190s 0.222s p=0.043 n=20
Bind Time 0.061s (± 6.04%) 0.065s (±11.30%) ~ 0.057s 0.111s p=0.456 n=20
Check Time 8.938s (± 0.43%) 10.234s (± 0.36%) 🔻+1.278s (+14.30%) 10.157s 10.431s p=0.000 n=20
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=20
Total Time 9.229s (± 0.40%) 10.522s (± 0.36%) 🔻+1.275s (+13.81%) 10.435s 10.706s p=0.000 n=20
System info unknown
Hosts
  • native
Scenarios
  • Compiler-Unions - native
  • angular-1 - native
  • arktype - native
  • class-transformer - native
  • effect - native
  • mui-docs - native
  • sentry - native
  • social-app - native
  • strada-build-src - native
  • strada-compiler - native
  • t3code-server - native
  • tanstack-router - native
  • ts-pre-modules - native
  • vscode - native
  • webpack - native
  • xstate-main - native
Benchmark Name Iterations
Current pr 20
Baseline baseline 20

Developer Information:

Download Benchmarks

@typescript-automation

Copy link
Copy Markdown
Contributor

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

There were interesting changes:

Branch only errors: d3-selection

Package: d3-selection

Branch error:

Project scope: tsconfig.json

Error: types/d3-selection/d3-selection-tests.ts:1508:9
TypeScript@local compile error TS2769:
No overload matches this call.
  The last overload gave the following error.
    Argument of type '(enter: Selection<EnterElement, number, HTMLElement, unknown>) => TransitionLike<HTMLParagraphElement, number>' is not assignable to parameter of type 'string | ((elem: Selection<EnterElement, number, HTMLElement, unknown>) => Selection<BaseType, number, HTMLElement, unknown> | TransitionLike<...>)'.
      Type '(enter: Selection<EnterElement, number, HTMLElement, unknown>) => TransitionLike<HTMLParagraphElement, number>' is not assignable to type '(elem: Selection<EnterElement, number, HTMLElement, unknown>) => Selection<BaseType, number, HTMLElement, unknown> | TransitionLike<...>'.
        Type 'TransitionLike<HTMLParagraphElement, number>' is not assignable to type 'Selection<BaseType, number, HTMLElement, unknown> | TransitionLike<HTMLElement, number>'.
          Type 'TransitionLike<HTMLParagraphElement, number>' is not assignable to type 'TransitionLike<HTMLElement, number>'.
            The types returned by 'selection().merge' are incompatible between these types.
              Type '(other: Selection<HTMLParagraphElement, number, any, any> | TransitionLike<HTMLParagraphElement, number>) => Selection<...>' is not assignable to type '(other: Selection<HTMLElement, number, any, any> | TransitionLike<HTMLElement, number>) => Selection<HTMLElement, number, any, any>'.
                Types of parameters 'other' and 'other' are incompatible.
                  Type 'Selection<HTMLElement, number, any, any> | TransitionLike<HTMLElement, number>' is not assignable to type 'Selection<HTMLParagraphElement, number, any, any> | TransitionLike<HTMLParagraphElement, number>'.
                    Type 'Selection<HTMLElement, number, any, any>' is not assignable to type 'Selection<HTMLParagraphElement, number, any, any> | TransitionLike<HTMLParagraphElement, number>'.
                      Type 'Selection<HTMLElement, number, any, any>' is not assignable to type 'Selection<HTMLParagraphElement, number, any, any>'.
                        Types of property 'select' are incompatible.
                          Type '{ <DescElement extends BaseType>(selector: string): import("/mnt/vss/_work/1/s/DefinitelyTyped/types/d3-selection/index").Selection<DescElement, number, any, any>; <DescElement extends BaseType>(selector: null): import("/mnt/vss/_work/1/s/DefinitelyTyped/types/d3-selection/index").Selection<...>; <DescElement extend...' is not assignable to type '{ <DescElement extends BaseType>(selector: string): import("/mnt/vss/_work/1/s/DefinitelyTyped/types/d3-selection/index").Selection<DescElement, number, any, any>; <DescElement extends BaseType>(selector: null): import("/mnt/vss/_work/1/s/DefinitelyTyped/types/d3-selection/index").Selection<...>; <DescElement extend...'. Two different types with this name exist, but they are unrelated.
                            Types of parameters 'selector' and 'selector' are incompatible.
                              Types of parameters 'groups' and 'groups' are incompatible.
                                Type 'HTMLElement[] | ArrayLike<HTMLElement>' is not assignable to type 'HTMLParagraphElement[] | ArrayLike<HTMLParagraphElement>'.
                                  Type 'HTMLElement[]' is not assignable to type 'HTMLParagraphElement[] | ArrayLike<HTMLParagraphElement>'.
                                    Type 'HTMLElement[]' is not assignable to type 'HTMLParagraphElement[]'.
                                      Property 'align' is missing in type 'HTMLElement' but required in type 'HTMLParagraphElement'.
    at combineErrorsAndWarnings (/mnt/vss/_work/1/s/DefinitelyTyped-tools/packages/dtslint/dist/index.js:200:28)
    at runTests (/mnt/vss/_work/1/s/DefinitelyTyped-tools/packages/dtslint/dist/index.js:192:20)
Branch only errors: redux-immutable

Package: redux-immutable

Branch error:

Project scope: tsconfig.json

Error: types/redux-immutable/redux-immutable-tests.ts:48:1
TypeScript@local compile error TS2589:
Type instantiation is excessively deep and possibly infinite.
    at combineErrorsAndWarnings (/mnt/vss/_work/1/s/DefinitelyTyped-tools/packages/dtslint/dist/index.js:200:28)
    at runTests (/mnt/vss/_work/1/s/DefinitelyTyped-tools/packages/dtslint/dist/index.js:192:20)
Branch only errors: mongoose-auto-increment

Package: mongoose-auto-increment

Branch error:

Project scope: tsconfig.json

SuppressedError: An error was suppressed during disposal.
    at fail (/mnt/vss/_work/1/s/DefinitelyTyped-tools/packages/dtslint/dist/lintCorsa.js:60:40)
    at next (/mnt/vss/_work/1/s/DefinitelyTyped-tools/packages/dtslint/dist/lintCorsa.js:75:21)
    at __disposeResources (/mnt/vss/_work/1/s/DefinitelyTyped-tools/packages/dtslint/dist/lintCorsa.js:81:16)
    at lintCorsaVersions (/mnt/vss/_work/1/s/DefinitelyTyped-tools/packages/dtslint/dist/lintCorsa.js:143:17)
    at lint (/mnt/vss/_work/1/s/DefinitelyTyped-tools/packages/dtslint/dist/lint.js:51:64)
    at testTypesVersion (/mnt/vss/_work/1/s/DefinitelyTyped-tools/packages/dtslint/dist/index.js:240:39)
    at runTests (/mnt/vss/_work/1/s/DefinitelyTyped-tools/packages/dtslint/dist/index.js:156:43)
Branch only errors: react-relay

Package: react-relay

Branch error:

Project scope: tsconfig.json

Error: types/react-relay/test/relay-hooks-tests.tsx:987:13
TypeScript@local compile error TS2344:
Type '{ mainPanelA?: EntryPoint<EntryPointComponent<{ someQueryRef: SomeQuery; }, {}, { onClick: () => void; }>, Params> | undefined; mainPanelB?: EntryPoint<...> | undefined; }' does not satisfy the constraint 'Record<string, EntryPoint<any, any> | undefined>'.
  Property 'mainPanelA' is incompatible with index signature.
    Type 'EntryPoint<EntryPointComponent<{ someQueryRef: SomeQuery; }, {}, { onClick: () => void; }>, Params>' is not assignable to type 'InternalEntryPointRepresentation<any, Record<string, OperationType>, Record<string, EntryPoint<any, any> | undefined>, {}, {} | null>'.
      Types of property 'root' are incompatible.
        Type 'JSResourceReference<EntryPointComponent<{ someQueryRef: SomeQuery; }, {}, { onClick: () => void; }, {}>>' is not assignable to type 'JSResourceReference<EntryPointComponent<Record<string, OperationType>, Record<string, EntryPoint<any, any> | undefined>, {}, {} | null>>'.
          Type 'EntryPointComponent<{ someQueryRef: SomeQuery; }, {}, { onClick: () => void; }, {}>' is not assignable to type 'EntryPointComponent<Record<string, OperationType>, Record<string, EntryPoint<any, any> | undefined>, {}, {} | null>'.
            Type 'ComponentClass<EntryPointProps<{ someQueryRef: SomeQuery; }, {}, { onClick: () => void; }, {}>, any>' is not assignable to type 'EntryPointComponent<Record<string, OperationType>, Record<string, EntryPoint<any, any> | undefined>, {}, {} | null>'.
              Type 'ComponentClass<EntryPointProps<{ someQueryRef: SomeQuery; }, {}, { onClick: () => void; }, {}>, any>' is not assignable to type 'ComponentClass<EntryPointProps<Record<string, OperationType>, Record<string, EntryPoint<any, any> | undefined>, {}, {} | null>, any>'.
                Types of property 'getDerivedStateFromProps' are incompatible.
                  Type 'GetDerivedStateFromProps<EntryPointProps<{ someQueryRef: SomeQuery; }, {}, { onClick: () => void; }, {}>, any> | undefined' is not assignable to type 'GetDerivedStateFromProps<EntryPointProps<Record<string, OperationType>, Record<string, EntryPoint<any, any> | undefined>, {}, {} | null>, any> | undefined'.
                    Type 'GetDerivedStateFromProps<EntryPointProps<{ someQueryRef: SomeQuery; }, {}, { onClick: () => void; }, {}>, any>' is not assignable to type 'GetDerivedStateFromProps<EntryPointProps<Record<string, OperationType>, Record<string, EntryPoint<any, any> | undefined>, {}, {} | null>, any>'.
                      Types of parameters 'nextProps' and 'nextProps' are incompatible.
                        Type 'Readonly<EntryPointProps<Record<string, OperationType>, Record<string, EntryPoint<any, any> | undefined>, {}, {} | null>>' is not assignable to type 'Readonly<EntryPointProps<{ someQueryRef: SomeQuery; }, {}, { onClick: () => void; }, {}>>'.
                          Types of property 'extraProps' are incompatible.
                            Type '{} | null' is not assignable to type '{}'.
                              Type 'null' is not assignable to type '{}'.

types/react-relay/test/relay-hooks-tests.tsx:1023:13
TypeScript@local compile error TS2322:
Type '(params: { route: string; }) => { entryPoints: { mainPanelA: { entryPoint: EntryPoint<EntryPointComponent<{ someQueryRef: SomeQuery; }, {}, { onClick: () => void; }>, Params>; entryPointParams: ...; }; mainPanelB?: undefined; } | ...; queries: ...; extraProps: ...; }' is not assignable to type '(entryPointParams: { route: string; }) => PreloadProps<{ route: string; }, {}, Record<string, EntryPoint<any, any> | undefined>, { foo: "bar"; }>'.
  Type '{ entryPoints: { mainPanelA: { entryPoint: EntryPoint<EntryPointComponent<{ someQueryRef: SomeQuery; }, {}, { onClick: () => void; }>, Params>; entryPointParams: { slug: string; }; }; mainPanelB?: undefined; } | ...; queries: {}; extraProps: ...; }' is not assignable to type 'PreloadProps<{ route: string; }, {}, Record<string, EntryPoint<any, any> | undefined>, { foo: "bar"; }>'.
    Types of property 'entryPoints' are incompatible.
      Type '{ mainPanelA: { entryPoint: EntryPoint<EntryPointComponent<{ someQueryRef: SomeQuery; }, {}, { onClick: () => void; }>, Params>; entryPointParams: ...; }; mainPanelB?: undefined; } | ...' is not assignable to type 'ThinNestedEntryPointParamsObject<Record<string, EntryPoint<any, any> | undefined>> | undefined'.
        Type '{ mainPanelA: { entryPoint: EntryPoint<EntryPointComponent<{ someQueryRef: SomeQuery; }, {}, { onClick: () => void; }>, Params>; entryPointParams: { slug: string; }; }; mainPanelB?: undefined; }' is not assignable to type 'ThinNestedEntryPointParamsObject<Record<string, EntryPoint<any, any> | undefined>>'.
          Property 'mainPanelA' is incompatible with index signature.
            Type '{ entryPoint: EntryPoint<EntryPointComponent<{ someQueryRef: SomeQuery; }, {}, { onClick: () => void; }>, Params>; entryPointParams: { slug: string; }; }' is not assignable to type 'ThinNestedEntryPointParams<EntryPoint<any, any> | undefined>'.
              The types of 'entryPoint.root' are incompatible between these types.
                Type 'JSResourceReference<EntryPointComponent<{ someQueryRef: SomeQuery; }, {}, { onClick: () => void; }, {}>>' is not assignable to type 'JSResourceReference<EntryPointComponent<Record<string, OperationType>, Record<string, EntryPoint<any, any> | undefined>, {}, {} | null>>'.
                  Type 'EntryPointComponent<{ someQueryRef: SomeQuery; }, {}, { onClick: () => void; }, {}>' is not assignable to type 'EntryPointComponent<Record<string, OperationType>, Record<string, EntryPoint<any, any> | undefined>, {}, {} | null>'.
                    Type 'ComponentClass<EntryPointProps<{ someQueryRef: SomeQuery; }, {}, { onClick: () => void; }, {}>, any>' is not assignable to type 'EntryPointComponent<Record<string, OperationType>, Record<string, EntryPoint<any, any> | undefined>, {}, {} | null>'.
                      Type 'ComponentClass<EntryPointProps<{ someQueryRef: SomeQuery; }, {}, { onClick: () => void; }, {}>, any>' is not assignable to type 'ComponentClass<EntryPointProps<Record<string, OperationType>, Record<string, EntryPoint<any, any> | undefined>, {}, {} | null>, any>'.
                        Types of property 'getDerivedStateFromProps' are incompatible.
                          Type 'GetDerivedStateFromProps<EntryPointProps<{ someQueryRef: SomeQuery; }, {}, { onClick: () => void; }, {}>, any> | undefined' is not assignable to type 'GetDerivedStateFromProps<EntryPointProps<Record<string, OperationType>, Record<string, EntryPoint<any, any> | undefined>, {}, {} | null>, any> | undefined'.
                            Type 'GetDerivedStateFromProps<EntryPointProps<{ someQueryRef: SomeQuery; }, {}, { onClick: () => void; }, {}>, any>' is not assignable to type 'GetDerivedStateFromProps<EntryPointProps<Record<string, OperationType>, Record<string, EntryPoint<any, any> | undefined>, {}, {} | null>, any>'.
                              Types of parameters 'nextProps' and 'nextProps' are incompatible.
                                Type 'Readonly<EntryPointProps<Record<string, OperationType>, Record<string, EntryPoint<any, any> | undefined>, {}, {} | null>>' is not assignable to type 'Readonly<EntryPointProps<{ someQueryRef: SomeQuery; }, {}, { onClick: () => void; }, {}>>'.
                                  Types of property 'extraProps' are incompatible.
                                    Type '{} | null' is not assignable to type '{}'.
                                      Type 'null' is not assignable to type '{}'.

types/react-relay/test/relay-hooks-tests.tsx:1054:15
TypeScript@local compile error TS2322:
Type 'Readonly<{ dispose: DisposeFn; entryPoints: { [x: string]: Readonly<...>; }; extraProps: {} | null; getComponent: () => any; isDisposed: boolean; queries: { [x: string]: PreloadedQuery<OperationType, Record<...>>; }; rootModuleID: string; }>' is not assignable to type 'PreloadedEntryPoint<EntryPointComponent<{ someQueryRef: SomeQuery; }, {}, { onClick: () => void; }>> | undefined'.
  Type 'Readonly<{ dispose: DisposeFn; entryPoints: { [x: string]: Readonly<...>; }; extraProps: {} | null; getComponent: () => any; isDisposed: boolean; queries: { [x: string]: PreloadedQuery<OperationType, Record<...>>; }; rootModuleID: string; }>' is not assignable to type 'Readonly<{ dispose: DisposeFn; entryPoints: {}; extraProps: {}; getComponent: () => FunctionComponent<EntryPointProps<{ someQueryRef: SomeQuery; }, {}, { onClick: () => void; }, {}>>; isDisposed: boolean; queries: ...; rootModuleID: string; }>'.
    Types of property 'extraProps' are incompatible.
      Type '{} | null' is not assignable to type '{}'.
        Type 'null' is not assignable to type '{}'.
    at combineErrorsAndWarnings (/mnt/vss/_work/1/s/DefinitelyTyped-tools/packages/dtslint/dist/index.js:200:28)
    at runTests (/mnt/vss/_work/1/s/DefinitelyTyped-tools/packages/dtslint/dist/index.js:192:20)
Branch only errors: gulp-sass

Package: gulp-sass

Branch error:

Project scope: tsconfig.json

Error: types/gulp-sass/gulp-sass-tests.ts:7:26
TypeScript@local compile error TS2589:
Type instantiation is excessively deep and possibly infinite.
    at combineErrorsAndWarnings (/mnt/vss/_work/1/s/DefinitelyTyped-tools/packages/dtslint/dist/index.js:200:28)
    at runTests (/mnt/vss/_work/1/s/DefinitelyTyped-tools/packages/dtslint/dist/index.js:192:20)

Full output in the log.

@jakebailey
Jake Bailey (jakebailey) deleted the experiment-edge-cutoff branch November 27, 2026 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant