From b170331b020a000c0b9d826833f3141625cb61a9 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sun, 18 Oct 2026 22:16:35 -0700 Subject: [PATCH 01/29] Check assertion operands once, with their normal type 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. --- tsc/internal/checker/checker.go | 31 +++++++++++++++---- tsc/internal/checker/types.go | 6 ---- ...AssertionCallNoHang(checkorder=default).js | 24 ++++++++++++++ ...ssertionCallNoHang(checkorder=isolated).js | 24 ++++++++++++++ ...AssertionCallNoHang(checkorder=reverse).js | 24 ++++++++++++++ ...ertionCallNoHang(checkorder=typesfirst).js | 24 ++++++++++++++ ...ryOrder(checkorder=editorfirst).errors.txt | 18 ----------- ...peQueryOrder(checkorder=editorfirst).types | 2 +- ...sertionOperandInLoopAssertionCallNoHang.ts | 15 +++++++++ 9 files changed, 137 insertions(+), 31 deletions(-) create mode 100644 tsc/testdata/baselines/reference/compiler/assertionOperandInLoopAssertionCallNoHang(checkorder=default).js create mode 100644 tsc/testdata/baselines/reference/compiler/assertionOperandInLoopAssertionCallNoHang(checkorder=isolated).js create mode 100644 tsc/testdata/baselines/reference/compiler/assertionOperandInLoopAssertionCallNoHang(checkorder=reverse).js create mode 100644 tsc/testdata/baselines/reference/compiler/assertionOperandInLoopAssertionCallNoHang(checkorder=typesfirst).js delete mode 100644 tsc/testdata/baselines/reference/compiler/getterReturnTypeQueryOrder(checkorder=editorfirst).errors.txt create mode 100644 tsc/testdata/tests/cases/compiler/assertionOperandInLoopAssertionCallNoHang.ts diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index 80f89cef07435..4be11f6a07df4 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -662,6 +662,7 @@ type Checker struct { memberLayoutCache map[CacheHashKey]*MemberLayout markerTypes collections.Set[*Type] resolvingExplicitTypeOfSymbol collections.Set[*ast.Symbol] + resolvingAssertionOperands collections.Set[*ast.Node] constructorOrFunctionChecked collections.Set[*ast.Symbol] undefinedSymbol *ast.Symbol argumentsSymbol *ast.Symbol @@ -728,7 +729,6 @@ type Checker struct { symbolNodeLinks nodeLinkStore[SymbolNodeLinks] typeNodeLinks nodeLinkStore[TypeNodeLinks] enumMemberLinks core.LinkStore[*ast.Node, EnumMemberLinks] - assertionLinks core.LinkStore[*ast.Node, AssertionLinks] arrayLiteralLinks core.LinkStore[*ast.Node, ArrayLiteralLinks] switchStatementLinks core.LinkStore[*ast.Node, SwitchStatementLinks] jsxElementLinks core.LinkStore[*ast.Node, JsxElementLinks] @@ -12599,26 +12599,45 @@ func (c *Checker) checkAssertion(node *ast.Node, checkMode CheckMode) *Type { } } typeNode := node.Type() - exprType := c.checkExpressionEx(node.Expression(), checkMode) + isConst := isConstTypeReference(typeNode) + var exprType *Type + if isConst { + exprType = c.checkExpressionEx(node.Expression(), checkMode) + } else if c.resolvingAssertionOperands.AddIfAbsent(node) { + // Only the deferred check uses the operand type, and it uses the + // cached one, so compute that here rather than checking twice. The + // operand is contextually typed by the asserted type alone; hiding + // any inference in progress for an enclosing call keeps the cached + // type the same as when the deferred check computes it. Computing + // the cached type sets aside any flow analysis in progress, so the + // assertion is re-entered when the operand's flow type depends on + // a call containing it within a loop; the enclosing computation + // then provides the cached type. + c.pushInferenceContext(node.Expression(), nil) + c.checkExpressionCached(node.Expression()) + c.popInferenceContext() + c.resolvingAssertionOperands.Delete(node) + } // Always check the type node so its identifiers are resolved. resolveName knows not // to resolve (or report an error for) the `const` in a `const` assertion, so this is // safe even for `x as const` and keeps diagnostics stable regardless of traversal order. c.checkSourceElement(typeNode) - if isConstTypeReference(typeNode) { + if isConst { if !c.isValidConstAssertionArgument(node.Expression()) { c.error(node.Expression(), diagnostics.A_const_assertion_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals) } return c.getRegularTypeOfLiteralType(exprType) } - links := c.assertionLinks.Get(node) - links.exprType = exprType c.checkNodeDeferred(node) return c.getTypeFromTypeNode(typeNode) } func (c *Checker) checkAssertionDeferred(node *ast.Node) { typeNode := node.Type() - exprType := c.getRegularTypeOfObjectLiteral(c.getBaseTypeOfLiteralType(c.assertionLinks.Get(node).exprType)) + // The operand is checked in whatever mode the assertion was, so the + // deferred check uses its type in normal mode, which does not depend on + // which of those checks happened last. + exprType := c.getRegularTypeOfObjectLiteral(c.getBaseTypeOfLiteralType(c.checkExpressionCached(node.Expression()))) targetType := c.getTypeFromTypeNode(typeNode) if !c.isErrorType(targetType) { widenedType := c.getWidenedType(exprType) diff --git a/tsc/internal/checker/types.go b/tsc/internal/checker/types.go index c131050a8563c..188f846e6bf1f 100644 --- a/tsc/internal/checker/types.go +++ b/tsc/internal/checker/types.go @@ -478,12 +478,6 @@ type EnumMemberLinks struct { value evaluator.Result // Constant value of enum member } -// Links for assertion expressions - -type AssertionLinks struct { - exprType *Type // Assertion expression type -} - // SourceFile links type SourceFileLinks struct { diff --git a/tsc/testdata/baselines/reference/compiler/assertionOperandInLoopAssertionCallNoHang(checkorder=default).js b/tsc/testdata/baselines/reference/compiler/assertionOperandInLoopAssertionCallNoHang(checkorder=default).js new file mode 100644 index 0000000000000..9375a099f5c6f --- /dev/null +++ b/tsc/testdata/baselines/reference/compiler/assertionOperandInLoopAssertionCallNoHang(checkorder=default).js @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/assertionOperandInLoopAssertionCallNoHang.ts] //// + +//// [assertionOperandInLoopAssertionCallNoHang.ts] +declare function assertEqual(actual: unknown, expected: T): asserts actual; +declare class C {} +declare function on(cb: (e: undefined) => void): void; +declare const data: []; + +on(e => { + assertEqual(e, false); + for (;;) { + assertEqual(e as C, data); + } +}); + + +//// [assertionOperandInLoopAssertionCallNoHang.js] +"use strict"; +on(e => { + assertEqual(e, false); + for (;;) { + assertEqual(e, data); + } +}); diff --git a/tsc/testdata/baselines/reference/compiler/assertionOperandInLoopAssertionCallNoHang(checkorder=isolated).js b/tsc/testdata/baselines/reference/compiler/assertionOperandInLoopAssertionCallNoHang(checkorder=isolated).js new file mode 100644 index 0000000000000..9375a099f5c6f --- /dev/null +++ b/tsc/testdata/baselines/reference/compiler/assertionOperandInLoopAssertionCallNoHang(checkorder=isolated).js @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/assertionOperandInLoopAssertionCallNoHang.ts] //// + +//// [assertionOperandInLoopAssertionCallNoHang.ts] +declare function assertEqual(actual: unknown, expected: T): asserts actual; +declare class C {} +declare function on(cb: (e: undefined) => void): void; +declare const data: []; + +on(e => { + assertEqual(e, false); + for (;;) { + assertEqual(e as C, data); + } +}); + + +//// [assertionOperandInLoopAssertionCallNoHang.js] +"use strict"; +on(e => { + assertEqual(e, false); + for (;;) { + assertEqual(e, data); + } +}); diff --git a/tsc/testdata/baselines/reference/compiler/assertionOperandInLoopAssertionCallNoHang(checkorder=reverse).js b/tsc/testdata/baselines/reference/compiler/assertionOperandInLoopAssertionCallNoHang(checkorder=reverse).js new file mode 100644 index 0000000000000..9375a099f5c6f --- /dev/null +++ b/tsc/testdata/baselines/reference/compiler/assertionOperandInLoopAssertionCallNoHang(checkorder=reverse).js @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/assertionOperandInLoopAssertionCallNoHang.ts] //// + +//// [assertionOperandInLoopAssertionCallNoHang.ts] +declare function assertEqual(actual: unknown, expected: T): asserts actual; +declare class C {} +declare function on(cb: (e: undefined) => void): void; +declare const data: []; + +on(e => { + assertEqual(e, false); + for (;;) { + assertEqual(e as C, data); + } +}); + + +//// [assertionOperandInLoopAssertionCallNoHang.js] +"use strict"; +on(e => { + assertEqual(e, false); + for (;;) { + assertEqual(e, data); + } +}); diff --git a/tsc/testdata/baselines/reference/compiler/assertionOperandInLoopAssertionCallNoHang(checkorder=typesfirst).js b/tsc/testdata/baselines/reference/compiler/assertionOperandInLoopAssertionCallNoHang(checkorder=typesfirst).js new file mode 100644 index 0000000000000..9375a099f5c6f --- /dev/null +++ b/tsc/testdata/baselines/reference/compiler/assertionOperandInLoopAssertionCallNoHang(checkorder=typesfirst).js @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/assertionOperandInLoopAssertionCallNoHang.ts] //// + +//// [assertionOperandInLoopAssertionCallNoHang.ts] +declare function assertEqual(actual: unknown, expected: T): asserts actual; +declare class C {} +declare function on(cb: (e: undefined) => void): void; +declare const data: []; + +on(e => { + assertEqual(e, false); + for (;;) { + assertEqual(e as C, data); + } +}); + + +//// [assertionOperandInLoopAssertionCallNoHang.js] +"use strict"; +on(e => { + assertEqual(e, false); + for (;;) { + assertEqual(e, data); + } +}); diff --git a/tsc/testdata/baselines/reference/compiler/getterReturnTypeQueryOrder(checkorder=editorfirst).errors.txt b/tsc/testdata/baselines/reference/compiler/getterReturnTypeQueryOrder(checkorder=editorfirst).errors.txt deleted file mode 100644 index 4f28621217936..0000000000000 --- a/tsc/testdata/baselines/reference/compiler/getterReturnTypeQueryOrder(checkorder=editorfirst).errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -getterReturnTypeQueryOrder.ts(4,9): error TS7023: 'options' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. - - -==== getterReturnTypeQueryOrder.ts (1 errors) ==== - declare const props: Options; - - class Container { - get options() { - ~~~~~~~ -!!! error TS7023: 'options' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. - return { container: this, ...props } as Options; - } - } - - interface Options { - container?: Container; - } - \ No newline at end of file diff --git a/tsc/testdata/baselines/reference/compiler/getterReturnTypeQueryOrder(checkorder=editorfirst).types b/tsc/testdata/baselines/reference/compiler/getterReturnTypeQueryOrder(checkorder=editorfirst).types index df84cc21241ea..903243eef9cb7 100644 --- a/tsc/testdata/baselines/reference/compiler/getterReturnTypeQueryOrder(checkorder=editorfirst).types +++ b/tsc/testdata/baselines/reference/compiler/getterReturnTypeQueryOrder(checkorder=editorfirst).types @@ -8,7 +8,7 @@ class Container { >Container : Container get options() { ->options : any +>options : Options return { container: this, ...props } as Options; >{ container: this, ...props } as Options : Options diff --git a/tsc/testdata/tests/cases/compiler/assertionOperandInLoopAssertionCallNoHang.ts b/tsc/testdata/tests/cases/compiler/assertionOperandInLoopAssertionCallNoHang.ts new file mode 100644 index 0000000000000..c1ac25d7c9aa3 --- /dev/null +++ b/tsc/testdata/tests/cases/compiler/assertionOperandInLoopAssertionCallNoHang.ts @@ -0,0 +1,15 @@ +// @strict: true +// @noTypesAndSymbols: true +// @checkOrder: default, reverse, isolated, typesfirst + +declare function assertEqual(actual: unknown, expected: T): asserts actual; +declare class C {} +declare function on(cb: (e: undefined) => void): void; +declare const data: []; + +on(e => { + assertEqual(e, false); + for (;;) { + assertEqual(e as C, data); + } +}); From 87cabeeb6a236d3c096f49e433b1c6ae5ff6f218 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 19 Oct 2026 04:44:54 -0700 Subject: [PATCH 02/29] Derive binding pattern parent types without peeking at caches 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. --- tsc/internal/checker/checker.go | 4 +- ...ializers(checkorder=typesfirst).errors.txt | 75 ------------------- ...lInitializers(checkorder=typesfirst).types | 4 +- 3 files changed, 4 insertions(+), 79 deletions(-) delete mode 100644 tsc/testdata/baselines/reference/conformance/destructuringWithLiteralInitializers(checkorder=typesfirst).errors.txt diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index 4be11f6a07df4..5f18528805bfc 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -18477,8 +18477,8 @@ func (c *Checker) getTypeForBindingElementParent(node *ast.Node, checkMode Check if checkMode == CheckModeNormal { // We can use a cached resolved type if no optionality was included in that type. if symbol := c.getSymbolOfDeclaration(node); symbol != nil { - if resolvedType := c.valueSymbolLinks.Get(symbol).resolvedType; resolvedType != nil && !(c.strictNullChecks && isOptionalDeclaration(node)) { - return resolvedType + if !(c.strictNullChecks && isOptionalDeclaration(node)) && node.Kind == ast.KindParameter && c.isContextSensitiveFunctionOrObjectLiteralMethod(node.Parent) { + return c.getTypeOfSymbol(symbol) } } } diff --git a/tsc/testdata/baselines/reference/conformance/destructuringWithLiteralInitializers(checkorder=typesfirst).errors.txt b/tsc/testdata/baselines/reference/conformance/destructuringWithLiteralInitializers(checkorder=typesfirst).errors.txt deleted file mode 100644 index ee3b06edc611c..0000000000000 --- a/tsc/testdata/baselines/reference/conformance/destructuringWithLiteralInitializers(checkorder=typesfirst).errors.txt +++ /dev/null @@ -1,75 +0,0 @@ -destructuringWithLiteralInitializers.ts(37,20): error TS2339: Property 'x' does not exist on type '{}'. -destructuringWithLiteralInitializers.ts(37,27): error TS2339: Property 'y' does not exist on type '{}'. - - -==== destructuringWithLiteralInitializers.ts (2 errors) ==== - // (arg: { x: any, y: any }) => void - function f1({ x, y }) { } - f1({ x: 1, y: 1 }); - - // (arg: { x: any, y?: number }) => void - function f2({ x, y = 0 }) { } - f2({ x: 1 }); - f2({ x: 1, y: 1 }); - - // (arg: { x?: number, y?: number }) => void - function f3({ x = 0, y = 0 }) { } - f3({}); - f3({ x: 1 }); - f3({ y: 1 }); - f3({ x: 1, y: 1 }); - - // (arg?: { x: number, y: number }) => void - function f4({ x, y } = { x: 0, y: 0 }) { } - f4(); - f4({ x: 1, y: 1 }); - - // (arg?: { x: number, y?: number }) => void - function f5({ x, y = 0 } = { x: 0 }) { } - f5(); - f5({ x: 1 }); - f5({ x: 1, y: 1 }); - - // (arg?: { x?: number, y?: number }) => void - function f6({ x = 0, y = 0 } = {}) { } - f6(); - f6({}); - f6({ x: 1 }); - f6({ y: 1 }); - f6({ x: 1, y: 1 }); - - // (arg?: { a: { x?: number, y?: number } }) => void - function f7({ a: { x = 0, y = 0 } } = { a: {} }) { } - ~ -!!! error TS2339: Property 'x' does not exist on type '{}'. - ~ -!!! error TS2339: Property 'y' does not exist on type '{}'. - f7(); - f7({ a: {} }); - f7({ a: { x: 1 } }); - f7({ a: { y: 1 } }); - f7({ a: { x: 1, y: 1 } }); - - // (arg: [any, any]) => void - function g1([x, y]) { } - g1([1, 1]); - - // (arg: [number, number]) => void - function g2([x = 0, y = 0]) { } - g2([1, 1]); - - // (arg?: [number, number]) => void - function g3([x, y] = [0, 0]) { } - g3(); - g3([1, 1]); - - // (arg?: [number, number]) => void - function g4([x, y = 0] = [0]) { } - g4(); - g4([1, 1]); - - // (arg?: [number, number]) => void - function g5([x = 0, y = 0] = []) { } - g5(); - g5([1, 1]); - \ No newline at end of file diff --git a/tsc/testdata/baselines/reference/conformance/destructuringWithLiteralInitializers(checkorder=typesfirst).types b/tsc/testdata/baselines/reference/conformance/destructuringWithLiteralInitializers(checkorder=typesfirst).types index 45f5edceff50e..d46ab82876d40 100644 --- a/tsc/testdata/baselines/reference/conformance/destructuringWithLiteralInitializers(checkorder=typesfirst).types +++ b/tsc/testdata/baselines/reference/conformance/destructuringWithLiteralInitializers(checkorder=typesfirst).types @@ -174,9 +174,9 @@ f6({ x: 1, y: 1 }); function f7({ a: { x = 0, y = 0 } } = { a: {} }) { } >f7 : ({ a: { x, y } }?: { a: {}; }) => void >a : any ->x : any +>x : number >0 : 0 ->y : any +>y : number >0 : 0 >{ a: {} } : { a: {}; } >a : {} From f07d0ad5307616994f70761300917e3a0f482155 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 19 Oct 2026 04:53:14 -0700 Subject: [PATCH 03/29] Make contextual typing of functions independent of query order 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(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) => void): void f(function self(t) { const s = self; type P = Parameters; }); 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 --- tsc/internal/checker/checker.go | 77 +++++++++++++++---- tsc/internal/checker/types.go | 1 + ...pression(checkorder=typesfirst).errors.txt | 5 +- ...ypeParameters(checkorder=typesfirst).types | 12 +-- ...eckOrder(checkorder=typesfirst).errors.txt | 8 +- ...ionCheckOrder(checkorder=typesfirst).types | 2 +- ...nference(checkorder=typesfirst).errors.txt | 8 +- ...eatedly2(checkorder=typesfirst).errors.txt | 7 +- ...rsRepeatedly2(checkorder=typesfirst).types | 4 +- ...nCheckOrder(checkorder=default).errors.txt | 5 +- ...ckOrder(checkorder=editorfirst).errors.txt | 4 +- ...eckOrder(checkorder=typesfirst).errors.txt | 5 +- ...Deferred(checkorder=typesfirst).errors.txt | 6 +- ...ckingDeferred(checkorder=typesfirst).types | 6 +- ...e-with-multiple-files-and-complex-types.js | 10 +-- 15 files changed, 96 insertions(+), 64 deletions(-) diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index 5f18528805bfc..62f4b1a6f5666 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -10444,8 +10444,32 @@ func (c *Checker) checkFunctionExpressionOrObjectLiteralMethod(node *ast.Node, c } func (c *Checker) contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node *ast.Node, checkMode CheckMode) { + c.assignContextualParameterTypesOfFunction(node, checkMode) + links := c.nodeLinks.Get(node) + if links.flags&NodeCheckFlagsContextChecked == 0 || links.flags&NodeCheckFlagsSignatureContextChecked != 0 { + return + } + links.flags |= NodeCheckFlagsSignatureContextChecked + signature := c.getSignatureFromDeclarationUncontextual(node) + contextualSignature := c.getContextualSignature(node) + if contextualSignature != nil && c.getReturnTypeFromAnnotation(node) == nil && signature.resolvedReturnType == nil { + // resolvedReturnType is cached indefinitely, so the return type here has to be computed without CheckModeSkipContextSensitive; + // otherwise anyFunctionType could leak as part of the computed (and cached) return type. + returnType := c.getReturnTypeFromBody(node, checkMode&^CheckModeSkipContextSensitive) + if signature.resolvedReturnType == nil { + signature.resolvedReturnType = returnType + } + } + c.checkSignatureDeclaration(node) +} + +// assignContextualParameterTypesOfFunction assigns the parameters of a +// function expression or object literal method their contextual types, and +// its signature the type parameters of a generic contextual signature. The +// signature of the function is not complete until then, so +// getSignatureFromDeclaration requests this before returning it. +func (c *Checker) assignContextualParameterTypesOfFunction(node *ast.Node, checkMode CheckMode) { links := c.nodeLinks.Get(node) - // Check if function expression is contextually typed and assign parameter types if so. if links.flags&NodeCheckFlagsContextChecked == 0 { contextualSignature := c.getContextualSignature(node) // If a type check is started at a function expression that is an argument of a function call, obtaining the @@ -10453,9 +10477,11 @@ func (c *Checker) contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node // already assigned contextual types. if links.flags&NodeCheckFlagsContextChecked == 0 { links.flags |= NodeCheckFlagsContextChecked - signature := core.FirstOrNil(c.getSignaturesOfType(c.getTypeOfSymbol(c.getSymbolOfDeclaration(node)), SignatureKindCall)) + // A JSDoc @type tag on the function supplies the signature of its + // symbol, and the types of its parameters. + signature := c.getSignatureOfFullSignatureType(node) if signature == nil { - return + signature = c.getSignatureFromDeclarationUncontextual(node) } if c.isContextSensitive(node) { if contextualSignature != nil { @@ -10486,20 +10512,14 @@ func (c *Checker) contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node c.inferFromAnnotatedParametersAndReturn(signature, contextualSignature, inferenceContext) } } - if contextualSignature != nil && c.getReturnTypeFromAnnotation(node) == nil && signature.resolvedReturnType == nil { - // resolvedReturnType is cached indefinitely, so the return type here has to be computed without CheckModeSkipContextSensitive; - // otherwise anyFunctionType could leak as part of the computed (and cached) return type. - returnType := c.getReturnTypeFromBody(node, checkMode&^CheckModeSkipContextSensitive) - if signature.resolvedReturnType == nil { - signature.resolvedReturnType = returnType - } - } - c.checkSignatureDeclaration(node) } } } func (c *Checker) checkFunctionExpressionOrObjectLiteralMethodDeferred(node *ast.Node) { + // Account for the contextual check of the function, which may have been + // performed by a query rather than by resolving the enclosing call. + c.contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, CheckModeNormal) functionFlags := ast.GetFunctionFlags(node) returnType := c.getReturnTypeFromAnnotation(node) c.checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType) @@ -17208,7 +17228,10 @@ func (c *Checker) getTypeOfVariableOrParameterOrProperty(symbol *ast.Symbol) *Ty // to preserve this type. In fact, we need to _prefer_ that type, but it won't // be assigned until contextual typing is complete, so we need to defer in // cases where contextual typing may take place. - if links.resolvedType == nil && !c.isParameterOfContextSensitiveSignature(symbol) { + if assigned := links.resolvedType; assigned != nil { + return assigned + } + if !c.isParameterOfContextSensitiveSignature(symbol) { links.resolvedType = t } return t @@ -17571,6 +17594,12 @@ func (c *Checker) getTypeOfFuncClassEnumModule(symbol *ast.Symbol) *Type { if links.resolvedType == nil { links.resolvedType = c.getTypeOfFuncClassEnumModuleWorker(symbol) } + if declaration := symbol.ValueDeclaration(); declaration != nil && c.isContextSensitiveFunctionOrObjectLiteralMethod(declaration) { + // Complete the signature before anything resolves the members of the + // type: doing so may check the enclosing call, which needs the + // members of the type. + c.assignContextualParameterTypesOfFunction(declaration, CheckModeNormal) + } return links.resolvedType } @@ -20880,6 +20909,17 @@ func (c *Checker) getSignaturesOfSymbol(symbol *ast.Symbol) []*Signature { } func (c *Checker) getSignatureFromDeclaration(declaration *ast.Node) *Signature { + signature := c.getSignatureFromDeclarationUncontextual(declaration) + if c.isContextSensitiveFunctionOrObjectLiteralMethod(declaration) { + c.assignContextualParameterTypesOfFunction(declaration, CheckModeNormal) + } + return signature +} + +// getSignatureFromDeclarationUncontextual returns the signature of a +// declaration without the contextual typing that completes the signatures +// of context-sensitive functions. +func (c *Checker) getSignatureFromDeclarationUncontextual(declaration *ast.Node) *Signature { links := c.signatureLinks.Get(declaration) if links.resolvedSignature != nil { return links.resolvedSignature @@ -20951,6 +20991,12 @@ func (c *Checker) getSignatureFromDeclaration(declaration *ast.Node) *Signature if ast.IsConstructorTypeNode(declaration) && ast.HasSyntacticModifier(declaration, ast.ModifierFlagsAbstract) || ast.IsConstructorDeclaration(declaration) && ast.HasSyntacticModifier(declaration.Parent, ast.ModifierFlagsAbstract) { flags |= SignatureFlagsAbstract } + if links.resolvedSignature != nil { + // Computing the signature reached the enclosing call, which + // contextually typed the function with a signature of its own, as + // when the call is checked first. Keep that one. + return links.resolvedSignature + } links.resolvedSignature = c.newSignature(flags, declaration, typeParameters, thisParameter, parameters, nil /*resolvedReturnType*/, nil /*resolvedTypePredicate*/, minArgumentCount) return links.resolvedSignature } @@ -25062,9 +25108,8 @@ func (c *Checker) getOuterTypeParameters(node *ast.Node, includeThisTypes bool) ast.KindConditionalType: outerTypeParameters := c.getOuterTypeParameters(node, includeThisTypes) if (kind == ast.KindFunctionExpression || kind == ast.KindArrowFunction || ast.IsObjectLiteralMethod(node)) && c.isContextSensitive(node) { - signature := core.FirstOrNil(c.getSignaturesOfType(c.getTypeOfSymbol(c.getSymbolOfDeclaration(node)), SignatureKindCall)) - if signature != nil && len(signature.TypeParameters()) != 0 { - return append(outerTypeParameters, signature.TypeParameters()...) + if typeParameters := c.getSignatureFromDeclaration(node).TypeParameters(); len(typeParameters) != 0 { + return append(outerTypeParameters, typeParameters...) } } if kind == ast.KindMappedType { diff --git a/tsc/internal/checker/types.go b/tsc/internal/checker/types.go index 188f846e6bf1f..87e2bcdcda792 100644 --- a/tsc/internal/checker/types.go +++ b/tsc/internal/checker/types.go @@ -423,6 +423,7 @@ const ( NodeCheckFlagsNone NodeCheckFlags = 0 NodeCheckFlagsTypeChecked NodeCheckFlags = 1 << 0 // Node has been type checked NodeCheckFlagsContextChecked NodeCheckFlags = 1 << 6 // Contextual types have been assigned + NodeCheckFlagsSignatureContextChecked NodeCheckFlags = 1 << 7 // Signature of a contextually typed function has been checked NodeCheckFlagsEnumValuesComputed NodeCheckFlags = 1 << 10 // Values for enum members have been computed, and any errors have been reported for them. NodeCheckFlagsAssignmentsMarked NodeCheckFlags = 1 << 17 // Parameter assignments have been marked NodeCheckFlagsContainsClassWithPrivateIdentifiers NodeCheckFlags = 1 << 20 // Marked on all block-scoped containers containing a class with private identifiers. diff --git a/tsc/testdata/baselines/reference/compiler/checkIndexConstraintOfJavascriptClassExpression(checkorder=typesfirst).errors.txt b/tsc/testdata/baselines/reference/compiler/checkIndexConstraintOfJavascriptClassExpression(checkorder=typesfirst).errors.txt index a15bd4d38db0d..fa22beceb33e2 100644 --- a/tsc/testdata/baselines/reference/compiler/checkIndexConstraintOfJavascriptClassExpression(checkorder=typesfirst).errors.txt +++ b/tsc/testdata/baselines/reference/compiler/checkIndexConstraintOfJavascriptClassExpression(checkorder=typesfirst).errors.txt @@ -1,12 +1,15 @@ weird.js(1,1): error TS2552: Cannot find name 'someFunction'. Did you mean 'Function'? +weird.js(1,23): error TS7006: Parameter 'BaseClass' implicitly has an 'any' type. weird.js(9,17): error TS7006: Parameter 'error' implicitly has an 'any' type. -==== weird.js (2 errors) ==== +==== weird.js (3 errors) ==== someFunction(function(BaseClass) { ~~~~~~~~~~~~ !!! error TS2552: Cannot find name 'someFunction'. Did you mean 'Function'? !!! related TS2728 lib.es5.d.ts:--:--: 'Function' is declared here. + ~~~~~~~~~ +!!! error TS7006: Parameter 'BaseClass' implicitly has an 'any' type. 'use strict'; const DEFAULT_MESSAGE = "nop!"; class Hello extends BaseClass { diff --git a/tsc/testdata/baselines/reference/compiler/contextualOuterTypeParameters(checkorder=typesfirst).types b/tsc/testdata/baselines/reference/compiler/contextualOuterTypeParameters(checkorder=typesfirst).types index 280e75fb600cf..3be38bfec4e31 100644 --- a/tsc/testdata/baselines/reference/compiler/contextualOuterTypeParameters(checkorder=typesfirst).types +++ b/tsc/testdata/baselines/reference/compiler/contextualOuterTypeParameters(checkorder=typesfirst).types @@ -37,13 +37,13 @@ const fn1: (x: T) => void = t => { >t : T type isArray = (typeof t)[] extends string[] ? true : false; ->isArray : false +>isArray : T[] extends string[] ? true : false >t : T >true : true >false : false type IsObject = { x: typeof t } extends { x: string } ? true : false; ->IsObject : false +>IsObject : { x: typeof t; } extends { x: string; } ? true : false >x : T >t : T >x : string @@ -60,13 +60,13 @@ const fn2: (x: T) => void = function test(t) { >t : T type isArray = (typeof t)[] extends string[] ? true : false; ->isArray : false +>isArray : T[] extends string[] ? true : false >t : T >true : true >false : false type IsObject = { x: typeof t } extends { x: string } ? true : false; ->IsObject : false +>IsObject : { x: typeof t; } extends { x: string; } ? true : false >x : T >t : T >x : string @@ -86,13 +86,13 @@ const obj: { f: (x: T) => void } = { >t : T type isArray = (typeof t)[] extends string[] ? true : false; ->isArray : false +>isArray : T[] extends string[] ? true : false >t : T >true : true >false : false type IsObject = { x: typeof t } extends { x: string } ? true : false; ->IsObject : false +>IsObject : { x: typeof t; } extends { x: string; } ? true : false >x : T >t : T >x : string diff --git a/tsc/testdata/baselines/reference/compiler/contextualThisAssertionCheckOrder(checkorder=typesfirst).errors.txt b/tsc/testdata/baselines/reference/compiler/contextualThisAssertionCheckOrder(checkorder=typesfirst).errors.txt index 43249bea06a62..ecb3938461895 100644 --- a/tsc/testdata/baselines/reference/compiler/contextualThisAssertionCheckOrder(checkorder=typesfirst).errors.txt +++ b/tsc/testdata/baselines/reference/compiler/contextualThisAssertionCheckOrder(checkorder=typesfirst).errors.txt @@ -1,9 +1,7 @@ -contextualThisAssertionCheckOrder.ts(9,5): error TS2775: Assertions require every name in the call target to be declared with an explicit type annotation. -contextualThisAssertionCheckOrder.ts(10,11): error TS2322: Type 'boolean' is not assignable to type 'true'. contextualThisAssertionCheckOrder.ts(15,5): error TS7027: Unreachable code detected. -==== contextualThisAssertionCheckOrder.ts (3 errors) ==== +==== contextualThisAssertionCheckOrder.ts (1 errors) ==== // A function expression's this is typed contextually, and calling an // assertion or never-returning method through it narrows the same way // whether or not the types in the call were requested first (42175). @@ -13,11 +11,7 @@ contextualThisAssertionCheckOrder.ts(15,5): error TS7027: Unreachable code detec makeContextualThisParameter<{ assert(v: any): asserts v }>(function () { const v = Boolean(); this.assert(v); - ~~~~~~~~~~~ -!!! error TS2775: Assertions require every name in the call target to be declared with an explicit type annotation. const w: true = v; - ~ -!!! error TS2322: Type 'boolean' is not assignable to type 'true'. }); makeContextualThisParameter<{ returnNever(): never }>(function () { diff --git a/tsc/testdata/baselines/reference/compiler/contextualThisAssertionCheckOrder(checkorder=typesfirst).types b/tsc/testdata/baselines/reference/compiler/contextualThisAssertionCheckOrder(checkorder=typesfirst).types index 3629054e94f8e..e887d73dbdbfe 100644 --- a/tsc/testdata/baselines/reference/compiler/contextualThisAssertionCheckOrder(checkorder=typesfirst).types +++ b/tsc/testdata/baselines/reference/compiler/contextualThisAssertionCheckOrder(checkorder=typesfirst).types @@ -32,7 +32,7 @@ makeContextualThisParameter<{ assert(v: any): asserts v }>(function () { const w: true = v; >w : true >true : true ->v : boolean +>v : true }); diff --git a/tsc/testdata/baselines/reference/compiler/fallbackToBindingPatternForTypeInference(checkorder=typesfirst).errors.txt b/tsc/testdata/baselines/reference/compiler/fallbackToBindingPatternForTypeInference(checkorder=typesfirst).errors.txt index 37a59b2d11dea..9a04ca00910e5 100644 --- a/tsc/testdata/baselines/reference/compiler/fallbackToBindingPatternForTypeInference(checkorder=typesfirst).errors.txt +++ b/tsc/testdata/baselines/reference/compiler/fallbackToBindingPatternForTypeInference(checkorder=typesfirst).errors.txt @@ -1,7 +1,6 @@ fallbackToBindingPatternForTypeInference.ts(2,7): error TS2345: Argument of type '({ a }: { a: any; }) => any' is not assignable to parameter of type '(x: unknown) => string'. Types of parameters '__0' and 'x' are incompatible. Type 'unknown' is not assignable to type '{ a: any; }'. -fallbackToBindingPatternForTypeInference.ts(2,9): error TS2339: Property 'a' does not exist on type 'unknown'. fallbackToBindingPatternForTypeInference.ts(3,7): error TS2345: Argument of type '([b, c]: [any, any]) => string' is not assignable to parameter of type '(x: unknown) => string'. Types of parameters '__0' and 'x' are incompatible. Type 'unknown' is not assignable to type '[any, any]'. @@ -14,18 +13,15 @@ fallbackToBindingPatternForTypeInference.ts(5,7): error TS2345: Argument of type fallbackToBindingPatternForTypeInference.ts(6,7): error TS2345: Argument of type '({ a, b }: { a: any; b?: number | undefined; }) => any' is not assignable to parameter of type '(x: unknown) => string'. Types of parameters '__0' and 'x' are incompatible. Type 'unknown' is not assignable to type '{ a: any; b?: number | undefined; }'. -fallbackToBindingPatternForTypeInference.ts(6,9): error TS2339: Property 'a' does not exist on type 'unknown'. -==== fallbackToBindingPatternForTypeInference.ts (7 errors) ==== +==== fallbackToBindingPatternForTypeInference.ts (5 errors) ==== declare function trans(f: (x: T) => string): number; trans(({a}) => a); ~~~~~~~~~~ !!! error TS2345: Argument of type '({ a }: { a: any; }) => any' is not assignable to parameter of type '(x: unknown) => string'. !!! error TS2345: Types of parameters '__0' and 'x' are incompatible. !!! error TS2345: Type 'unknown' is not assignable to type '{ a: any; }'. - ~ -!!! error TS2339: Property 'a' does not exist on type 'unknown'. trans(([b,c]) => 'foo'); ~~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '([b, c]: [any, any]) => string' is not assignable to parameter of type '(x: unknown) => string'. @@ -46,6 +42,4 @@ fallbackToBindingPatternForTypeInference.ts(6,9): error TS2339: Property 'a' doe !!! error TS2345: Argument of type '({ a, b }: { a: any; b?: number | undefined; }) => any' is not assignable to parameter of type '(x: unknown) => string'. !!! error TS2345: Types of parameters '__0' and 'x' are incompatible. !!! error TS2345: Type 'unknown' is not assignable to type '{ a: any; b?: number | undefined; }'. - ~ -!!! error TS2339: Property 'a' does not exist on type 'unknown'. \ No newline at end of file diff --git a/tsc/testdata/baselines/reference/compiler/fixingTypeParametersRepeatedly2(checkorder=typesfirst).errors.txt b/tsc/testdata/baselines/reference/compiler/fixingTypeParametersRepeatedly2(checkorder=typesfirst).errors.txt index eaf9da009a413..29a93731f366b 100644 --- a/tsc/testdata/baselines/reference/compiler/fixingTypeParametersRepeatedly2(checkorder=typesfirst).errors.txt +++ b/tsc/testdata/baselines/reference/compiler/fixingTypeParametersRepeatedly2(checkorder=typesfirst).errors.txt @@ -1,9 +1,8 @@ fixingTypeParametersRepeatedly2.ts(11,32): error TS2741: Property 'toBase' is missing in type 'Base' but required in type 'Derived'. fixingTypeParametersRepeatedly2.ts(17,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'result' must be of type 'Derived', but here has type 'Base'. -fixingTypeParametersRepeatedly2.ts(17,34): error TS2339: Property 'toBase' does not exist on type 'Base'. -==== fixingTypeParametersRepeatedly2.ts (3 errors) ==== +==== fixingTypeParametersRepeatedly2.ts (2 errors) ==== interface Base { baseProp; } @@ -27,6 +26,4 @@ fixingTypeParametersRepeatedly2.ts(17,34): error TS2339: Property 'toBase' does var result = bar(derived, d => d.toBase()); ~~~~~~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'result' must be of type 'Derived', but here has type 'Base'. -!!! related TS6203 fixingTypeParametersRepeatedly2.ts:11:5: 'result' was also declared here. - ~~~~~~ -!!! error TS2339: Property 'toBase' does not exist on type 'Base'. \ No newline at end of file +!!! related TS6203 fixingTypeParametersRepeatedly2.ts:11:5: 'result' was also declared here. \ No newline at end of file diff --git a/tsc/testdata/baselines/reference/compiler/fixingTypeParametersRepeatedly2(checkorder=typesfirst).types b/tsc/testdata/baselines/reference/compiler/fixingTypeParametersRepeatedly2(checkorder=typesfirst).types index a94614635d95a..0a8fca14e9475 100644 --- a/tsc/testdata/baselines/reference/compiler/fixingTypeParametersRepeatedly2(checkorder=typesfirst).types +++ b/tsc/testdata/baselines/reference/compiler/fixingTypeParametersRepeatedly2(checkorder=typesfirst).types @@ -53,7 +53,7 @@ var result = bar(derived, d => d.toBase()); >d => d.toBase() : (d: Derived) => Base >d : Derived >d.toBase() : Base ->d.toBase : any +>d.toBase : () => Base >d : Derived ->toBase : any +>toBase : () => Base diff --git a/tsc/testdata/baselines/reference/compiler/jsElementAccessAssignmentChainCheckOrder(checkorder=default).errors.txt b/tsc/testdata/baselines/reference/compiler/jsElementAccessAssignmentChainCheckOrder(checkorder=default).errors.txt index 7f53be2113279..605eff5d20e25 100644 --- a/tsc/testdata/baselines/reference/compiler/jsElementAccessAssignmentChainCheckOrder(checkorder=default).errors.txt +++ b/tsc/testdata/baselines/reference/compiler/jsElementAccessAssignmentChainCheckOrder(checkorder=default).errors.txt @@ -1,9 +1,8 @@ bubble.js(11,11): error TS7022: 'iPixel' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. bubble.js(11,20): error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ skip: any; }'. -bubble.js(11,20): error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ skip: boolean; }'. -==== bubble.js (3 errors) ==== +==== bubble.js (2 errors) ==== // Each element access on the right of a chained assignment reports its // implicit any once, whichever of the assignments is typed first (64710, // 64849). @@ -19,8 +18,6 @@ bubble.js(11,20): error TS7053: Element implicitly has an 'any' type because exp !!! error TS7022: 'iPixel' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. ~~~~~~~~~~~~~~~~~ !!! error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ skip: any; }'. - ~~~~~~~~~~~~~~~~~ -!!! error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ skip: boolean; }'. const vPixel = properties[vAxis] = reset ? vScale.getBasePixel() : vScale.getPixelForValue(2); properties.skip = isNaN(iPixel) || isNaN(vPixel); } diff --git a/tsc/testdata/baselines/reference/compiler/jsElementAccessAssignmentChainCheckOrder(checkorder=editorfirst).errors.txt b/tsc/testdata/baselines/reference/compiler/jsElementAccessAssignmentChainCheckOrder(checkorder=editorfirst).errors.txt index 520bc9bbc12ca..661eed93a5963 100644 --- a/tsc/testdata/baselines/reference/compiler/jsElementAccessAssignmentChainCheckOrder(checkorder=editorfirst).errors.txt +++ b/tsc/testdata/baselines/reference/compiler/jsElementAccessAssignmentChainCheckOrder(checkorder=editorfirst).errors.txt @@ -1,6 +1,6 @@ bubble.js(11,11): error TS7022: 'iPixel' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. bubble.js(11,20): error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ skip: any; }'. -bubble.js(12,20): error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ skip: boolean; }'. +bubble.js(12,20): error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ skip: any; }'. ==== bubble.js (3 errors) ==== @@ -21,7 +21,7 @@ bubble.js(12,20): error TS7053: Element implicitly has an 'any' type because exp !!! error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ skip: any; }'. const vPixel = properties[vAxis] = reset ? vScale.getBasePixel() : vScale.getPixelForValue(2); ~~~~~~~~~~~~~~~~~ -!!! error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ skip: boolean; }'. +!!! error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ skip: any; }'. properties.skip = isNaN(iPixel) || isNaN(vPixel); } } diff --git a/tsc/testdata/baselines/reference/compiler/jsElementAccessAssignmentChainCheckOrder(checkorder=typesfirst).errors.txt b/tsc/testdata/baselines/reference/compiler/jsElementAccessAssignmentChainCheckOrder(checkorder=typesfirst).errors.txt index 9bba0e4f789fc..661eed93a5963 100644 --- a/tsc/testdata/baselines/reference/compiler/jsElementAccessAssignmentChainCheckOrder(checkorder=typesfirst).errors.txt +++ b/tsc/testdata/baselines/reference/compiler/jsElementAccessAssignmentChainCheckOrder(checkorder=typesfirst).errors.txt @@ -1,10 +1,9 @@ bubble.js(11,11): error TS7022: 'iPixel' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. bubble.js(11,20): error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ skip: any; }'. bubble.js(12,20): error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ skip: any; }'. -bubble.js(12,20): error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ skip: boolean; }'. -==== bubble.js (4 errors) ==== +==== bubble.js (3 errors) ==== // Each element access on the right of a chained assignment reports its // implicit any once, whichever of the assignments is typed first (64710, // 64849). @@ -23,8 +22,6 @@ bubble.js(12,20): error TS7053: Element implicitly has an 'any' type because exp const vPixel = properties[vAxis] = reset ? vScale.getBasePixel() : vScale.getPixelForValue(2); ~~~~~~~~~~~~~~~~~ !!! error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ skip: any; }'. - ~~~~~~~~~~~~~~~~~ -!!! error TS7053: Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ skip: boolean; }'. properties.skip = isNaN(iPixel) || isNaN(vPixel); } } diff --git a/tsc/testdata/baselines/reference/compiler/overloadresolutionWithConstraintCheckingDeferred(checkorder=typesfirst).errors.txt b/tsc/testdata/baselines/reference/compiler/overloadresolutionWithConstraintCheckingDeferred(checkorder=typesfirst).errors.txt index e93dbcc6cad6b..47be7df4a2a28 100644 --- a/tsc/testdata/baselines/reference/compiler/overloadresolutionWithConstraintCheckingDeferred(checkorder=typesfirst).errors.txt +++ b/tsc/testdata/baselines/reference/compiler/overloadresolutionWithConstraintCheckingDeferred(checkorder=typesfirst).errors.txt @@ -15,10 +15,11 @@ overloadresolutionWithConstraintCheckingDeferred.ts(18,27): error TS2769: No ove Argument of type '(x: D) => G' is not assignable to parameter of type '(x: B) => any'. Types of parameters 'x' and 'x' are incompatible. Property 'q' is missing in type 'B' but required in type 'D'. +overloadresolutionWithConstraintCheckingDeferred.ts(19,14): error TS2741: Property 'x' is missing in type 'D' but required in type 'A'. overloadresolutionWithConstraintCheckingDeferred.ts(19,32): error TS2741: Property 'x' is missing in type 'D' but required in type 'A'. -==== overloadresolutionWithConstraintCheckingDeferred.ts (6 errors) ==== +==== overloadresolutionWithConstraintCheckingDeferred.ts (7 errors) ==== interface A { x } interface B { x; y } interface C { z } @@ -68,6 +69,9 @@ overloadresolutionWithConstraintCheckingDeferred.ts(19,32): error TS2741: Proper !!! related TS2728 overloadresolutionWithConstraintCheckingDeferred.ts:4:15: 'q' is declared here. !!! related TS2771 overloadresolutionWithConstraintCheckingDeferred.ts:12:18: The last overload is declared here. var y: G = new G(x); // error that D does not satisfy constraint, y is of type G, entire call to foo is an error + ~~~~~~~~ +!!! error TS2741: Property 'x' is missing in type 'D' but required in type 'A'. +!!! related TS2728 overloadresolutionWithConstraintCheckingDeferred.ts:1:15: 'x' is declared here. ~ !!! error TS2741: Property 'x' is missing in type 'D' but required in type 'A'. !!! related TS2728 overloadresolutionWithConstraintCheckingDeferred.ts:1:15: 'x' is declared here. diff --git a/tsc/testdata/baselines/reference/compiler/overloadresolutionWithConstraintCheckingDeferred(checkorder=typesfirst).types b/tsc/testdata/baselines/reference/compiler/overloadresolutionWithConstraintCheckingDeferred(checkorder=typesfirst).types index 7eb08e3ac8acb..df9ec39e7e837 100644 --- a/tsc/testdata/baselines/reference/compiler/overloadresolutionWithConstraintCheckingDeferred(checkorder=typesfirst).types +++ b/tsc/testdata/baselines/reference/compiler/overloadresolutionWithConstraintCheckingDeferred(checkorder=typesfirst).types @@ -44,7 +44,7 @@ var result: number = foo(x => new G(x)); // x has type D, new G(x) fails, so fir >x : D >new G(x) : G >G : typeof G ->x : any +>x : D var result2: number = foo(x => new G(x)); // x has type D, new G(x) fails, so first overload is picked. >result2 : number @@ -55,7 +55,7 @@ var result2: number = foo(x => new G(x)); // x has type D, new G(x) fa >new G(x) : G >G : typeof G >x : D ->x : any +>x : D var result3: string = foo(x => { // x has type D >result3 : string @@ -72,7 +72,7 @@ var result3: string = foo(x => { // x has type D >x : D return y; ->y : G +>y : G }); diff --git a/tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-with-multiple-files-and-complex-types.js b/tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-with-multiple-files-and-complex-types.js index 7df0ebeba39e1..deba75ba4156b 100644 --- a/tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-with-multiple-files-and-complex-types.js +++ b/tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-with-multiple-files-and-complex-types.js @@ -212,12 +212,12 @@ declare const console: { log(msg: any): void; }; {"id":102,"symbolName":"map","recursionId":92,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":5},"end":{"line":3,"character":43}},"flags":["Object"],"display":"(fn: (x: T) => U) => Container"}, {"id":103,"symbolName":"map","recursionId":92,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":5},"end":{"line":3,"character":43}},"flags":["Object"],"display":"(fn: (x: number) => U) => Container"}, {"id":104,"symbolName":"U","recursionId":84,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":9},"end":{"line":3,"character":10}},"flags":["TypeParameter"]}, -{"id":105,"symbolName":"__function","recursionId":93,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":2,"character":48},"end":{"line":2,"character":87}},"flags":["Object"],"display":"(fn: (x: number) => U) => { value: U; map: (fn: (x: number) => U) => Container; }"}, -{"id":106,"symbolName":"__type","recursionId":85,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":16},"end":{"line":3,"character":27}},"flags":["Object"],"display":"(x: number) => U"}, -{"id":107,"symbolName":"Container","recursionId":83,"instantiatedType":91,"typeArguments":[104],"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":1,"character":1},"end":{"line":4,"character":2}},"flags":["Object"]}, -{"id":108,"symbolName":"map","recursionId":92,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":5},"end":{"line":3,"character":43}},"flags":["Object"],"display":"(fn: (x: U) => U) => Container"}, +{"id":105,"symbolName":"__type","recursionId":85,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":16},"end":{"line":3,"character":27}},"flags":["Object"],"display":"(x: number) => U"}, +{"id":106,"symbolName":"Container","recursionId":83,"instantiatedType":91,"typeArguments":[104],"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":1,"character":1},"end":{"line":4,"character":2}},"flags":["Object"]}, +{"id":107,"symbolName":"map","recursionId":92,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":5},"end":{"line":3,"character":43}},"flags":["Object"],"display":"(fn: (x: U) => U) => Container"}, +{"id":108,"symbolName":"__object","recursionId":93,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":2,"character":57},"end":{"line":2,"character":86}},"flags":["Object"],"display":"{ value: U; map: (fn: (x: number) => U) => Container; }"}, {"id":109,"symbolName":"__object","recursionId":94,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":2,"character":57},"end":{"line":2,"character":86}},"flags":["Object"],"display":"{ value: U; map: (fn: (x: number) => U) => Container; }"}, -{"id":110,"symbolName":"__object","recursionId":95,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":2,"character":57},"end":{"line":2,"character":86}},"flags":["Object"],"display":"{ value: U; map: (fn: (x: number) => U) => Container; }"}, +{"id":110,"symbolName":"__function","recursionId":95,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":2,"character":48},"end":{"line":2,"character":87}},"flags":["Object"],"display":"(fn: (x: number) => U) => { value: U; map: (fn: (x: number) => U) => Container; }"}, {"id":111,"symbolName":"__object","recursionId":96,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":2,"character":30},"end":{"line":2,"character":89}},"flags":["Object"],"display":"{ value: number; map: (fn: (x: number) => U) => { value: U; map: (fn: (x: number) => U) => Container; }; }"}, {"id":112,"symbolName":"U","recursionId":84,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":9},"end":{"line":3,"character":10}},"flags":["TypeParameter"]}, {"id":113,"symbolName":"__type","recursionId":85,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":16},"end":{"line":3,"character":27}},"flags":["Object"],"display":"(x: number) => any"}, From 7c09d4116a319895bd1b60d32ed1979fd10c0a10 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 19 Oct 2026 05:15:56 -0700 Subject: [PATCH 04/29] Resolve calls in source order and locate their errors at the call 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 --- tsc/internal/checker/checker.go | 87 +++++++++++++++++++ ...eNoCrash(checkorder=typesfirst).errors.txt | 7 +- ...eckOrder(checkorder=typesfirst).errors.txt | 13 ++- ...assCheckOrder(checkorder=typesfirst).types | 4 +- 4 files changed, 103 insertions(+), 8 deletions(-) diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index 62f4b1a6f5666..9629a2487b302 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -8668,6 +8668,68 @@ func (c *Checker) isSymbolOrSymbolForCall(node *ast.Node) bool { return globalESSymbol == c.resolveName(left, "Symbol", ast.SymbolFlagsValue, nil /*nameNotFoundMessage*/, false /*isUse*/, false) } +// isContextuallyTypedByEnclosingCall reports whether the contextual type of +// an expression may come from an argument of an enclosing call. Other +// contexts are not resolved ahead of the expression, since computing them +// may evaluate expressions that checking only evaluates otherwise, such as +// the target of a destructuring assignment. +func isContextuallyTypedByEnclosingCall(node *ast.Node) bool { + for { + parent := node.Parent + switch parent.Kind { + case ast.KindCallExpression, ast.KindNewExpression: + return node != parent.Expression() + case ast.KindTemplateSpan: + // A substitution of a tagged template is an argument of its tag. + return ast.IsTaggedTemplateExpression(parent.Parent.Parent) + case ast.KindJsxOpeningElement, ast.KindJsxSelfClosingElement: + // The attributes are the argument of the element. + return true + case ast.KindJsxElement: + if node == parent.AsJsxElement().OpeningElement { + node = parent + continue + } + // A child is part of the attributes of the element. + return true + case ast.KindParenthesizedExpression, ast.KindNonNullExpression, ast.KindSpreadElement, ast.KindArrayLiteralExpression, + ast.KindObjectLiteralExpression, ast.KindPropertyAssignment, ast.KindSpreadAssignment, ast.KindAwaitExpression, + ast.KindJsxExpression, ast.KindJsxAttribute, ast.KindJsxSpreadAttribute, ast.KindJsxAttributes: + node = parent + continue + case ast.KindAsExpression, ast.KindTypeAssertionExpression: + if !ast.IsConstAssertion(parent) { + return false + } + case ast.KindConditionalExpression: + if node == parent.AsConditionalExpression().Condition { + return false + } + case ast.KindBinaryExpression: + switch parent.AsBinaryExpression().OperatorToken.Kind { + case ast.KindBarBarToken, ast.KindAmpersandAmpersandToken, ast.KindQuestionQuestionToken, ast.KindCommaToken: + if node != parent.AsBinaryExpression().Right { + return false + } + default: + return false + } + case ast.KindArrowFunction: + if node != parent.Body() { + return false + } + case ast.KindReturnStatement, ast.KindYieldExpression: + parent = ast.GetContainingFunction(parent) + if parent == nil || !ast.IsFunctionExpressionOrArrowFunction(parent) { + return false + } + default: + return false + } + node = parent + } +} + /** * Resolve a signature of a given call-like expression. * @param node a call-like expression to try resolve a signature for @@ -8676,6 +8738,17 @@ func (c *Checker) isSymbolOrSymbolForCall(node *ast.Node) bool { * @return a signature of the call-like expression or undefined if one can't be found */ func (c *Checker) getResolvedSignature(node *ast.Node, candidatesOutArray *[]*Signature, checkMode CheckMode) *Signature { + // Resolution is located at the call however it was requested, such as + // from contextually typing an argument, so that errors it reports at the + // current node do not depend on which was checked first. + saveCurrentNode := c.currentNode + c.currentNode = node + result := c.resolveSignatureOfCall(node, candidatesOutArray, checkMode) + c.currentNode = saveCurrentNode + return result +} + +func (c *Checker) resolveSignatureOfCall(node *ast.Node, candidatesOutArray *[]*Signature, checkMode CheckMode) *Signature { links := c.signatureLinks.Get(node) // If getResolvedSignature has already been called, we will have cached the resolvedSignature. // However, it is possible that either candidatesOutArray was not passed in the first time, @@ -8685,6 +8758,20 @@ func (c *Checker) getResolvedSignature(node *ast.Node, candidatesOutArray *[]*Si if cached != nil && cached != c.resolvingSignature && candidatesOutArray == nil { return cached } + if cached == nil { + // Resolve an enclosing call providing the contextual type of this one + // first, as checking in source order would. The enclosing call may also + // type parameters this call references. Resolved from within this call + // instead, the enclosing call sees this one marked as resolving, and + // the result depends on which call was queried first. + if (ast.IsCallExpression(node) || ast.IsNewExpression(node) || ast.IsTaggedTemplateExpression(node) || ast.IsJsxOpeningLikeElement(node)) && isContextuallyTypedByEnclosingCall(node) { + c.getContextualType(node, ContextFlagsNone) + } + cached = links.resolvedSignature + if cached != nil && cached != c.resolvingSignature && candidatesOutArray == nil { + return cached + } + } saveResolutionStart := c.resolutionStart if cached == nil { // If we haven't already done so, temporarily reset the resolution stack. This allows us to diff --git a/tsc/testdata/baselines/reference/compiler/circularInlineMappedGenericTupleTypeNoCrash(checkorder=typesfirst).errors.txt b/tsc/testdata/baselines/reference/compiler/circularInlineMappedGenericTupleTypeNoCrash(checkorder=typesfirst).errors.txt index e78f397fc931f..8d568d19a5373 100644 --- a/tsc/testdata/baselines/reference/compiler/circularInlineMappedGenericTupleTypeNoCrash(checkorder=typesfirst).errors.txt +++ b/tsc/testdata/baselines/reference/compiler/circularInlineMappedGenericTupleTypeNoCrash(checkorder=typesfirst).errors.txt @@ -1,8 +1,7 @@ -error TS2589: Type instantiation is excessively deep and possibly infinite. +circularInlineMappedGenericTupleTypeNoCrash.ts(11,12): error TS2589: Type instantiation is excessively deep and possibly infinite. -!!! error TS2589: Type instantiation is excessively deep and possibly infinite. -==== circularInlineMappedGenericTupleTypeNoCrash.ts (0 errors) ==== +==== circularInlineMappedGenericTupleTypeNoCrash.ts (1 errors) ==== class Foo { public readonly elements: { [P in keyof Elements]: { bar: Elements[P] } }; @@ -14,6 +13,8 @@ error TS2589: Type instantiation is excessively deep and possibly infinite. public add(): Foo<[...Elements, "abc"]> { return new Foo<[...Elements, "abc"]>(...this.elements, { bar: "abc" }); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2589: Type instantiation is excessively deep and possibly infinite. } } \ No newline at end of file diff --git a/tsc/testdata/baselines/reference/compiler/mixinMethodsReferringToAppliedClassCheckOrder(checkorder=typesfirst).errors.txt b/tsc/testdata/baselines/reference/compiler/mixinMethodsReferringToAppliedClassCheckOrder(checkorder=typesfirst).errors.txt index 07c9bf3cefd3a..47ee86b9b2ffc 100644 --- a/tsc/testdata/baselines/reference/compiler/mixinMethodsReferringToAppliedClassCheckOrder(checkorder=typesfirst).errors.txt +++ b/tsc/testdata/baselines/reference/compiler/mixinMethodsReferringToAppliedClassCheckOrder(checkorder=typesfirst).errors.txt @@ -1,4 +1,7 @@ -mixinMethodsReferringToAppliedClassCheckOrder.ts(31,28): error TS2507: Type 'never' is not a constructor function type. +mixinMethodsReferringToAppliedClassCheckOrder.ts(31,7): error TS2417: Class static side 'typeof MixinApplied' incorrectly extends base class static side '{ prototype: (Anonymous function).Mixin2; } & { prototype: (Anonymous function).Mixin; }'. + Types of property 'prototype' are incompatible. + Type 'MixinApplied' is not assignable to type '(Anonymous function).Mixin2 & (Anonymous function).Mixin'. + Property 'bar' is missing in type 'MixinApplied' but required in type '(Anonymous function).Mixin2'. ==== mixinMethodsReferringToAppliedClassCheckOrder.ts (1 errors) ==== @@ -33,6 +36,10 @@ mixinMethodsReferringToAppliedClassCheckOrder.ts(31,28): error TS2507: Type 'nev }) class MixinApplied extends Mixin2F(MixinF()) {} - ~~~~~~~~~~~~~~~~~ -!!! error TS2507: Type 'never' is not a constructor function type. + ~~~~~~~~~~~~ +!!! error TS2417: Class static side 'typeof MixinApplied' incorrectly extends base class static side '{ prototype: (Anonymous function).Mixin2; } & { prototype: (Anonymous function).Mixin; }'. +!!! error TS2417: Types of property 'prototype' are incompatible. +!!! error TS2417: Type 'MixinApplied' is not assignable to type '(Anonymous function).Mixin2 & (Anonymous function).Mixin'. +!!! error TS2417: Property 'bar' is missing in type 'MixinApplied' but required in type '(Anonymous function).Mixin2'. +!!! related TS2728 mixinMethodsReferringToAppliedClassCheckOrder.ts:26:5: 'bar' is declared here. \ No newline at end of file diff --git a/tsc/testdata/baselines/reference/compiler/mixinMethodsReferringToAppliedClassCheckOrder(checkorder=typesfirst).types b/tsc/testdata/baselines/reference/compiler/mixinMethodsReferringToAppliedClassCheckOrder(checkorder=typesfirst).types index e17df722dc992..337a11c28ca64 100644 --- a/tsc/testdata/baselines/reference/compiler/mixinMethodsReferringToAppliedClassCheckOrder(checkorder=typesfirst).types +++ b/tsc/testdata/baselines/reference/compiler/mixinMethodsReferringToAppliedClassCheckOrder(checkorder=typesfirst).types @@ -83,8 +83,8 @@ const Mixin2F = makeMixin(>(Base: TBase) => { class MixinApplied extends Mixin2F(MixinF()) {} >MixinApplied : MixinApplied ->Mixin2F(MixinF()) : never +>Mixin2F(MixinF()) : ((abstract new (...args: any[]) => (Anonymous function).Mixin2) & { prototype: (Anonymous function).Mixin2; }) & ((abstract new (...args: any[]) => (Anonymous function).Mixin) & { prototype: (Anonymous function).Mixin; }) & ConstructorType >Mixin2F : >(Base?: TBase | undefined) => ((abstract new (...args: any[]) => Mixin2) & { prototype: (Anonymous function).Mixin2; }) & TBase ->MixinF() : never +>MixinF() : ((abstract new (...args: any[]) => (Anonymous function).Mixin) & { prototype: (Anonymous function).Mixin; }) & ConstructorType >MixinF : >(Base?: TBase | undefined) => ((abstract new (...args: any[]) => Mixin) & { prototype: (Anonymous function).Mixin; }) & TBase From 6acb8385fc6058288737f9d8e24352f358932e8f Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 19 Oct 2026 05:18:04 -0700 Subject: [PATCH 05/29] Do not cache results that depend on who asked first 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. --- tsc/internal/checker/checker.go | 47 +++++++++++++------ ...ckorder=typesfirst,strict=true).errors.txt | 8 +--- ...acheReuseAfterMappedTypeApplication1.types | 8 ++-- 3 files changed, 38 insertions(+), 25 deletions(-) diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index 9629a2487b302..7909a58a34c34 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -17232,7 +17232,7 @@ func (c *Checker) GetTypeOfSymbolAtLocation(symbol *ast.Symbol, location *ast.No } else { t = c.getTypeOfExpression(location) } - if c.getExportSymbolOfValueSymbolIfExported(c.symbolNodeLinks.Get(location).resolvedSymbol) == symbol { + if c.getExportSymbolOfValueSymbolIfExported(c.resolvedSymbolAtLocation(location, symbol)) == symbol { return c.removeOptionalTypeMarker(t) } } @@ -17252,6 +17252,18 @@ func (c *Checker) GetTypeOfSymbolAtLocation(symbol *ast.Symbol, location *ast.No return c.getNonMissingTypeOfSymbol(symbol) } +// resolvedSymbolAtLocation returns the symbol that the checked expression at +// location resolved to. Index symbols are not cached in links (see +// getSymbolOfNameOrPropertyAccessExpression), so an access that resolved to +// none is matched against the index signature it would use. +func (c *Checker) resolvedSymbolAtLocation(location *ast.Node, symbol *ast.Symbol) *ast.Symbol { + resolved := c.symbolNodeLinks.Get(location).resolvedSymbol + if resolved == nil && symbol.CheckFlags()&ast.CheckFlagsIndexSymbol != 0 && ast.IsPropertyAccessExpression(location) && !ast.IsPrivateIdentifier(location.Name()) { + resolved = c.getApplicableIndexSymbol(c.checkExpressionCached(location.Expression()), c.getLiteralTypeFromPropertyName(location.Name())) + } + return resolved +} + func (c *Checker) getTypeOfSymbol(symbol *ast.Symbol) *Type { if symbol.CheckFlags()&ast.CheckFlagsDeferredType != 0 { return c.getTypeOfSymbolWithDeferredType(symbol) @@ -23674,6 +23686,22 @@ func (c *Checker) getObjectTypeInstantiation(t *Type, m *TypeMapper, alias *Type if newAlias == nil { newAlias = c.instantiateTypeAlias(t.alias, m) } + instantiate := func(newMapper *TypeMapper) *Type { + switch { + case target.objectFlags&ObjectFlagsReference != 0: + return c.createDeferredTypeReference(t.Target(), t.AsTypeReference().node, newMapper, newAlias) + case target.objectFlags&ObjectFlagsMapped != 0: + return c.instantiateMappedType(target, typeParameters, newMapper, newAlias) + default: + return c.instantiateAnonymousType(target, newMapper, newAlias) + } + } + if target.objectFlags&ObjectFlagsSingleSignatureType != 0 && m != nil { + // The signature may reference type parameters other than the outer + // type parameters of its declaration, so the instantiation is not + // determined by the type arguments and cannot be cached by them. + return instantiate(c.combineTypeMappers(newTypeMapper(typeParameters, typeArguments), m)) + } data := target.AsObjectType() key := getTypeInstantiationKey(typeArguments, newAlias, t.objectFlags&ObjectFlagsSingleSignatureType != 0) if data.instantiations == nil { @@ -23687,18 +23715,7 @@ func (c *Checker) getObjectTypeInstantiation(t *Type, m *TypeMapper, alias *Type } result := data.instantiations[key] if result == nil { - newMapper := newTypeMapper(typeParameters, typeArguments) - if target.objectFlags&ObjectFlagsSingleSignatureType != 0 && m != nil { - newMapper = c.combineTypeMappers(newMapper, m) - } - switch { - case target.objectFlags&ObjectFlagsReference != 0: - result = c.createDeferredTypeReference(t.Target(), t.AsTypeReference().node, newMapper, newAlias) - case target.objectFlags&ObjectFlagsMapped != 0: - result = c.instantiateMappedType(target, typeParameters, newMapper, newAlias) - default: - result = c.instantiateAnonymousType(target, newMapper, newAlias) - } + result = instantiate(newTypeMapper(typeParameters, typeArguments)) data.instantiations[key] = result if result.flags&TypeFlagsObjectFlagsType != 0 && result.objectFlags&ObjectFlagsCouldContainTypeVariablesComputed == 0 { // if `result` is one of the object types we tried to make (it may not be, due to how `instantiateMappedType` works), we can carry forward the type variable containment check from the input type arguments @@ -33521,7 +33538,9 @@ func (c *Checker) getSymbolOfNameOrPropertyAccessExpression(name *ast.Node) *ast if ast.IsPropertyAccessExpression(name) { c.checkPropertyAccessExpression(name, CheckModeNormal, false /*writeOnly*/) if links.resolvedSymbol == nil && !ast.IsPrivateIdentifier(name.Name()) { - links.resolvedSymbol = c.getApplicableIndexSymbol( + // Not cached in links, where checking would observe it as the + // property the access resolved to. + return c.getApplicableIndexSymbol( c.checkExpressionCached(name.Expression()), c.getLiteralTypeFromPropertyName(name.Name()), ) diff --git a/tsc/testdata/baselines/reference/compiler/deleteExpressionMustBeOptional(checkorder=typesfirst,strict=true).errors.txt b/tsc/testdata/baselines/reference/compiler/deleteExpressionMustBeOptional(checkorder=typesfirst,strict=true).errors.txt index d3c1fd53cc93f..f3abcf0386f5b 100644 --- a/tsc/testdata/baselines/reference/compiler/deleteExpressionMustBeOptional(checkorder=typesfirst,strict=true).errors.txt +++ b/tsc/testdata/baselines/reference/compiler/deleteExpressionMustBeOptional(checkorder=typesfirst,strict=true).errors.txt @@ -1,11 +1,9 @@ deleteExpressionMustBeOptional.ts(25,8): error TS2790: The operand of a 'delete' operator must be optional. deleteExpressionMustBeOptional.ts(27,8): error TS2790: The operand of a 'delete' operator must be optional. deleteExpressionMustBeOptional.ts(34,10): error TS2339: Property 'j' does not exist on type 'Foo'. -deleteExpressionMustBeOptional.ts(36,8): error TS2790: The operand of a 'delete' operator must be optional. -deleteExpressionMustBeOptional.ts(37,8): error TS2790: The operand of a 'delete' operator must be optional. -==== deleteExpressionMustBeOptional.ts (5 errors) ==== +==== deleteExpressionMustBeOptional.ts (3 errors) ==== interface Foo { a: number b: number | undefined @@ -48,11 +46,7 @@ deleteExpressionMustBeOptional.ts(37,8): error TS2790: The operand of a 'delete' !!! error TS2339: Property 'j' does not exist on type 'Foo'. delete a.a - ~~~ -!!! error TS2790: The operand of a 'delete' operator must be optional. delete a.b - ~~~ -!!! error TS2790: The operand of a 'delete' operator must be optional. delete b.a delete b.b diff --git a/tsc/testdata/baselines/reference/compiler/genericCallInferenceUsingThisTypeNoInvalidCacheReuseAfterMappedTypeApplication1.types b/tsc/testdata/baselines/reference/compiler/genericCallInferenceUsingThisTypeNoInvalidCacheReuseAfterMappedTypeApplication1.types index c6a517dc1a0c3..63ccf34626aea 100644 --- a/tsc/testdata/baselines/reference/compiler/genericCallInferenceUsingThisTypeNoInvalidCacheReuseAfterMappedTypeApplication1.types +++ b/tsc/testdata/baselines/reference/compiler/genericCallInferenceUsingThisTypeNoInvalidCacheReuseAfterMappedTypeApplication1.types @@ -92,10 +92,10 @@ export const a = inner.log(100); // Effect<100, never, never> >100 : 100 export const b = outer.log(100); // Effect<100, never, XXX> ->b : Effect<100, never, never> ->outer.log(100) : Effect<100, never, never> ->outer.log : (n: N) => Effect +>b : Effect<100, never, XXX> +>outer.log(100) : Effect<100, never, XXX> +>outer.log : (n: N) => Effect >outer : ProxyMap ->log : (n: N) => Effect +>log : (n: N) => Effect >100 : 100 From f5293bccdb270e03655298756c1cc2f17118e61a Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 19 Oct 2026 09:25:26 -0700 Subject: [PATCH 06/29] Report unresolved names after resolution completes 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. --- tsc/internal/checker/checker.go | 11 +++++++++++ ...arationEmitUnknownImport(target=es2015).errors.txt | 10 ++-------- ...rationEmitUnknownImport2(target=es2015).errors.txt | 10 ++-------- ...FlakyDiagnosticsSpellingSuggestionOrder.errors.txt | 4 ++-- .../noFlakyDiagnosticsSpellingSuggestionOrder.types | 2 +- 5 files changed, 18 insertions(+), 19 deletions(-) diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index 7909a58a34c34..e3e93396a464d 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -1670,6 +1670,17 @@ func (c *Checker) checkAndReportErrorForMissingPrefix(errorLocation *ast.Node, n } func (c *Checker) onFailedToResolveSymbol(errorLocation *ast.Node, name string, meaning ast.SymbolFlags, nameNotFoundMessage *diagnostics.Message) { + // Explaining the failure looks up other symbols, for example to suggest a + // spelling, which can resolve aliases. Doing that in the middle of the + // resolution that failed would make the explanation, and any circularity + // errors it causes, depend on what else happened to be in progress. Defer + // it until no resolution is in progress, so it only observes results. + c.addDeferredDiagnostic(func() { + c.reportFailedToResolveSymbol(errorLocation, name, meaning, nameNotFoundMessage) + }) +} + +func (c *Checker) reportFailedToResolveSymbol(errorLocation *ast.Node, name string, meaning ast.SymbolFlags, nameNotFoundMessage *diagnostics.Message) { // The `const` in a `const` assertion (`x as const`) is a syntactic marker, not a real // type reference, and must never be resolved or reported as an unresolvable name. if isConstTypeReferenceName(errorLocation) { diff --git a/tsc/testdata/baselines/reference/compiler/declarationEmitUnknownImport(target=es2015).errors.txt b/tsc/testdata/baselines/reference/compiler/declarationEmitUnknownImport(target=es2015).errors.txt index 1826289e03769..512f22fa8a9b6 100644 --- a/tsc/testdata/baselines/reference/compiler/declarationEmitUnknownImport(target=es2015).errors.txt +++ b/tsc/testdata/baselines/reference/compiler/declarationEmitUnknownImport(target=es2015).errors.txt @@ -1,17 +1,11 @@ -declarationEmitUnknownImport.ts(1,1): error TS2303: Circular definition of import alias 'Foo'. declarationEmitUnknownImport.ts(1,14): error TS2304: Cannot find name 'SomeNonExistingName'. declarationEmitUnknownImport.ts(1,14): error TS2503: Cannot find namespace 'SomeNonExistingName'. -declarationEmitUnknownImport.ts(2,9): error TS2303: Circular definition of import alias 'Foo'. -==== declarationEmitUnknownImport.ts (4 errors) ==== +==== declarationEmitUnknownImport.ts (2 errors) ==== import Foo = SomeNonExistingName - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2303: Circular definition of import alias 'Foo'. ~~~~~~~~~~~~~~~~~~~ !!! error TS2304: Cannot find name 'SomeNonExistingName'. ~~~~~~~~~~~~~~~~~~~ !!! error TS2503: Cannot find namespace 'SomeNonExistingName'. - export {Foo} - ~~~ -!!! error TS2303: Circular definition of import alias 'Foo'. \ No newline at end of file + export {Foo} \ No newline at end of file diff --git a/tsc/testdata/baselines/reference/compiler/declarationEmitUnknownImport2(target=es2015).errors.txt b/tsc/testdata/baselines/reference/compiler/declarationEmitUnknownImport2(target=es2015).errors.txt index f52b6fd9af9fc..07239f7d2748f 100644 --- a/tsc/testdata/baselines/reference/compiler/declarationEmitUnknownImport2(target=es2015).errors.txt +++ b/tsc/testdata/baselines/reference/compiler/declarationEmitUnknownImport2(target=es2015).errors.txt @@ -1,15 +1,11 @@ -declarationEmitUnknownImport2.ts(1,1): error TS2303: Circular definition of import alias 'Foo'. declarationEmitUnknownImport2.ts(1,12): error TS1005: '=' expected. declarationEmitUnknownImport2.ts(1,12): error TS2304: Cannot find name 'From'. declarationEmitUnknownImport2.ts(1,12): error TS2503: Cannot find namespace 'From'. declarationEmitUnknownImport2.ts(1,17): error TS1005: ';' expected. -declarationEmitUnknownImport2.ts(2,1): error TS2303: Circular definition of import alias 'Foo'. -==== declarationEmitUnknownImport2.ts (6 errors) ==== +==== declarationEmitUnknownImport2.ts (4 errors) ==== import Foo From './Foo'; // Syntax error - ~~~~~~~~~~~~~~~ -!!! error TS2303: Circular definition of import alias 'Foo'. ~~~~ !!! error TS1005: '=' expected. ~~~~ @@ -18,6 +14,4 @@ declarationEmitUnknownImport2.ts(2,1): error TS2303: Circular definition of impo !!! error TS2503: Cannot find namespace 'From'. ~~~~~~~ !!! error TS1005: ';' expected. - export default Foo - ~~~~~~~~~~~~~~~~~~ -!!! error TS2303: Circular definition of import alias 'Foo'. \ No newline at end of file + export default Foo \ No newline at end of file diff --git a/tsc/testdata/baselines/reference/compiler/noFlakyDiagnosticsSpellingSuggestionOrder.errors.txt b/tsc/testdata/baselines/reference/compiler/noFlakyDiagnosticsSpellingSuggestionOrder.errors.txt index d8667784e78ea..a0a32ab10d645 100644 --- a/tsc/testdata/baselines/reference/compiler/noFlakyDiagnosticsSpellingSuggestionOrder.errors.txt +++ b/tsc/testdata/baselines/reference/compiler/noFlakyDiagnosticsSpellingSuggestionOrder.errors.txt @@ -1,6 +1,6 @@ /main.ts(17,11): error TS2304: Cannot find name 'zz'. /main.ts(18,7): error TS2322: Type '{ pb: 0; readonly mb: 1; v: 0; }' is not assignable to type 'never'. -/main.ts(19,7): error TS2322: Type '{ v: 0; }' is not assignable to type 'never'. +/main.ts(19,7): error TS2322: Type '{ pa: 0; readonly ma: 1; v: 0; }' is not assignable to type 'never'. ==== /main.ts (3 errors) ==== @@ -28,7 +28,7 @@ !!! error TS2322: Type '{ pb: 0; readonly mb: 1; v: 0; }' is not assignable to type 'never'. const obsB: never = expand(); ~~~~ -!!! error TS2322: Type '{ v: 0; }' is not assignable to type 'never'. +!!! error TS2322: Type '{ pa: 0; readonly ma: 1; v: 0; }' is not assignable to type 'never'. ==== /ambient.d.ts (0 errors) ==== declare module "ma" { diff --git a/tsc/testdata/baselines/reference/compiler/noFlakyDiagnosticsSpellingSuggestionOrder.types b/tsc/testdata/baselines/reference/compiler/noFlakyDiagnosticsSpellingSuggestionOrder.types index 0c8a7c9521634..68af529e6dd8b 100644 --- a/tsc/testdata/baselines/reference/compiler/noFlakyDiagnosticsSpellingSuggestionOrder.types +++ b/tsc/testdata/baselines/reference/compiler/noFlakyDiagnosticsSpellingSuggestionOrder.types @@ -35,7 +35,7 @@ const obsA: never = expand(); const obsB: never = expand(); >obsB : never ->expand() : { v: 0; } +>expand() : { pa: 0; readonly ma: 1; v: 0; } >expand : () => { [K in keyof X]: X[K]; } >oxb : O From eb3f303c6ca2858df5306059e5991a81bb2fd050 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sun, 18 Oct 2026 20:58:18 -0700 Subject: [PATCH 07/29] Make flow analysis of a reference independent of other references 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. --- tsc/internal/checker/checker.go | 9 +- tsc/internal/checker/flow.go | 18 +- ...ckCircularity(checkorder=typesfirst).types | 2 +- ...pthCheckOrder(checkorder=typesfirst).types | 2020 ++++----- ...ooDeepCheckOrder(checkorder=default).types | 2002 ++++----- ...eepCheckOrder(checkorder=typesfirst).types | 2000 ++++----- .../compiler/largeControlFlowGraph.types | 4000 ++++++++--------- ...dNeverAfterLoopWithAndCondition.errors.txt | 6 +- 8 files changed, 5027 insertions(+), 5030 deletions(-) diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index e3e93396a464d..ef05cba33c95f 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -860,7 +860,6 @@ type Checker struct { flowLoopStack []FlowLoopInfo sharedFlows []SharedFlow antecedentTypes []*Type - flowAnalysisDisabled bool flowInvocationCount int flowTypeCache map[*ast.Node]*Type lastFlowNode *ast.FlowNode @@ -3895,13 +3894,7 @@ func (c *Checker) checkBlock(node *ast.Node) { if node.Kind == ast.KindBlock { c.checkGrammarStatementInAmbientContext(node) } - if ast.IsFunctionOrModuleBlock(node) { - saveFlowAnalysisDisabled := c.flowAnalysisDisabled - c.checkSourceElements(node.Statements()) - c.flowAnalysisDisabled = saveFlowAnalysisDisabled - } else { - c.checkSourceElements(node.Statements()) - } + c.checkSourceElements(node.Statements()) if node.Locals().Len() != 0 { c.registerForUnusedIdentifiersCheck(node) } diff --git a/tsc/internal/checker/flow.go b/tsc/internal/checker/flow.go index 8d14ca5258079..50fdea5bbb724 100644 --- a/tsc/internal/checker/flow.go +++ b/tsc/internal/checker/flow.go @@ -79,9 +79,6 @@ func (c *Checker) getFlowTypeOfReference(reference *ast.Node, declaredType *Type } func (c *Checker) getFlowTypeOfReferenceEx(reference *ast.Node, declaredType *Type, initialType *Type, flowContainer *ast.Node, flowNode *ast.FlowNode) *Type { - if c.flowAnalysisDisabled { - return c.errorType - } if flowNode == nil { flowNode = getFlowNodeOfNode(reference) if flowNode == nil { @@ -117,11 +114,11 @@ func (c *Checker) getFlowTypeOfReferenceEx(reference *ast.Node, declaredType *Ty func (c *Checker) getTypeAtFlowNode(f *FlowState, flow *ast.FlowNode) FlowType { if f.depth == 2000 { // We have made 2000 recursive invocations. To avoid overflowing the call stack we report an error - // and disable further control flow analysis in the containing function or module body. + // and give up on this reference. Each reference hits the limit on its own, so its type does not depend + // on which other references were analyzed first. if tr := c.tracer; tr != nil { tr.Instant(tracing.PhaseCheckTypes, "getTypeAtFlowNode_DepthLimit", map[string]any{"depth": f.depth}) } - c.flowAnalysisDisabled = true c.reportFlowControlError(f.reference) return FlowType{t: c.errorType} } @@ -134,9 +131,9 @@ func (c *Checker) getTypeAtFlowNode(f *FlowState, flow *ast.FlowNode) FlowType { // the same getFlowTypeOfReference invocation. A node is considered shared when it is the // antecedent of more than one node. for i := f.sharedFlowStart; i < len(c.sharedFlows); i++ { - if c.sharedFlows[i].flow == flow { + if s := &c.sharedFlows[i]; s.flow == flow { f.depth-- - return c.sharedFlows[i].flowType + return s.flowType } } sharedFlow = flow @@ -1364,12 +1361,19 @@ func (c *Checker) getTypeAtFlowLoopLabel(f *FlowState, flow *ast.FlowNode) FlowT } else { // All but the first antecedent are the looping control flow paths that lead // back to the loop junction. We track these on the flow loop stack. + sharedFlowStart := len(c.sharedFlows) c.flowLoopStack = append(c.flowLoopStack, FlowLoopInfo{key: key, types: antecedentTypes}) saveFlowTypeCache := c.flowTypeCache c.flowTypeCache = nil flowType = c.getTypeAtFlowNode(f, list.Flow) c.flowTypeCache = saveFlowTypeCache c.flowLoopStack = c.flowLoopStack[:len(c.flowLoopStack)-1] + // An incomplete type computed under the back edge reflects the loop's + // partial types, so it is not valid once the back edge is exited. + // Reusing it would make the result depend on which reference was + // analyzed first. + kept := slices.DeleteFunc(c.sharedFlows[sharedFlowStart:], func(s SharedFlow) bool { return s.flowType.incomplete }) + c.sharedFlows = c.sharedFlows[:sharedFlowStart+len(kept)] // If we see a value appear in the cache it is a sign that control flow analysis // was restarted and completed by checkExpressionCached. We can simply pick up // the resulting type and bail out. diff --git a/tsc/testdata/baselines/reference/compiler/exhaustiveSwitchCheckCircularity(checkorder=typesfirst).types b/tsc/testdata/baselines/reference/compiler/exhaustiveSwitchCheckCircularity(checkorder=typesfirst).types index 651cd4a45a647..a7b44f6811ab9 100644 --- a/tsc/testdata/baselines/reference/compiler/exhaustiveSwitchCheckCircularity(checkorder=typesfirst).types +++ b/tsc/testdata/baselines/reference/compiler/exhaustiveSwitchCheckCircularity(checkorder=typesfirst).types @@ -36,7 +36,7 @@ function f() { else if (isNever(foo)) { // Error expected >isNever(foo) : boolean >isNever : (n: never) => boolean ->foo : never +>foo : "bbb" break; } diff --git a/tsc/testdata/baselines/reference/compiler/flowLoopDepthCheckOrder(checkorder=typesfirst).types b/tsc/testdata/baselines/reference/compiler/flowLoopDepthCheckOrder(checkorder=typesfirst).types index 99b5a33596d2c..247a176187cc8 100644 --- a/tsc/testdata/baselines/reference/compiler/flowLoopDepthCheckOrder(checkorder=typesfirst).types +++ b/tsc/testdata/baselines/reference/compiler/flowLoopDepthCheckOrder(checkorder=typesfirst).types @@ -34,3034 +34,3034 @@ while (cond()) { >"a" : "a" if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean } if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean const deep = x; >deep : any diff --git a/tsc/testdata/baselines/reference/compiler/flowLoopTooDeepCheckOrder(checkorder=default).types b/tsc/testdata/baselines/reference/compiler/flowLoopTooDeepCheckOrder(checkorder=default).types index 2a0727e493817..b73df554b7234 100644 --- a/tsc/testdata/baselines/reference/compiler/flowLoopTooDeepCheckOrder(checkorder=default).types +++ b/tsc/testdata/baselines/reference/compiler/flowLoopTooDeepCheckOrder(checkorder=default).types @@ -23,19 +23,19 @@ while (cond()) { >cond : () => boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (typeof w === "string") { w = 1; } else { w = "a"; } >typeof w === "string" : boolean @@ -50,2986 +50,2986 @@ while (cond()) { >"a" : "a" if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} >b : any @@ -3355,7 +3355,7 @@ if (isString(w)) { >w : any const narrowed = w; ->narrowed : any ->w : any +>narrowed : string +>w : string } diff --git a/tsc/testdata/baselines/reference/compiler/flowLoopTooDeepCheckOrder(checkorder=typesfirst).types b/tsc/testdata/baselines/reference/compiler/flowLoopTooDeepCheckOrder(checkorder=typesfirst).types index 5bb07088ede1b..b73df554b7234 100644 --- a/tsc/testdata/baselines/reference/compiler/flowLoopTooDeepCheckOrder(checkorder=typesfirst).types +++ b/tsc/testdata/baselines/reference/compiler/flowLoopTooDeepCheckOrder(checkorder=typesfirst).types @@ -23,19 +23,19 @@ while (cond()) { >cond : () => boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (typeof w === "string") { w = 1; } else { w = "a"; } >typeof w === "string" : boolean @@ -50,2986 +50,2986 @@ while (cond()) { >"a" : "a" if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} ->b : any +>b : boolean if (b) {} >b : any @@ -3355,7 +3355,7 @@ if (isString(w)) { >w : any const narrowed = w; ->narrowed : any +>narrowed : string >w : string } diff --git a/tsc/testdata/baselines/reference/compiler/largeControlFlowGraph.types b/tsc/testdata/baselines/reference/compiler/largeControlFlowGraph.types index 3880df26550f7..9ed5668ae6c80 100644 --- a/tsc/testdata/baselines/reference/compiler/largeControlFlowGraph.types +++ b/tsc/testdata/baselines/reference/compiler/largeControlFlowGraph.types @@ -10,14000 +10,14000 @@ const data = []; data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 data[0] = 0; >data[0] = 0 : 0 >data[0] : any ->data : any +>data : any[] >0 : 0 >0 : 0 diff --git a/tsc/testdata/baselines/reference/compiler/narrowedNeverAfterLoopWithAndCondition.errors.txt b/tsc/testdata/baselines/reference/compiler/narrowedNeverAfterLoopWithAndCondition.errors.txt index 0ba88e426e409..dfe01f2eea345 100644 --- a/tsc/testdata/baselines/reference/compiler/narrowedNeverAfterLoopWithAndCondition.errors.txt +++ b/tsc/testdata/baselines/reference/compiler/narrowedNeverAfterLoopWithAndCondition.errors.txt @@ -1,4 +1,4 @@ -narrowedNeverAfterLoopWithAndCondition.ts(9,9): error TS2322: Type 'false' is not assignable to type 'never'. +narrowedNeverAfterLoopWithAndCondition.ts(9,19): error TS2339: Property 'last_ref' does not exist on type 'never'. narrowedNeverAfterLoopWithAndCondition.ts(17,19): error TS2339: Property 'last_ref' does not exist on type 'never'. @@ -12,8 +12,8 @@ narrowedNeverAfterLoopWithAndCondition.ts(17,19): error TS2339: Property 'last_r if (value_def) { while (x && y); value_def.last_ref = false; - ~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'false' is not assignable to type 'never'. + ~~~~~~~~ +!!! error TS2339: Property 'last_ref' does not exist on type 'never'. } } From c9668f4d42b1d85d57e3a072475f6ccb37a51787 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 19 Oct 2026 09:35:28 -0700 Subject: [PATCH 08/29] Track computed property name cycles on the resolution stack 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. --- tsc/internal/checker/checker.go | 14 ++++++++++++-- .../blockScopedBindingUsedBeforeDef.errors.txt | 12 ++++++------ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index ef05cba33c95f..bc4c9f5f448d2 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -66,6 +66,7 @@ const ( TypeSystemPropertyNameWriteType TypeSystemPropertyNameInitializerIsUndefined TypeSystemPropertyNameAliasTarget + TypeSystemPropertyNameComputedPropertyName ) type TypeResolution struct { @@ -19772,6 +19773,8 @@ func (c *Checker) typeResolutionHasProperty(r *TypeResolution) bool { return c.valueSymbolLinks.Get(r.target.(*ast.Symbol)).getWriteType() != nil case TypeSystemPropertyNameAliasTarget: return c.aliasSymbolLinks.Get(r.target.(*ast.Symbol)).aliasTarget != nil + case TypeSystemPropertyNameComputedPropertyName: + return c.typeNodeLinks.Get(r.target.(*ast.Node)).resolvedType != nil } panic("Unhandled case in typeResolutionHasProperty") } @@ -28402,12 +28405,19 @@ func isInvalidComputedPropertyName(node *ast.Node) bool { func (c *Checker) checkComputedPropertyName(node *ast.Node) *Type { links := c.typeNodeLinks.Get(node) if links.resolvedType == nil { - links.resolvedType = c.circularConstraintType if isInvalidComputedPropertyName(node) { links.resolvedType = c.errorType return links.resolvedType } - links.resolvedType = c.getRegularTypeOfLiteralType(c.checkExpression(node.Expression())) + if !c.pushTypeResolution(node, TypeSystemPropertyNameComputedPropertyName) { + return c.errorType + } + t := c.getRegularTypeOfLiteralType(c.checkExpression(node.Expression())) + c.popTypeResolution() + if links.resolvedType != nil { + return links.resolvedType + } + links.resolvedType = t // This will allow types number, string, symbol or any. It will also allow enums, the unknown // type, and any union of these types (like string | number). if links.resolvedType.flags&TypeFlagsNullable != 0 || diff --git a/tsc/testdata/baselines/reference/compiler/blockScopedBindingUsedBeforeDef.errors.txt b/tsc/testdata/baselines/reference/compiler/blockScopedBindingUsedBeforeDef.errors.txt index 1be1808a2e8cc..4eb1fec342c35 100644 --- a/tsc/testdata/baselines/reference/compiler/blockScopedBindingUsedBeforeDef.errors.txt +++ b/tsc/testdata/baselines/reference/compiler/blockScopedBindingUsedBeforeDef.errors.txt @@ -1,9 +1,9 @@ blockScopedBindingUsedBeforeDef.ts(2,12): error TS2448: Block-scoped variable 'a' used before its declaration. -blockScopedBindingUsedBeforeDef.ts(2,12): error TS2538: Type '{}' cannot be used as an index type. +blockScopedBindingUsedBeforeDef.ts(2,12): error TS2538: Type 'any' cannot be used as an index type. blockScopedBindingUsedBeforeDef.ts(5,12): error TS2448: Block-scoped variable 'a' used before its declaration. -blockScopedBindingUsedBeforeDef.ts(5,12): error TS2538: Type '{}' cannot be used as an index type. +blockScopedBindingUsedBeforeDef.ts(5,12): error TS2538: Type 'any' cannot be used as an index type. blockScopedBindingUsedBeforeDef.ts(8,7): error TS2448: Block-scoped variable 'b' used before its declaration. -blockScopedBindingUsedBeforeDef.ts(8,7): error TS2538: Type '{}' cannot be used as an index type. +blockScopedBindingUsedBeforeDef.ts(8,7): error TS2538: Type 'any' cannot be used as an index type. ==== blockScopedBindingUsedBeforeDef.ts (6 errors) ==== @@ -13,7 +13,7 @@ blockScopedBindingUsedBeforeDef.ts(8,7): error TS2538: Type '{}' cannot be used !!! error TS2448: Block-scoped variable 'a' used before its declaration. !!! related TS2728 blockScopedBindingUsedBeforeDef.ts:2:16: 'a' is declared here. ~ -!!! error TS2538: Type '{}' cannot be used as an index type. +!!! error TS2538: Type 'any' cannot be used as an index type. // 2: for (let {[a]: a} = { }; false; ) continue; @@ -21,7 +21,7 @@ blockScopedBindingUsedBeforeDef.ts(8,7): error TS2538: Type '{}' cannot be used !!! error TS2448: Block-scoped variable 'a' used before its declaration. !!! related TS2728 blockScopedBindingUsedBeforeDef.ts:5:16: 'a' is declared here. ~ -!!! error TS2538: Type '{}' cannot be used as an index type. +!!! error TS2538: Type 'any' cannot be used as an index type. // 3: let {[b]: b} = { }; @@ -29,4 +29,4 @@ blockScopedBindingUsedBeforeDef.ts(8,7): error TS2538: Type '{}' cannot be used !!! error TS2448: Block-scoped variable 'b' used before its declaration. !!! related TS2728 blockScopedBindingUsedBeforeDef.ts:8:11: 'b' is declared here. ~ -!!! error TS2538: Type '{}' cannot be used as an index type. \ No newline at end of file +!!! error TS2538: Type 'any' cannot be used as an index type. \ No newline at end of file From 34a7b21ec308094aba050b9c5a5e040dddbbbdf2 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Tue, 20 Oct 2026 15:28:49 -0700 Subject: [PATCH 09/29] Cache relation results only once their assumptions are resolved 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. --- tsc/internal/checker/relater.go | 225 +++++++++++++----- ...redCheckOrder(checkorder=typesfirst).types | 2 +- .../relationMaybeCheckOrder.errors.txt | 5 +- .../compiler/relationMaybeCheckOrder.types | 2 +- ...redCheckOrder(checkorder=typesfirst).types | 2 +- ...eCheckOrder(checkorder=default).errors.txt | 25 ++ 6 files changed, 201 insertions(+), 60 deletions(-) create mode 100644 tsc/testdata/baselines/reference/compiler/relationTruncatedCacheCheckOrder(checkorder=default).errors.txt diff --git a/tsc/internal/checker/relater.go b/tsc/internal/checker/relater.go index 15bc6859793d4..9cd06ba775205 100644 --- a/tsc/internal/checker/relater.go +++ b/tsc/internal/checker/relater.go @@ -948,6 +948,21 @@ func (c *Checker) typeGeneration(t *Type) int { return generation } +// deeplyNestedStart returns the highest index in stack from which t is still +// deeply nested, or -1 if it is not deeply nested. Comparisons starting at or +// below that index would be truncated the same way. +func (c *Checker) deeplyNestedStart(t *Type, stack []*Type, maxDepth int) int { + if !c.isDeeplyNestedType(t, stack, maxDepth) { + return -1 + } + for k := len(stack) - maxDepth; k > 0; k-- { + if c.isDeeplyNestedType(t, stack[k:], maxDepth) { + return k + } + } + return 0 +} + func hasMatchingRecursionIdentity(t *Type, identity RecursionId) bool { target := getRecursionIdentityTarget(t) if target.flags&TypeFlagsIntersection != 0 { @@ -2735,22 +2750,48 @@ type ErrorChain struct { } type Relater struct { - c *Checker - relation *Relation - errorNode *ast.Node - errorChain *ErrorChain - relatedInfo []*ast.Diagnostic - maybeKeys []CacheHashKey - maybeKeysSet collections.Set[CacheHashKey] - sourceStack []*Type - targetStack []*Type - maybeCount int - sourceDepth int - targetDepth int + c *Checker + relation *Relation + errorNode *ast.Node + errorChain *ErrorChain + relatedInfo []*ast.Diagnostic + // maybeKeys are the comparisons in progress, followed by completed ones + // that hold assuming comparisons still in progress. maybeKeysSet indexes + // them by key. + maybeKeys []maybeKey + maybeKeysSet map[CacheHashKey]int + sourceStack []*Type + targetStack []*Type + // sourceDepths and targetDepths are the depths of the comparisons that + // pushed each entry of sourceStack and targetStack. + sourceDepths []int + targetDepths []int + // depth is the number of comparisons in progress. + depth int + // low is the lowest depth that the result of the innermost comparison in + // progress depends on, through assumptions or truncation. Results that + // depend on no comparison below their own are the same from scratch. + low int + // truncated is set if that result depends on a truncation that would not + // happen from scratch. + truncated bool expandingFlags ExpandingFlags - overflow bool - relationCount int - next *Relater + // expandingSourceDepth and expandingTargetDepth are the highest depths + // from which the expanding flags would still be set. + expandingSourceDepth int + expandingTargetDepth int + overflow bool + relationCount int + next *Relater +} + +type maybeKey struct { + key CacheHashKey + // low is the lowest depth that the comparison depends on, which is its + // own while it is in progress. + low int + result Ternary + truncated bool } func (c *Checker) getRelater() *Relater { @@ -2763,13 +2804,15 @@ func (c *Checker) getRelater() *Relater { } func (c *Checker) putRelater(r *Relater) { - r.maybeKeysSet.Clear() + clear(r.maybeKeysSet) *r = Relater{ c: c, maybeKeys: r.maybeKeys[:0], maybeKeysSet: r.maybeKeysSet, sourceStack: r.sourceStack[:0], targetStack: r.targetStack[:0], + sourceDepths: r.sourceDepths[:0], + targetDepths: r.targetDepths[:0], next: c.freeRelater, } c.freeRelater = r @@ -3294,38 +3337,67 @@ func (r *Relater) recursiveTypeRelatedTo(source *Type, target *Type, reportError return TernaryFalse } // If source and target are already being compared, consider them related with assumptions - if r.maybeKeysSet.Has(id) { - return TernaryMaybe + if i, ok := r.maybeKeysSet[id]; ok { + return r.assume(i) } // A constrained key indicates that we have type references that reference constrained // type parameters. For such keys we also check against the key we would have gotten if all type parameters // were unconstrained. if constrained { broadestEquivalentId, _ := getRelationKey(source, target, intersectionState, r.relation == r.c.identityRelation, true /*ignoreConstraints*/) - if r.maybeKeysSet.Has(broadestEquivalentId) { - return TernaryMaybe + if i, ok := r.maybeKeysSet[broadestEquivalentId]; ok { + return r.assume(i) + } + // What relates with unconstrained type parameters also relates with + // constrained ones. + if entry := r.relation.get(broadestEquivalentId); entry&RelationComparisonResultSucceeded != 0 { + r.c.reliabilityFlags |= entry & (RelationComparisonResultReportsUnmeasurable | RelationComparisonResultReportsUnreliable) + return TernaryTrue } } if len(r.sourceStack) == 100 || len(r.targetStack) == 100 { // We stop relating if we reach 100 levels of nesting. This is a backstop to catch infinite recursion // that wasn't caught by isDeeplyNestedType. It will also stop relating types that truly are over 100 // levels deep, but those are exceedingly rare. + depth := r.depth + if len(r.sourceStack) == 100 { + depth = min(depth, r.sourceDepths[0]) + } + if len(r.targetStack) == 100 { + depth = min(depth, r.targetDepths[0]) + } + r.truncate(depth) return TernaryMaybe } + depth := r.depth + r.depth++ maybeStart := len(r.maybeKeys) - r.maybeKeys = append(r.maybeKeys, id) - r.maybeKeysSet.Add(id) - saveExpandingFlags := r.expandingFlags + r.maybeKeys = append(r.maybeKeys, maybeKey{key: id, low: depth, result: TernaryMaybe}) + if r.maybeKeysSet == nil { + r.maybeKeysSet = make(map[CacheHashKey]int) + } + r.maybeKeysSet[id] = maybeStart + saveLow, saveTruncated := r.low, r.truncated + r.low, r.truncated = depth, false + saveExpandingFlags, saveExpandingSourceDepth, saveExpandingTargetDepth := r.expandingFlags, r.expandingSourceDepth, r.expandingTargetDepth if recursionFlags&RecursionFlagsSource != 0 { r.sourceStack = append(r.sourceStack, source) - if r.expandingFlags&ExpandingFlagsSource == 0 && r.c.isDeeplyNestedType(source, r.sourceStack, 3) { - r.expandingFlags |= ExpandingFlagsSource + r.sourceDepths = append(r.sourceDepths, depth) + if r.expandingFlags&ExpandingFlagsSource == 0 { + if k := r.c.deeplyNestedStart(source, r.sourceStack, 3); k >= 0 { + r.expandingFlags |= ExpandingFlagsSource + r.expandingSourceDepth = r.sourceDepths[k] + } } } if recursionFlags&RecursionFlagsTarget != 0 { r.targetStack = append(r.targetStack, target) - if r.expandingFlags&ExpandingFlagsTarget == 0 && r.c.isDeeplyNestedType(target, r.targetStack, 3) { - r.expandingFlags |= ExpandingFlagsTarget + r.targetDepths = append(r.targetDepths, depth) + if r.expandingFlags&ExpandingFlagsTarget == 0 { + if k := r.c.deeplyNestedStart(target, r.targetStack, 3); k >= 0 { + r.expandingFlags |= ExpandingFlagsTarget + r.expandingTargetDepth = r.targetDepths[k] + } } } saveReliabilityFlags := r.c.reliabilityFlags @@ -3335,6 +3407,7 @@ func (r *Relater) recursiveTypeRelatedTo(source *Type, target *Type, reportError if tr := r.c.tracer; tr != nil { tr.Instant(tracing.PhaseCheckTypes, "recursiveTypeRelatedTo_DepthLimit", map[string]any{"sourceId": source.id, "targetId": target.id, "depth": len(r.sourceStack), "targetDepth": len(r.targetStack)}) } + r.truncate(min(r.expandingSourceDepth, r.expandingTargetDepth)) result = TernaryMaybe } else { if tr := r.c.tracer; tr != nil { @@ -3346,47 +3419,91 @@ func (r *Relater) recursiveTypeRelatedTo(source *Type, target *Type, reportError r.c.reliabilityFlags |= saveReliabilityFlags if recursionFlags&RecursionFlagsSource != 0 { r.sourceStack = r.sourceStack[:len(r.sourceStack)-1] + r.sourceDepths = r.sourceDepths[:len(r.sourceDepths)-1] } if recursionFlags&RecursionFlagsTarget != 0 { r.targetStack = r.targetStack[:len(r.targetStack)-1] + r.targetDepths = r.targetDepths[:len(r.targetDepths)-1] } - r.expandingFlags = saveExpandingFlags - if propagatingVarianceFlags&RelationComparisonResultAssumesResolvingReturnType != 0 { - // The result holds only while a return type it read is being resolved, so it is not cached. Comparisons - // still in progress below this one have the same dependence. - if result == TernaryFalse || result == TernaryTrue || (len(r.sourceStack) == 0 && len(r.targetStack) == 0) { - r.resetMaybeStack(maybeStart, propagatingVarianceFlags, false) - } - return result - } - if result != TernaryFalse { - if result == TernaryTrue || (len(r.sourceStack) == 0 && len(r.targetStack) == 0) { - if result == TernaryTrue || result == TernaryMaybe { - // If result is definitely true, record all maybe keys as having succeeded. Also, record Ternary.Maybe - // results as having succeeded once we reach depth 0, but never record Ternary.Unknown results. - r.resetMaybeStack(maybeStart, propagatingVarianceFlags, true) - } else { - r.resetMaybeStack(maybeStart, propagatingVarianceFlags, false) - } + r.expandingFlags, r.expandingSourceDepth, r.expandingTargetDepth = saveExpandingFlags, saveExpandingSourceDepth, saveExpandingTargetDepth + r.depth-- + low, truncated := r.low, r.truncated + r.low, r.truncated = saveLow, saveTruncated + switch { + case propagatingVarianceFlags&RelationComparisonResultAssumesResolvingReturnType != 0 && (result == TernaryFalse || low >= depth): + // The result holds only while a return type it read is being resolved, so it is not cached, nor are the + // comparisons that completed assuming this one. A result that depends on comparisons outside of this one + // is kept until the outermost of them completes, which has the same dependence. + r.resetMaybeStack(maybeStart, propagatingVarianceFlags, false) + if result == TernaryMaybe { + result = TernaryTrue } - // Note: it's intentional that we don't reset in the else case; - // we leave them on the stack such that when we hit depth zero - // above, we can report all of them as successful. - } else { + case result == TernaryFalse: // A false result goes straight into global cache (when something is false under // assumptions it will also be false without assumptions) r.relation.set(id, RelationComparisonResultFailed|propagatingVarianceFlags) r.relationCount-- r.resetMaybeStack(maybeStart, propagatingVarianceFlags, false) + case low >= depth: + // The result depends on no comparison outside of this one, so it is the + // same from scratch. Comparisons that completed assuming this one hold + // as well, unless they relied on truncation, which may not happen from + // scratch. Ternary.Unknown results are never recorded. + switch { + case result == TernaryUnknown: + r.resetMaybeStack(maybeStart, propagatingVarianceFlags, false) + case truncated: + r.resetMaybeStack(maybeStart, propagatingVarianceFlags, false) + r.relation.set(id, RelationComparisonResultSucceeded|propagatingVarianceFlags) + r.relationCount-- + default: + r.resetMaybeStack(maybeStart, propagatingVarianceFlags, true) + } + // The result no longer depends on any comparison in progress, so it + // is reported as related, the same as when it is read from the cache. + if result == TernaryMaybe { + result = TernaryTrue + } + default: + // The result holds while the comparisons it depends on are in progress, + // so it is kept until the outermost of them completes. Until then, the + // same comparison elsewhere in this one relates the same way. + for i := maybeStart; i < len(r.maybeKeys); i++ { + m := &r.maybeKeys[i] + m.low = min(m.low, low) + m.truncated = m.truncated || truncated + if result == TernaryTrue { + m.result = TernaryTrue + } + } + r.low = min(r.low, low) + r.truncated = r.truncated || truncated } return result } +// assume relates a comparison in progress, or one that completed assuming one +// in progress, as it was related so far. +func (r *Relater) assume(i int) Ternary { + m := &r.maybeKeys[i] + r.low = min(r.low, m.low) + r.truncated = r.truncated || m.truncated + return m.result +} + +// truncate records that the comparison in progress was cut short in a way +// that depends on depth and the depths above it. +func (r *Relater) truncate(depth int) { + r.low = min(r.low, depth) + r.truncated = true +} + func (r *Relater) resetMaybeStack(maybeStart int, propagatingVarianceFlags RelationComparisonResult, markAllAsSucceeded bool) { for i := maybeStart; i < len(r.maybeKeys); i++ { - r.maybeKeysSet.Delete(r.maybeKeys[i]) + key := r.maybeKeys[i].key + delete(r.maybeKeysSet, key) if markAllAsSucceeded { - r.relation.set(r.maybeKeys[i], RelationComparisonResultSucceeded|propagatingVarianceFlags) + r.relation.set(key, RelationComparisonResultSucceeded|propagatingVarianceFlags) r.relationCount-- } } @@ -3761,7 +3878,8 @@ func (r *Relater) structuredTypeRelatedToWorker(source *Type, target *Type, repo case target.flags&TypeFlagsConditional != 0: // If we reach 10 levels of nesting for the same conditional type, assume it is an infinitely expanding recursive // conditional type and bail out with a Ternary.Maybe result. - if r.c.isDeeplyNestedType(target, r.targetStack, 10) { + if k := r.c.deeplyNestedStart(target, r.targetStack, 10); k >= 0 { + r.truncate(r.targetDepths[k]) return TernaryMaybe } c := target.AsConditionalType() @@ -3942,7 +4060,8 @@ func (r *Relater) structuredTypeRelatedToWorker(source *Type, target *Type, repo case source.flags&TypeFlagsConditional != 0: // If we reach 10 levels of nesting for the same conditional type, assume it is an infinitely expanding recursive // conditional type and bail out with a Ternary.Maybe result. - if r.c.isDeeplyNestedType(source, r.sourceStack, 10) { + if k := r.c.deeplyNestedStart(source, r.sourceStack, 10); k >= 0 { + r.truncate(r.sourceDepths[k]) return TernaryMaybe } if target.flags&TypeFlagsConditional != 0 { diff --git a/tsc/testdata/baselines/reference/compiler/relationDepthSharedCheckOrder(checkorder=typesfirst).types b/tsc/testdata/baselines/reference/compiler/relationDepthSharedCheckOrder(checkorder=typesfirst).types index 4d25be7bdfdba..2fbf00669bb64 100644 --- a/tsc/testdata/baselines/reference/compiler/relationDepthSharedCheckOrder(checkorder=typesfirst).types +++ b/tsc/testdata/baselines/reference/compiler/relationDepthSharedCheckOrder(checkorder=typesfirst).types @@ -728,7 +728,7 @@ interface J119 { leaf: number } >leaf : number type Mid = I60 extends J60 ? true : false; ->Mid : true +>Mid : false >true : true >false : false diff --git a/tsc/testdata/baselines/reference/compiler/relationMaybeCheckOrder.errors.txt b/tsc/testdata/baselines/reference/compiler/relationMaybeCheckOrder.errors.txt index 88dee4e5a8f7e..959e47bf00a94 100644 --- a/tsc/testdata/baselines/reference/compiler/relationMaybeCheckOrder.errors.txt +++ b/tsc/testdata/baselines/reference/compiler/relationMaybeCheckOrder.errors.txt @@ -1,8 +1,7 @@ relationMaybeCheckOrder.ts(8,32): error TS2322: Type 'B' is not assignable to type 'string | number | symbol'. -relationMaybeCheckOrder.ts(18,11): error TS2322: Type '2' is not assignable to type '1'. -==== relationMaybeCheckOrder.ts (2 errors) ==== +==== relationMaybeCheckOrder.ts (1 errors) ==== // Relating to 'keyof M' rejects keys that relate only by assuming a // comparison still in progress. Relating 'A' to 'B' assumes only itself // along 'next', so it completes on its own and must be accepted whether @@ -23,8 +22,6 @@ relationMaybeCheckOrder.ts(18,11): error TS2322: Type '2' is not assignable to t function g(x: unknown): 2; function g(x: unknown) { return 1 as any; } const r: 1 = g(a); - ~ -!!! error TS2322: Type '2' is not assignable to type '1'. } const w: 1 = h(a); diff --git a/tsc/testdata/baselines/reference/compiler/relationMaybeCheckOrder.types b/tsc/testdata/baselines/reference/compiler/relationMaybeCheckOrder.types index ecbee15a795d4..79fb5d6072b67 100644 --- a/tsc/testdata/baselines/reference/compiler/relationMaybeCheckOrder.types +++ b/tsc/testdata/baselines/reference/compiler/relationMaybeCheckOrder.types @@ -47,7 +47,7 @@ function f() { const r: 1 = g(a); >r : 1 ->g(a) : 2 +>g(a) : 1 >g : { (x: keyof M): 1; (x: unknown): 2; } >a : A } diff --git a/tsc/testdata/baselines/reference/compiler/relationNestingSharedCheckOrder(checkorder=typesfirst).types b/tsc/testdata/baselines/reference/compiler/relationNestingSharedCheckOrder(checkorder=typesfirst).types index fcc2fcc2b32aa..af0850b02eb7b 100644 --- a/tsc/testdata/baselines/reference/compiler/relationNestingSharedCheckOrder(checkorder=typesfirst).types +++ b/tsc/testdata/baselines/reference/compiler/relationNestingSharedCheckOrder(checkorder=typesfirst).types @@ -18,7 +18,7 @@ type R = { next: R<[T]>; leaf: T }; >leaf : T type Inner = S<[string]> extends R<[string]> ? true : false; ->Inner : true +>Inner : false >true : true >false : false diff --git a/tsc/testdata/baselines/reference/compiler/relationTruncatedCacheCheckOrder(checkorder=default).errors.txt b/tsc/testdata/baselines/reference/compiler/relationTruncatedCacheCheckOrder(checkorder=default).errors.txt new file mode 100644 index 0000000000000..8b543f32384ea --- /dev/null +++ b/tsc/testdata/baselines/reference/compiler/relationTruncatedCacheCheckOrder(checkorder=default).errors.txt @@ -0,0 +1,25 @@ +relationTruncatedCacheCheckOrder.ts(14,1): error TS2322: Type 'S<[string]>' is not assignable to type 'R<[string]>'. + The types of 'next.leaf' are incompatible between these types. + Type 'number' is not assignable to type '[[string]]'. + + +==== relationTruncatedCacheCheckOrder.ts (1 errors) ==== + // Relating 'S<[string]>' to 'R<[string]>' from scratch reaches 'next.leaf' + // before giving up on deeply nested types, and fails there. Inside the + // relation of 'S' to 'R' it is one level deeper and is cut + // short instead. That truncated result must not be cached, so the error for + // 'q = p' must be reported whether or not 'y = x' was checked first. + + type S = { next: S<[T]>; leaf: T extends [[unknown]] ? number : T }; + type R = { next: R<[T]>; leaf: T }; + + declare let x: S, y: R; + declare let p: S<[string]>, q: R<[string]>; + + y = x; + q = p; + ~ +!!! error TS2322: Type 'S<[string]>' is not assignable to type 'R<[string]>'. +!!! error TS2322: The types of 'next.leaf' are incompatible between these types. +!!! error TS2322: Type 'number' is not assignable to type '[[string]]'. + \ No newline at end of file From cecc9cc599186a3c1eb919f23359f9110c3f6da3 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 22 Oct 2026 09:58:36 -0700 Subject: [PATCH 10/29] Look through instantiation when reusing a parameter name 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. --- tsc/internal/checker/nodecopy.go | 6 ++++-- ...heckOrderParameterInTypeQuery(checkorder=isolated).types | 4 ++-- ...ckOrderParameterInTypeQuery(checkorder=typesfirst).types | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tsc/internal/checker/nodecopy.go b/tsc/internal/checker/nodecopy.go index 913930bd53095..01aef8fca6a5f 100644 --- a/tsc/internal/checker/nodecopy.go +++ b/tsc/internal/checker/nodecopy.go @@ -354,8 +354,10 @@ func getExistingNodeTreeVisitor(b *NodeBuilderImpl, bound *recoveryBoundary) *as symAtLocation == b.ch.unknownSymbol || // If the symbol is not found, but was not found in the original scope either we probably have an error, don't reuse the node (symAtLocation == nil && sym != nil) || - // If the symbol is found both in declaration scope and in current scope then it should point to the same reference - (symAtLocation != nil && sym != nil && b.ch.getSymbolIfSameReference(b.ch.getExportSymbolOfValueSymbolIfExported(symAtLocation), sym) == nil) { + // If the symbol is found both in declaration scope and in current scope then it should point to the same reference. + // A parameter in scope may be an instantiation of the one in the declaration, depending on whether + // its type was resolved before its signature was instantiated, so compare what they instantiate. + (symAtLocation != nil && sym != nil && b.ch.getSymbolIfSameReference(b.ch.getTargetSymbol(b.ch.getExportSymbolOfValueSymbolIfExported(symAtLocation)), b.ch.getTargetSymbol(sym)) == nil) { // In isolated declaration we will not do rest parameter expansion so there is no need to report on these. if symAtLocation != b.ch.unknownSymbol { b.ctx.tracker.ReportInferenceFallback(node) diff --git a/tsc/testdata/baselines/reference/compiler/checkOrderParameterInTypeQuery(checkorder=isolated).types b/tsc/testdata/baselines/reference/compiler/checkOrderParameterInTypeQuery(checkorder=isolated).types index 0c9c1f6dcfb8d..c7f091d02bcb0 100644 --- a/tsc/testdata/baselines/reference/compiler/checkOrderParameterInTypeQuery(checkorder=isolated).types +++ b/tsc/testdata/baselines/reference/compiler/checkOrderParameterInTypeQuery(checkorder=isolated).types @@ -30,10 +30,10 @@ export class C2 { } return new C().test1(this); >new C().test1(this) : number ->new C().test1 : (a: C2) => number +>new C().test1 : (a: C2) => typeof a.#a >new C() : C >C : typeof C ->test1 : (a: C2) => number +>test1 : (a: C2) => typeof a.#a >this : this } } diff --git a/tsc/testdata/baselines/reference/compiler/checkOrderParameterInTypeQuery(checkorder=typesfirst).types b/tsc/testdata/baselines/reference/compiler/checkOrderParameterInTypeQuery(checkorder=typesfirst).types index 0c9c1f6dcfb8d..c7f091d02bcb0 100644 --- a/tsc/testdata/baselines/reference/compiler/checkOrderParameterInTypeQuery(checkorder=typesfirst).types +++ b/tsc/testdata/baselines/reference/compiler/checkOrderParameterInTypeQuery(checkorder=typesfirst).types @@ -30,10 +30,10 @@ export class C2 { } return new C().test1(this); >new C().test1(this) : number ->new C().test1 : (a: C2) => number +>new C().test1 : (a: C2) => typeof a.#a >new C() : C >C : typeof C ->test1 : (a: C2) => number +>test1 : (a: C2) => typeof a.#a >this : this } } From dd6bdad1f4cb565324be774bf85b5eb1e8b4ef59 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 22 Oct 2026 11:16:59 -0700 Subject: [PATCH 11/29] Check computed enum initializers when checking the member 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. --- tsc/internal/checker/checker.go | 9 +++++---- ...eckOrderEnumComputedMember(checkorder=isolated).types | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index bc4c9f5f448d2..a21dc25f19017 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -5289,8 +5289,11 @@ func (c *Checker) checkEnumMember(node *ast.Node) { if ast.IsComputedPropertyName(node.Name()) { c.checkExpression(node.Name().Expression()) } - if node.Initializer() != nil { - c.checkExpression(node.Initializer()) + if initializer := node.Initializer(); initializer != nil { + initializerType := c.checkExpression(initializer) + if c.getEnumMemberValue(node).Value == nil && !ast.IsEnumConst(node.Parent) && node.Parent.Flags&ast.NodeFlagsAmbient == 0 { + c.checkTypeAssignableTo(initializerType, c.numberType, initializer, diagnostics.Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values) + } } } @@ -25467,8 +25470,6 @@ func (c *Checker) computeConstantEnumMemberValue(member *ast.Node) evaluator.Res c.error(initializer, diagnostics.X_const_enum_member_initializers_must_be_constant_expressions) case member.Parent.Flags&ast.NodeFlagsAmbient != 0: c.error(initializer, diagnostics.In_ambient_enum_declarations_member_initializer_must_be_constant_expression) - default: - c.checkTypeAssignableTo(c.checkExpression(initializer), c.numberType, initializer, diagnostics.Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values) } return result } diff --git a/tsc/testdata/baselines/reference/compiler/checkOrderEnumComputedMember(checkorder=isolated).types b/tsc/testdata/baselines/reference/compiler/checkOrderEnumComputedMember(checkorder=isolated).types index 7ec12ac791f04..39ddeced5f433 100644 --- a/tsc/testdata/baselines/reference/compiler/checkOrderEnumComputedMember(checkorder=isolated).types +++ b/tsc/testdata/baselines/reference/compiler/checkOrderEnumComputedMember(checkorder=isolated).types @@ -23,7 +23,7 @@ enum E { } const member: Extract = E.C; ->member : never +>member : E.C >E.C : E.C >E : typeof E >C : E.C From d4d42bd5179ce74b92c33ae40ffb305758819098 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sat, 7 Nov 2026 09:00:52 -0800 Subject: [PATCH 12/29] Instantiate symbols whether or not their types are known 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.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. --- tsc/internal/checker/checker.go | 47 ++++++++++++++----- tsc/internal/checker/types.go | 24 ++++++++-- tsc/internal/checker/types_test.go | 2 +- .../tests/jsxGenericQuickInfo_test.go | 4 +- ...antiatedParameterKeepsResolvedType.symbols | 29 ++++++++++++ ...stantiatedParameterKeepsResolvedType.types | 25 ++++++++++ .../spreadOfInstantiatedMappedMember.types | 4 +- ...e-with-multiple-files-and-complex-types.js | 4 +- ...einstantiatedParameterKeepsResolvedType.ts | 10 ++++ 9 files changed, 126 insertions(+), 23 deletions(-) create mode 100644 tsc/testdata/baselines/reference/compiler/reinstantiatedParameterKeepsResolvedType.symbols create mode 100644 tsc/testdata/baselines/reference/compiler/reinstantiatedParameterKeepsResolvedType.types create mode 100644 tsc/testdata/tests/cases/compiler/reinstantiatedParameterKeepsResolvedType.ts diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index a21dc25f19017..291243a180394 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -17310,7 +17310,13 @@ func (c *Checker) getNonMissingTypeOfSymbol(symbol *ast.Symbol) *Type { func (c *Checker) getTypeOfInstantiatedSymbol(symbol *ast.Symbol) *Type { links := c.valueSymbolLinks.Get(symbol) if links.resolvedType == nil { - links.resolvedType = c.instantiateType(c.getTypeOfSymbol(links.target), links.mapper) + var t *Type + if from := c.instantiatedFromUnaffected(links); from != nil { + t = c.getTypeOfSymbol(from) + } else { + t = c.instantiateType(c.getTypeOfSymbol(links.target), links.mapper) + } + links.resolvedType = t } return links.resolvedType } @@ -17318,11 +17324,34 @@ func (c *Checker) getTypeOfInstantiatedSymbol(symbol *ast.Symbol) *Type { func (c *Checker) getWriteTypeOfInstantiatedSymbol(symbol *ast.Symbol) *Type { links := c.valueSymbolLinks.Get(symbol) if links.getWriteType() == nil { - links.setWriteType(c, c.instantiateType(c.getWriteTypeOfSymbol(links.target), links.mapper)) + var t *Type + if from := c.instantiatedFromUnaffected(links); from != nil { + t = c.getWriteTypeOfSymbol(from) + } else { + t = c.instantiateType(c.getWriteTypeOfSymbol(links.target), links.mapper) + } + links.setWriteType(c, t) } return links.getWriteType() } +// instantiatedFromUnaffected returns the instantiated symbol that the +// symbol of links instantiates, if its types have no type variables for +// the further instantiation to affect. The symbol then has the same types. +// Instantiating its target with the combined mappers instead can give a +// different type, as when an instantiation turns E['V'][K] into unknown +// for E := {}, but the combined one turns it into never for K := never. +func (c *Checker) instantiatedFromUnaffected(links *ValueSymbolLinks) *ast.Symbol { + from := links.getInstantiatedFrom() + if from == nil || c.couldContainTypeVariables(c.getTypeOfSymbol(from)) { + return nil + } + if from.Flags()&ast.SymbolFlagsSetAccessor != 0 && c.couldContainTypeVariables(c.getWriteTypeOfSymbol(from)) { + return nil + } + return from +} + func (c *Checker) getTypeOfVariableOrParameterOrProperty(symbol *ast.Symbol) *Type { links := c.valueSymbolLinks.Get(symbol) if links.resolvedType == nil { @@ -21959,21 +21988,12 @@ func (c *Checker) instantiateSymbol(symbol *ast.Symbol, m *TypeMapper) *ast.Symb if m.MapsThisOnly() && isThisless(symbol) { return symbol } - // If the type of the symbol is already resolved, and if that type could not possibly - // be affected by instantiation, simply return the symbol itself. - if links.resolvedType != nil && !c.couldContainTypeVariables(links.resolvedType) { - if symbol.Flags()&ast.SymbolFlagsSetAccessor == 0 { - return symbol - } - // If we're a setter, check writeType. - if links.getWriteType() != nil && !c.couldContainTypeVariables(links.getWriteType()) { - return symbol - } - } + var instantiatedFrom *ast.Symbol if symbol.CheckFlags()&ast.CheckFlagsInstantiated != 0 { // If symbol being instantiated is itself a instantiation, fetch the original target and combine the // type mappers. This ensures that original type identities are properly preserved and that aliases // always reference a non-aliases. + instantiatedFrom = symbol symbol = links.target m = c.combineTypeMappers(links.mapper, m) } @@ -21984,6 +22004,7 @@ func (c *Checker) instantiateSymbol(symbol *ast.Symbol, m *TypeMapper) *ast.Symb resultLinks.target = symbol resultLinks.mapper = m resultLinks.setNameType(c, links.getNameType()) + resultLinks.setInstantiatedFrom(c, instantiatedFrom) return result } diff --git a/tsc/internal/checker/types.go b/tsc/internal/checker/types.go index 87e2bcdcda792..67d071d579142 100644 --- a/tsc/internal/checker/types.go +++ b/tsc/internal/checker/types.go @@ -195,9 +195,10 @@ type ValueSymbolLinks struct { } type valueSymbolExtra struct { - writeType *Type - nameType *Type - containingType *Type // Mapped type for mapped type property, containing union or intersection type for synthetic property + writeType *Type + nameType *Type + containingType *Type // Mapped type for mapped type property, containing union or intersection type for synthetic property + instantiatedFrom *ast.Symbol // For an instantiation of an instantiated symbol, the symbol instantiated } func (links *ValueSymbolLinks) getWriteType() *Type { @@ -241,6 +242,23 @@ func (links *ValueSymbolLinks) setNameType(c *Checker, typ *Type) { links.extra.nameType = typ } +func (links *ValueSymbolLinks) getInstantiatedFrom() *ast.Symbol { + if links.extra == nil { + return nil + } + return links.extra.instantiatedFrom +} + +func (links *ValueSymbolLinks) setInstantiatedFrom(c *Checker, symbol *ast.Symbol) { + if links.extra == nil { + if symbol == nil { + return + } + links.extra = c.valueSymbolExtraArena.New() + } + links.extra.instantiatedFrom = symbol +} + func (links *ValueSymbolLinks) setContainingType(c *Checker, typ *Type) { if links.extra == nil { if typ == nil { diff --git a/tsc/internal/checker/types_test.go b/tsc/internal/checker/types_test.go index 7bf2d5eb0157b..19581d8f1f742 100644 --- a/tsc/internal/checker/types_test.go +++ b/tsc/internal/checker/types_test.go @@ -490,7 +490,7 @@ func TestInferenceContextMappers(t *testing.T) { //nolint:paralleltest func TestCompactValueSymbolLinksLayout(t *testing.T) { t.Parallel() assert.Equal(t, unsafe.Sizeof(ValueSymbolLinks{}), 4*unsafe.Sizeof(uintptr(0))) - assert.Equal(t, unsafe.Sizeof(valueSymbolExtra{}), 3*unsafe.Sizeof(uintptr(0))) + assert.Equal(t, unsafe.Sizeof(valueSymbolExtra{}), 4*unsafe.Sizeof(uintptr(0))) c, types := newCompositeTestChecker() var links ValueSymbolLinks assert.Assert(t, links.getWriteType() == nil) diff --git a/tsc/internal/fourslash/tests/jsxGenericQuickInfo_test.go b/tsc/internal/fourslash/tests/jsxGenericQuickInfo_test.go index 22b845a168c7f..9e2b32d740495 100644 --- a/tsc/internal/fourslash/tests/jsxGenericQuickInfo_test.go +++ b/tsc/internal/fourslash/tests/jsxGenericQuickInfo_test.go @@ -39,8 +39,8 @@ var c = item.toFixed( defer done() f.VerifyQuickInfoAt(t, "0", "(property) PropsA.renderItem: (item: number) => string", "") f.VerifyQuickInfoAt(t, "1", "(parameter) item: number", "") - f.VerifyQuickInfoAt(t, "2", "(property) PropsA.name: \"A\"", "comments for A") + f.VerifyQuickInfoAt(t, "2", "(property) PropsA.name: \"A\"", "comments for A") f.VerifyQuickInfoAt(t, "3", "(property) PropsA.renderItem: (item: number) => string", "") f.VerifyQuickInfoAt(t, "4", "(parameter) item: number", "") - f.VerifyQuickInfoAt(t, "5", "(property) PropsA.name: \"A\"", "comments for A") + f.VerifyQuickInfoAt(t, "5", "(property) PropsA.name: \"A\"", "comments for A") } diff --git a/tsc/testdata/baselines/reference/compiler/reinstantiatedParameterKeepsResolvedType.symbols b/tsc/testdata/baselines/reference/compiler/reinstantiatedParameterKeepsResolvedType.symbols new file mode 100644 index 0000000000000..517ce9e1866b7 --- /dev/null +++ b/tsc/testdata/baselines/reference/compiler/reinstantiatedParameterKeepsResolvedType.symbols @@ -0,0 +1,29 @@ +//// [tests/cases/compiler/reinstantiatedParameterKeepsResolvedType.ts] //// + +=== reinstantiatedParameterKeepsResolvedType.ts === +// Instantiating E := {} turns the type of v into unknown. Inferring +// K := never must not then turn it into {}['V'][never], which is never. +interface I { +>I : Symbol(I, Decl(reinstantiatedParameterKeepsResolvedType.ts, 0, 0)) +>E : Symbol(E, Decl(reinstantiatedParameterKeepsResolvedType.ts, 2, 12)) +>V : Symbol(V, Decl(reinstantiatedParameterKeepsResolvedType.ts, 2, 23)) + + f(k: K, v: E['V'][K]): void; +>f : Symbol(I.f, Decl(reinstantiatedParameterKeepsResolvedType.ts, 2, 39)) +>K : Symbol(K, Decl(reinstantiatedParameterKeepsResolvedType.ts, 3, 6)) +>E : Symbol(E, Decl(reinstantiatedParameterKeepsResolvedType.ts, 2, 12)) +>k : Symbol(k, Decl(reinstantiatedParameterKeepsResolvedType.ts, 3, 30)) +>K : Symbol(K, Decl(reinstantiatedParameterKeepsResolvedType.ts, 3, 6)) +>v : Symbol(v, Decl(reinstantiatedParameterKeepsResolvedType.ts, 3, 35)) +>E : Symbol(E, Decl(reinstantiatedParameterKeepsResolvedType.ts, 2, 12)) +>K : Symbol(K, Decl(reinstantiatedParameterKeepsResolvedType.ts, 3, 6)) +} +declare const i: I<{}>; +>i : Symbol(i, Decl(reinstantiatedParameterKeepsResolvedType.ts, 5, 13)) +>I : Symbol(I, Decl(reinstantiatedParameterKeepsResolvedType.ts, 0, 0)) + +i.f("x" as never, 1); +>i.f : Symbol(I.f, Decl(reinstantiatedParameterKeepsResolvedType.ts, 2, 39)) +>i : Symbol(i, Decl(reinstantiatedParameterKeepsResolvedType.ts, 5, 13)) +>f : Symbol(I.f, Decl(reinstantiatedParameterKeepsResolvedType.ts, 2, 39)) + diff --git a/tsc/testdata/baselines/reference/compiler/reinstantiatedParameterKeepsResolvedType.types b/tsc/testdata/baselines/reference/compiler/reinstantiatedParameterKeepsResolvedType.types new file mode 100644 index 0000000000000..824df47ea2a60 --- /dev/null +++ b/tsc/testdata/baselines/reference/compiler/reinstantiatedParameterKeepsResolvedType.types @@ -0,0 +1,25 @@ +//// [tests/cases/compiler/reinstantiatedParameterKeepsResolvedType.ts] //// + +=== reinstantiatedParameterKeepsResolvedType.ts === +// Instantiating E := {} turns the type of v into unknown. Inferring +// K := never must not then turn it into {}['V'][never], which is never. +interface I { +>V : object | undefined + + f(k: K, v: E['V'][K]): void; +>f : (k: K, v: E['V'][K]) => void +>k : K +>v : E["V"][K] +} +declare const i: I<{}>; +>i : I<{}> + +i.f("x" as never, 1); +>i.f("x" as never, 1) : void +>i.f : (k: K, v: unknown) => void +>i : I<{}> +>f : (k: K, v: unknown) => void +>"x" as never : never +>"x" : "x" +>1 : 1 + diff --git a/tsc/testdata/baselines/reference/compiler/spreadOfInstantiatedMappedMember.types b/tsc/testdata/baselines/reference/compiler/spreadOfInstantiatedMappedMember.types index 4f992281dbe50..a796a6ad992cd 100644 --- a/tsc/testdata/baselines/reference/compiler/spreadOfInstantiatedMappedMember.types +++ b/tsc/testdata/baselines/reference/compiler/spreadOfInstantiatedMappedMember.types @@ -27,8 +27,8 @@ declare const token: ReturnType | ReturnType>; >wrap : () => { filter: "text"; } export const spread = { ...token }; ->spread : { filter: "text"; } ->{ ...token } : { filter: "text"; } +>spread : { filter: "text"; } | { filter: "text"; } +>{ ...token } : { filter: "text"; } | { filter: "text"; } >token : { filter: "text"; } | { filter: "text"; } // An object rest of a union of two instantiations of `boxed` takes the member diff --git a/tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-with-multiple-files-and-complex-types.js b/tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-with-multiple-files-and-complex-types.js index deba75ba4156b..e9c62457f637f 100644 --- a/tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-with-multiple-files-and-complex-types.js +++ b/tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-with-multiple-files-and-complex-types.js @@ -221,8 +221,8 @@ declare const console: { log(msg: any): void; }; {"id":111,"symbolName":"__object","recursionId":96,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":2,"character":30},"end":{"line":2,"character":89}},"flags":["Object"],"display":"{ value: number; map: (fn: (x: number) => U) => { value: U; map: (fn: (x: number) => U) => Container; }; }"}, {"id":112,"symbolName":"U","recursionId":84,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":9},"end":{"line":3,"character":10}},"flags":["TypeParameter"]}, {"id":113,"symbolName":"__type","recursionId":85,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":16},"end":{"line":3,"character":27}},"flags":["Object"],"display":"(x: number) => any"}, -{"id":114,"symbolName":"__type","recursionId":85,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":16},"end":{"line":3,"character":27}},"flags":["Object"],"display":"(x: U) => any"}, -{"id":115,"symbolName":"__type","recursionId":85,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":16},"end":{"line":3,"character":27}},"flags":["Object"],"display":"(x: U) => U"}, +{"id":114,"symbolName":"__type","recursionId":85,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":16},"end":{"line":3,"character":27}},"flags":["Object"],"display":"(x: U) => U"}, +{"id":115,"symbolName":"__type","recursionId":85,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":16},"end":{"line":3,"character":27}},"flags":["Object"],"display":"(x: U) => any"}, {"id":116,"recursionId":97,"flags":["StringLiteral"],"display":"\"value\""}, {"id":117,"recursionId":98,"flags":["StringLiteral"],"display":"\"map\""}, {"id":118,"symbolName":"Container","recursionId":83,"instantiatedType":91,"typeArguments":[112],"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":1,"character":1},"end":{"line":4,"character":2}},"flags":["Object"]}, diff --git a/tsc/testdata/tests/cases/compiler/reinstantiatedParameterKeepsResolvedType.ts b/tsc/testdata/tests/cases/compiler/reinstantiatedParameterKeepsResolvedType.ts new file mode 100644 index 0000000000000..90d725f47d2e7 --- /dev/null +++ b/tsc/testdata/tests/cases/compiler/reinstantiatedParameterKeepsResolvedType.ts @@ -0,0 +1,10 @@ +// @strict: true +// @noEmit: true + +// Instantiating E := {} turns the type of v into unknown. Inferring +// K := never must not then turn it into {}['V'][never], which is never. +interface I { + f(k: K, v: E['V'][K]): void; +} +declare const i: I<{}>; +i.f("x" as never, 1); From 96dc9d60f0fd8fc3ff4d1967d728c4fbd32ef024 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sat, 7 Nov 2026 09:01:30 -0800 Subject: [PATCH 13/29] Keep declaration emit's visibility marks apart from cached visibility 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. --- tsc/internal/checker/emitresolver.go | 12 +++- tsc/internal/checker/emitsupport.go | 64 +++++++++++-------- ...ilityQueryOrder(checkorder=editorfirst).js | 40 ++---------- 3 files changed, 54 insertions(+), 62 deletions(-) diff --git a/tsc/internal/checker/emitresolver.go b/tsc/internal/checker/emitresolver.go index e4fad5c3f5b1f..0e2938dbe8d1b 100644 --- a/tsc/internal/checker/emitresolver.go +++ b/tsc/internal/checker/emitresolver.go @@ -22,8 +22,16 @@ type JSXLinks struct { // Links for declarations +// DeclarationLinks hold whether a declaration is visible. Declaration emit +// makes the declarations it depends on visible as it goes, so that is kept +// apart from what the rules of the declaration say, which is all that is +// cached: a declaration found invisible before emit made it or its container +// visible is still found visible afterwards. type DeclarationLinks struct { - isVisible core.Tristate // if declaration is depended upon by exported declarations + madeVisible bool // Declaration emit depends on the declaration + ruleKnown bool // Whether ruleVisible and ruleInheritsFrom are known + ruleVisible bool // Whether the declaration is visible by its own rules + ruleInheritsFrom *ast.Node // A declaration it is as visible as, if any } type DeclarationFileLinks struct { @@ -186,7 +194,7 @@ func (r *EmitResolver) markLinkedAliases(node *ast.Node) { var nextSymbol *ast.Symbol for _, declaration := range exportSymbol.Declarations() { - r.checker.emitResolverLinks.declarationLinks.Get(declaration).isVisible = core.TSTrue + r.checker.emitResolverLinks.declarationLinks.Get(declaration).madeVisible = true if ast.IsInternalModuleImportEqualsDeclaration(declaration) { // Add the referenced top container visible diff --git a/tsc/internal/checker/emitsupport.go b/tsc/internal/checker/emitsupport.go index 3da782c9ab4c4..4044c67089955 100644 --- a/tsc/internal/checker/emitsupport.go +++ b/tsc/internal/checker/emitsupport.go @@ -5,7 +5,6 @@ import ( "slices" "github.com/microsoft/TypeScript/tsc/internal/ast" - "github.com/microsoft/TypeScript/tsc/internal/core" "github.com/microsoft/TypeScript/tsc/internal/printer" ) @@ -17,27 +16,40 @@ func (c *Checker) isDeclarationVisible(node *ast.Node) bool { return false } - links := c.emitResolverLinks.declarationLinks.Get(node) - if links.isVisible == core.TSUnknown { - if c.determineIfDeclarationIsVisible(node) { - links.isVisible = core.TSTrue - } else { - links.isVisible = core.TSFalse + for { + links := c.emitResolverLinks.declarationLinks.Get(node) + if links.madeVisible { + return true + } + if !links.ruleKnown { + links.ruleVisible, links.ruleInheritsFrom = c.determineIfDeclarationIsVisible(node) + links.ruleKnown = true + } + if links.ruleInheritsFrom == nil { + return links.ruleVisible + } + node = links.ruleInheritsFrom + if !ast.IsParseTreeNode(node) { + return false } } - return links.isVisible == core.TSTrue } -func (c *Checker) determineIfDeclarationIsVisible(node *ast.Node) bool { +// determineIfDeclarationIsVisible returns whether node is visible by the rules +// of its declaration alone, or, if those make it as visible as another +// declaration, that declaration. Which declarations are visible depends on +// what declaration emit makes visible (see DeclarationLinks), so whether +// another declaration is visible is not part of the result. +func (c *Checker) determineIfDeclarationIsVisible(node *ast.Node) (visible bool, inheritsFrom *ast.Node) { switch node.Kind { case ast.KindJSDocCallbackTag, // ast.KindJSDocEnumTag, // !!! TODO: JSDoc @enum support? ast.KindJSDocTypedefTag: // Top-level jsdoc type aliases are considered exported // First parent is comment node, second is hosting declaration or token; we only care about those tokens or declarations whose parent is a source file - return node.Parent != nil && node.Parent.Parent != nil && node.Parent.Parent.Parent != nil && ast.IsSourceFile(node.Parent.Parent.Parent) + return node.Parent != nil && node.Parent.Parent != nil && node.Parent.Parent.Parent != nil && ast.IsSourceFile(node.Parent.Parent.Parent), nil case ast.KindBindingElement: - return c.isDeclarationVisible(node.Parent.Parent) + return false, node.Parent.Parent case ast.KindVariableDeclaration, ast.KindModuleDeclaration, ast.KindClassDeclaration, @@ -51,23 +63,23 @@ func (c *Checker) determineIfDeclarationIsVisible(node *ast.Node) bool { if ast.IsBindingPattern(node.Name()) && len(node.Name().Elements()) == 0 { // If the binding pattern is empty, this variable declaration is not visible - return false + return false, nil } // falls through } // External module augmentation is always visible // A @typedef at top-level in an external module is always visible if ast.IsExternalModuleAugmentation(node) || ast.IsImplicitlyExportedJSDocDeclaration(node) { - return true + return true, nil } parent := ast.GetDeclarationContainer(node) // If the node is not exported or it is not ambient module element (except import declaration) if c.getCombinedModifierFlagsCached(node)&ast.ModifierFlagsExport == 0 && !(node.Kind != ast.KindImportEqualsDeclaration && parent.Kind != ast.KindSourceFile && parent.Flags&ast.NodeFlagsAmbient != 0) { - return ast.IsGlobalSourceFile(parent) + return ast.IsGlobalSourceFile(parent), nil } // Exported members/ambient module elements (exception import declaration) are visible if parent is visible - return c.isDeclarationVisible(parent) + return false, parent case ast.KindPropertyDeclaration, ast.KindPropertySignature, @@ -77,10 +89,10 @@ func (c *Checker) determineIfDeclarationIsVisible(node *ast.Node) bool { ast.KindMethodSignature: if c.GetEffectiveDeclarationFlags(node, ast.ModifierFlagsPrivate|ast.ModifierFlagsProtected) != 0 { // Private/protected properties/methods are not visible - return false + return false, nil } // Public properties/methods are visible if its parents are visible, so: - return c.isDeclarationVisible(node.Parent) + return false, node.Parent case ast.KindConstructor, ast.KindConstructSignature, @@ -98,38 +110,38 @@ func (c *Checker) determineIfDeclarationIsVisible(node *ast.Node) bool { ast.KindIntersectionType, ast.KindParenthesizedType, ast.KindNamedTupleMember: - return c.isDeclarationVisible(node.Parent) + return false, node.Parent // Default binding, import specifier and namespace import is visible // only on demand so by default it is not visible case ast.KindImportClause, ast.KindNamespaceImport, ast.KindImportSpecifier: - return false + return false, nil // Type parameters are always visible case ast.KindTypeParameter: - return true + return true, nil // Source file and namespace export are always visible case ast.KindSourceFile, ast.KindNamespaceExportDeclaration: - return true + return true, nil // Export assignments do not create name bindings outside the module case ast.KindExportAssignment: - return false + return false, nil // An `export {X}` (without a module specifier) is itself a visible re-export of // the named binding; it contributes to the symbol's external visibility. case ast.KindExportSpecifier: exportDecl := node.Parent.Parent if ast.IsExportDeclaration(exportDecl) && exportDecl.AsExportDeclaration().ModuleSpecifier == nil { - return c.isDeclarationVisible(exportDecl.Parent) + return false, exportDecl.Parent } - return false + return false, nil default: - return false + return false, nil } } @@ -205,7 +217,7 @@ func (c *Checker) hasVisibleDeclarations(symbol *ast.Symbol, shouldComputeAliasT var addVisibleAlias func(declaration *ast.Node, aliasingStatement *ast.Node) if shouldComputeAliasToMakeVisible { addVisibleAlias = func(declaration *ast.Node, aliasingStatement *ast.Node) { - c.emitResolverLinks.declarationLinks.Get(declaration).isVisible = core.TSTrue + c.emitResolverLinks.declarationLinks.Get(declaration).madeVisible = true if aliasesToMakeVisibleSet == nil { aliasesToMakeVisibleSet = make(map[ast.NodeId]*ast.Node) } diff --git a/tsc/testdata/baselines/reference/compiler/exportAssignmentNestedVisibilityQueryOrder(checkorder=editorfirst).js b/tsc/testdata/baselines/reference/compiler/exportAssignmentNestedVisibilityQueryOrder(checkorder=editorfirst).js index 405c0f22e5b40..7f22b20127d74 100644 --- a/tsc/testdata/baselines/reference/compiler/exportAssignmentNestedVisibilityQueryOrder(checkorder=editorfirst).js +++ b/tsc/testdata/baselines/reference/compiler/exportAssignmentNestedVisibilityQueryOrder(checkorder=editorfirst).js @@ -22,42 +22,14 @@ module.exports = m; //// [exportAssignmentNestedVisibilityQueryOrder.d.ts] declare namespace m { + interface Inner { + x: number; + } + interface Outer { + use: (inner: Inner) => Outer; + } } declare var m: { (): m.Outer; }; export = m; - - -//// [DtsFileErrors] - - -exportAssignmentNestedVisibilityQueryOrder.d.ts(4,11): error TS2694: Namespace 'm' has no exported member 'Outer'. - - -==== exportAssignmentNestedVisibilityQueryOrder.d.ts (1 errors) ==== - declare namespace m { - } - declare var m: { - (): m.Outer; - ~~~~~ -!!! error TS2694: Namespace 'm' has no exported member 'Outer'. - }; - export = m; - - -!!!! File exportAssignmentNestedVisibilityQueryOrder.d.ts differs from original emit in noCheck emit -//// [exportAssignmentNestedVisibilityQueryOrder.d.ts] ---- Expected The full check baseline -+++ Actual with noCheck set -@@ -1,4 +1,10 @@ - declare namespace m { -+ interface Inner { -+ x: number; -+ } -+ interface Outer { -+ use: (inner: Inner) => Outer; -+ } - } - declare var m: { - (): m.Outer; \ No newline at end of file From 14202ff53f38e17448d1a27349102f244d7e3892 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sat, 7 Nov 2026 08:59:19 -0800 Subject: [PATCH 14/29] Do not count names resolved to print a type as uses 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 --- tsc/internal/checker/checker.go | 23 ++++++++++++------- tsc/internal/checker/nodebuilderimpl.go | 6 ++--- tsc/internal/checker/nodecopy.go | 4 ++-- ...ryOrder(checkorder=editorfirst).errors.txt | 12 ++++++++++ ...eryOrder(checkorder=hoverfirst).errors.txt | 12 ++++++++++ 5 files changed, 44 insertions(+), 13 deletions(-) create mode 100644 tsc/testdata/baselines/reference/compiler/unusedTypeParameterQueryOrder(checkorder=editorfirst).errors.txt create mode 100644 tsc/testdata/baselines/reference/compiler/unusedTypeParameterQueryOrder(checkorder=hoverfirst).errors.txt diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index 291243a180394..d637b070ea651 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -16539,6 +16539,13 @@ func (c *Checker) getTargetOfAliasDeclaration(node *ast.Node, dontRecursivelyRes * Resolves a qualified name and any involved aliases. */ func (c *Checker) resolveEntityName(name *ast.Node, meaning ast.SymbolFlags, ignoreErrors bool, dontResolveAlias bool, location *ast.Node) *ast.Symbol { + return c.resolveEntityNameEx(name, meaning, ignoreErrors, dontResolveAlias, location, true /*use*/) +} + +// resolveEntityNameEx is resolveEntityName, where a name that is not a use, +// such as one resolved to print a type, does not mark what it resolves to as +// referenced. +func (c *Checker) resolveEntityNameEx(name *ast.Node, meaning ast.SymbolFlags, ignoreErrors bool, dontResolveAlias bool, location *ast.Node, use bool) *ast.Symbol { if ast.NodeIsMissing(name) { return nil } @@ -16558,26 +16565,26 @@ func (c *Checker) resolveEntityName(name *ast.Node, meaning ast.SymbolFlags, ign resolveLocation = name } if meaning == ast.SymbolFlagsNamespace { - symbol = c.getMergedSymbol(c.resolveName(resolveLocation, name.Text(), meaning, nil, true /*isUse*/, false /*excludeGlobals*/)) + symbol = c.getMergedSymbol(c.resolveName(resolveLocation, name.Text(), meaning, nil, use /*isUse*/, false /*excludeGlobals*/)) if symbol == nil { - alias := c.getMergedSymbol(c.resolveName(resolveLocation, name.Text(), ast.SymbolFlagsAlias, nil, true /*isUse*/, false /*excludeGlobals*/)) + alias := c.getMergedSymbol(c.resolveName(resolveLocation, name.Text(), ast.SymbolFlagsAlias, nil, use /*isUse*/, false /*excludeGlobals*/)) if alias != nil && alias.Name() == ast.InternalSymbolNameExportEquals { // resolve typedefs exported from commonjs, stored on the module symbol symbol = alias.Parent() } } if symbol == nil && message != nil { - c.resolveName(resolveLocation, name.Text(), meaning, message, true /*isUse*/, false /*excludeGlobals*/) + c.resolveName(resolveLocation, name.Text(), meaning, message, use /*isUse*/, false /*excludeGlobals*/) } } else { - symbol = c.getMergedSymbol(c.resolveName(resolveLocation, name.Text(), meaning, message, true /*isUse*/, false /*excludeGlobals*/)) + symbol = c.getMergedSymbol(c.resolveName(resolveLocation, name.Text(), meaning, message, use /*isUse*/, false /*excludeGlobals*/)) } case ast.KindQualifiedName: qualified := name.AsQualifiedName() - symbol = c.resolveQualifiedName(name, qualified.Left, qualified.Right, meaning, ignoreErrors, location) + symbol = c.resolveQualifiedName(name, qualified.Left, qualified.Right, meaning, ignoreErrors, location, use) case ast.KindPropertyAccessExpression: access := name.AsPropertyAccessExpression() - symbol = c.resolveQualifiedName(name, access.Expression, access.Name(), meaning, ignoreErrors, location) + symbol = c.resolveQualifiedName(name, access.Expression, access.Name(), meaning, ignoreErrors, location, use) default: panic("Unknown entity name kind") } @@ -16594,8 +16601,8 @@ func (c *Checker) resolveEntityName(name *ast.Node, meaning ast.SymbolFlags, ign return symbol } -func (c *Checker) resolveQualifiedName(name *ast.Node, left *ast.Node, right *ast.Node, meaning ast.SymbolFlags, ignoreErrors bool, location *ast.Node) *ast.Symbol { - namespace := c.resolveEntityName(left, ast.SymbolFlagsNamespace, ignoreErrors, false /*dontResolveAlias*/, location) +func (c *Checker) resolveQualifiedName(name *ast.Node, left *ast.Node, right *ast.Node, meaning ast.SymbolFlags, ignoreErrors bool, location *ast.Node, use bool) *ast.Symbol { + namespace := c.resolveEntityNameEx(left, ast.SymbolFlagsNamespace, ignoreErrors, false /*dontResolveAlias*/, location, use) if namespace == nil || ast.NodeIsMissing(right) { return nil } diff --git a/tsc/internal/checker/nodebuilderimpl.go b/tsc/internal/checker/nodebuilderimpl.go index d25c14a5fff44..903dac99f466d 100644 --- a/tsc/internal/checker/nodebuilderimpl.go +++ b/tsc/internal/checker/nodebuilderimpl.go @@ -448,7 +448,7 @@ func (b *NodeBuilderImpl) serializeTypeName(node *ast.Node, isTypeOf bool, typeA if isTypeOf { meaning = ast.SymbolFlagsValue } - symbol := b.ch.resolveEntityName(node, meaning, true, false, node) + symbol := b.ch.resolveEntityNameEx(node, meaning, true, false, node, false /*use*/) if symbol == nil { return nil } @@ -2452,12 +2452,12 @@ func (b *NodeBuilderImpl) shouldUsePlaceholderForProperty(propertySymbol *ast.Sy func (b *NodeBuilderImpl) trackComputedName(accessExpression *ast.Node, enclosingDeclaration *ast.Node) { // get symbol of the first identifier of the entityName firstIdentifier := ast.GetFirstIdentifier(accessExpression) - name := b.ch.resolveName(enclosingDeclaration, firstIdentifier.Text(), ast.SymbolFlagsValue|ast.SymbolFlagsExportValue, nil /*nameNotFoundMessage*/, true /*isUse*/, false) + name := b.ch.resolveName(enclosingDeclaration, firstIdentifier.Text(), ast.SymbolFlagsValue|ast.SymbolFlagsExportValue, nil /*nameNotFoundMessage*/, false /*isUse*/, false) if name != nil { b.ctx.tracker.TrackSymbol(name, enclosingDeclaration, ast.SymbolFlagsValue) } else { // Name does not resolve at target location, track symbol at dest location (should be inaccessible) - fallback := b.ch.resolveName(firstIdentifier, firstIdentifier.Text(), ast.SymbolFlagsValue|ast.SymbolFlagsExportValue, nil /*nameNotFoundMessage*/, true /*isUse*/, false) + fallback := b.ch.resolveName(firstIdentifier, firstIdentifier.Text(), ast.SymbolFlagsValue|ast.SymbolFlagsExportValue, nil /*nameNotFoundMessage*/, false /*isUse*/, false) if fallback != nil { b.ctx.tracker.TrackSymbol(fallback, enclosingDeclaration, ast.SymbolFlagsValue) } diff --git a/tsc/internal/checker/nodecopy.go b/tsc/internal/checker/nodecopy.go index 01aef8fca6a5f..1c048e32e909b 100644 --- a/tsc/internal/checker/nodecopy.go +++ b/tsc/internal/checker/nodecopy.go @@ -340,7 +340,7 @@ func getExistingNodeTreeVisitor(b *NodeBuilderImpl, bound *recoveryBoundary) *as } return introducesError, attachSymbolToLeftmostIdentifier(leftmost, node, sym), nil } - sym = b.ch.resolveEntityName(leftmost, meaning, true, true, nil) + sym = b.ch.resolveEntityNameEx(leftmost, meaning, true, true, nil, false /*use*/) if b.ctx.enclosingDeclaration != nil && !(sym != nil && sym.Flags()&ast.SymbolFlagsTypeParameter != 0) { sym = b.ch.getExportSymbolOfValueSymbolIfExported(sym) // Some declarations may be transplanted to a new location. @@ -348,7 +348,7 @@ func getExistingNodeTreeVisitor(b *NodeBuilderImpl, bound *recoveryBoundary) *as // We also check for the unknownSymbol because when we create a fake scope some parameters may actually not be usable // either because they are the expanded rest parameter, // or because they are the newly added parameters from the tuple, which might have different meanings in the original context - symAtLocation := b.ch.resolveEntityName(leftmost, meaning, true, true, b.ctx.enclosingDeclaration) + symAtLocation := b.ch.resolveEntityNameEx(leftmost, meaning, true, true, b.ctx.enclosingDeclaration, false /*use*/) if // Check for unusable parameters symbols symAtLocation == b.ch.unknownSymbol || diff --git a/tsc/testdata/baselines/reference/compiler/unusedTypeParameterQueryOrder(checkorder=editorfirst).errors.txt b/tsc/testdata/baselines/reference/compiler/unusedTypeParameterQueryOrder(checkorder=editorfirst).errors.txt new file mode 100644 index 0000000000000..55aecda78cdca --- /dev/null +++ b/tsc/testdata/baselines/reference/compiler/unusedTypeParameterQueryOrder(checkorder=editorfirst).errors.txt @@ -0,0 +1,12 @@ +unusedTypeParameterQueryOrder.ts(3,17): error TS6196: 'T' is declared but never used. + + +==== unusedTypeParameterQueryOrder.ts (1 errors) ==== + class A { + f() { + return () => {}; + ~ +!!! error TS6196: 'T' is declared but never used. + } + } + \ No newline at end of file diff --git a/tsc/testdata/baselines/reference/compiler/unusedTypeParameterQueryOrder(checkorder=hoverfirst).errors.txt b/tsc/testdata/baselines/reference/compiler/unusedTypeParameterQueryOrder(checkorder=hoverfirst).errors.txt new file mode 100644 index 0000000000000..55aecda78cdca --- /dev/null +++ b/tsc/testdata/baselines/reference/compiler/unusedTypeParameterQueryOrder(checkorder=hoverfirst).errors.txt @@ -0,0 +1,12 @@ +unusedTypeParameterQueryOrder.ts(3,17): error TS6196: 'T' is declared but never used. + + +==== unusedTypeParameterQueryOrder.ts (1 errors) ==== + class A { + f() { + return () => {}; + ~ +!!! error TS6196: 'T' is declared but never used. + } + } + \ No newline at end of file From 277a5e3c48a094b1ac6b0dd2a4ef407ac0a0fdf2 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sat, 7 Nov 2026 09:34:28 -0800 Subject: [PATCH 15/29] Do not let names in JSDoc keep imports 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. --- tsc/internal/checker/checker.go | 5 ++ ...isionQueryOrder(checkorder=editorfirst).js | 81 ------------------- 2 files changed, 5 insertions(+), 81 deletions(-) diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index d637b070ea651..6df754ce2a713 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -29863,6 +29863,11 @@ func (c *Checker) markLinkedReferences(location *ast.Node, hint ReferenceHint, p // except for properties (which can be decorated). return } + if location.Flags&ast.NodeFlagsJSDoc != 0 { + // Neither are names in JSDoc, which only an editor resolves as + // expressions, such as the name of a link. + return + } switch hint { case ReferenceHintIdentifier: c.markIdentifierAliasReferenced(location) diff --git a/tsc/testdata/baselines/reference/compiler/jsdocLinkImportElisionQueryOrder(checkorder=editorfirst).js b/tsc/testdata/baselines/reference/compiler/jsdocLinkImportElisionQueryOrder(checkorder=editorfirst).js index 0da32e96e9494..bead869eaeb90 100644 --- a/tsc/testdata/baselines/reference/compiler/jsdocLinkImportElisionQueryOrder(checkorder=editorfirst).js +++ b/tsc/testdata/baselines/reference/compiler/jsdocLinkImportElisionQueryOrder(checkorder=editorfirst).js @@ -17,90 +17,9 @@ export function foo() {} Object.defineProperty(exports, "__esModule", { value: true }); //// [b.js] "use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.foo = foo; -const a = __importStar(require("./a")); /** * See {@link a.A}. */ function foo() { } - - -!!!! File /b.js differs from original emit in noCheck emit -//// [b.js] ---- Expected The full check baseline -+++ Actual with noCheck set -@@ -1,40 +1,6 @@ - "use strict"; --var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { -- if (k2 === undefined) k2 = k; -- var desc = Object.getOwnPropertyDescriptor(m, k); -- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { -- desc = { enumerable: true, get: function() { return m[k]; } }; -- } -- Object.defineProperty(o, k2, desc); --}) : (function(o, m, k, k2) { -- if (k2 === undefined) k2 = k; -- o[k2] = m[k]; --})); --var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { -- Object.defineProperty(o, "default", { enumerable: true, value: v }); --}) : function(o, v) { -- o["default"] = v; --}); --var __importStar = (this && this.__importStar) || (function () { -- var ownKeys = function(o) { -- ownKeys = Object.getOwnPropertyNames || function (o) { -- var ar = []; -- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; -- return ar; -- }; -- return ownKeys(o); -- }; -- return function (mod) { -- if (mod && mod.__esModule) return mod; -- var result = {}; -- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); -- __setModuleDefault(result, mod); -- return result; -- }; --})(); - Object.defineProperty(exports, "__esModule", { value: true }); - exports.foo = foo; --const a = __importStar(require("./a")); - /** - * See {@link a.A}. - */ \ No newline at end of file From 9b766d51fe9ac7cd34ddfbace3441a7753b56113 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sat, 7 Nov 2026 10:29:47 -0800 Subject: [PATCH 16/29] Resolve the type of an accessor before the return type of its getter The type of a get accessor without a type annotation is the type its getter returns, but it is inferred apart from the return type of the getter's signature. Checking resolves the type of the accessor first, so a cycle through the accessor is detected and reported there. Asked for the return type of the getter first, as inlay hints do, the cycle through the accessor was detected only within the return type, whose result then hid the error. Resolving the type of the accessor first, as checking does, gives the same result either way. --- tsc/internal/checker/checker.go | 10 ++++++++++ ...eryOrder(checkorder=editorfirst).errors.txt | 18 ++++++++++++++++++ ...ypeQueryOrder(checkorder=editorfirst).types | 2 +- ...ueryOrder(checkorder=hoverfirst).errors.txt | 12 ------------ 4 files changed, 29 insertions(+), 13 deletions(-) create mode 100644 tsc/testdata/baselines/reference/compiler/getterReturnTypeQueryOrder(checkorder=editorfirst).errors.txt delete mode 100644 tsc/testdata/baselines/reference/compiler/unusedTypeParameterQueryOrder(checkorder=hoverfirst).errors.txt diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index 6df754ce2a713..33fc533b25da1 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -21239,6 +21239,16 @@ func (c *Checker) getReturnTypeOfSignature(sig *Signature) *Type { if sig.resolvedReturnType != nil { return sig.resolvedReturnType } + if d := sig.declaration; d != nil && sig.target == nil && ast.IsGetAccessorDeclaration(d) && d.Type() == nil { + // The type of the accessor infers the same return type separately, and + // is what checking the getter resolves first. Resolved from within + // this return type instead, a cycle through the accessor would be + // detected at the accessor rather than here. + c.getTypeOfSymbol(c.getSymbolOfDeclaration(d)) + if sig.resolvedReturnType != nil { + return sig.resolvedReturnType + } + } if !c.pushTypeResolution(sig, TypeSystemPropertyNameResolvedReturnType) { return c.errorType } diff --git a/tsc/testdata/baselines/reference/compiler/getterReturnTypeQueryOrder(checkorder=editorfirst).errors.txt b/tsc/testdata/baselines/reference/compiler/getterReturnTypeQueryOrder(checkorder=editorfirst).errors.txt new file mode 100644 index 0000000000000..4f28621217936 --- /dev/null +++ b/tsc/testdata/baselines/reference/compiler/getterReturnTypeQueryOrder(checkorder=editorfirst).errors.txt @@ -0,0 +1,18 @@ +getterReturnTypeQueryOrder.ts(4,9): error TS7023: 'options' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. + + +==== getterReturnTypeQueryOrder.ts (1 errors) ==== + declare const props: Options; + + class Container { + get options() { + ~~~~~~~ +!!! error TS7023: 'options' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. + return { container: this, ...props } as Options; + } + } + + interface Options { + container?: Container; + } + \ No newline at end of file diff --git a/tsc/testdata/baselines/reference/compiler/getterReturnTypeQueryOrder(checkorder=editorfirst).types b/tsc/testdata/baselines/reference/compiler/getterReturnTypeQueryOrder(checkorder=editorfirst).types index 903243eef9cb7..df84cc21241ea 100644 --- a/tsc/testdata/baselines/reference/compiler/getterReturnTypeQueryOrder(checkorder=editorfirst).types +++ b/tsc/testdata/baselines/reference/compiler/getterReturnTypeQueryOrder(checkorder=editorfirst).types @@ -8,7 +8,7 @@ class Container { >Container : Container get options() { ->options : Options +>options : any return { container: this, ...props } as Options; >{ container: this, ...props } as Options : Options diff --git a/tsc/testdata/baselines/reference/compiler/unusedTypeParameterQueryOrder(checkorder=hoverfirst).errors.txt b/tsc/testdata/baselines/reference/compiler/unusedTypeParameterQueryOrder(checkorder=hoverfirst).errors.txt deleted file mode 100644 index 55aecda78cdca..0000000000000 --- a/tsc/testdata/baselines/reference/compiler/unusedTypeParameterQueryOrder(checkorder=hoverfirst).errors.txt +++ /dev/null @@ -1,12 +0,0 @@ -unusedTypeParameterQueryOrder.ts(3,17): error TS6196: 'T' is declared but never used. - - -==== unusedTypeParameterQueryOrder.ts (1 errors) ==== - class A { - f() { - return () => {}; - ~ -!!! error TS6196: 'T' is declared but never used. - } - } - \ No newline at end of file From 0ae5e4458363cd53c3f9e788227116dc5de115b8 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sun, 8 Nov 2026 00:36:19 -0800 Subject: [PATCH 17/29] Decide restrictive type parameters from their declarations Whether a conditional type is definitely true is checked with type parameters replaced by restrictive forms without constraints. A type parameter needed none if it had no constraint declaration and its constraint had not been computed yet, so an infer type parameter with a constraint implied by where it appears needed one only once something had asked for its constraint. Deciding from the declaration instead gives the same answer however the constraint was reached. A copy of a type parameter, such as its restrictive form, shares the symbol of the declared one, so it is decided from its own constraint. Otherwise the restrictive form of a restrictive form is a new type parameter each time, and the instantiations using it multiply (seen in xstate). --- tsc/internal/checker/checker.go | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index 33fc533b25da1..c7e44e8fffea9 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -26041,7 +26041,7 @@ func (c *Checker) getRestrictiveInstantiation(t *Type) *Type { } func (c *Checker) getRestrictiveTypeParameter(t *Type) *Type { - if t.AsTypeParameter().constraint == nil && c.getConstraintDeclaration(t) == nil || t.AsTypeParameter().constraint == c.noConstraintType { + if c.isRestrictivelyUnconstrained(t) { return t } key := CachedTypeKey{kind: CachedTypeKindRestrictiveTypeParameter, typeId: t.id} @@ -26055,6 +26055,21 @@ func (c *Checker) getRestrictiveTypeParameter(t *Type) *Type { return result } +// isRestrictivelyUnconstrained reports whether t needs no restrictive form. +// For a declared type parameter, that is decided from its declaration rather +// than from whether its constraint is computed yet, which an implied +// constraint of an infer type parameter would make depend on what was asked +// first. A copy of a type parameter, such as its restrictive form, shares its +// symbol, and is decided from its own constraint, so that the restrictive form +// of a restrictive form is itself. +func (c *Checker) isRestrictivelyUnconstrained(t *Type) bool { + tp := t.AsTypeParameter() + if tp.origin == nil && !tp.isDistributed && t.symbol != nil && core.Some(t.symbol.Declarations(), ast.IsTypeParameterDeclaration) { + return isUnconstrainedTypeParameter(t) + } + return tp.constraint == nil || tp.constraint == c.noConstraintType +} + func (c *Checker) restrictiveMapperWorker(t *Type) *Type { if t.flags&TypeFlagsTypeParameter != 0 { return c.getRestrictiveTypeParameter(t) From e8fd989c09a0da80fd95cefa7084aa081581f061 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sun, 8 Nov 2026 09:07:18 -0800 Subject: [PATCH 18/29] Find the contextual type of a node from the innermost check of it A node checked again inside a check of itself, as when the call resolving its type re-enters through a callback, has a contextual type pushed for each check. The lookup took the outermost one, so the inner check of an argument saw the parameter type the outer resolution had instantiated with its inferences, rather than its own, and whether `const` type parameters made the argument readonly depended on whether its call had been resolved before. The original checker searches from the innermost, as this does now. --- tsc/internal/checker/checker.go | 2 +- ...unkReverseMapped(checkorder=default).types | 20 +++++++++---------- ...ReverseMapped(checkorder=typesfirst).types | 20 +++++++++---------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index c7e44e8fffea9..b0198afe4ae5a 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -32616,7 +32616,7 @@ func (c *Checker) popContextualType() { } func (c *Checker) findContextualNode(node *ast.Node, includeCaches bool) int { - for i, info := range c.contextualInfos { + for i, info := range slices.Backward(c.contextualInfos) { if node == info.node && (includeCaches || !info.isCache) { return i } diff --git a/tsc/testdata/baselines/reference/compiler/circularScopeThunkReverseMapped(checkorder=default).types b/tsc/testdata/baselines/reference/compiler/circularScopeThunkReverseMapped(checkorder=default).types index 41f30b7dbe3f2..6edac2ffefa43 100644 --- a/tsc/testdata/baselines/reference/compiler/circularScopeThunkReverseMapped(checkorder=default).types +++ b/tsc/testdata/baselines/reference/compiler/circularScopeThunkReverseMapped(checkorder=default).types @@ -27,8 +27,8 @@ declare function type(x: T): Type; >x : T export const $ = scope({ ->$ : Scope<{ a: Type; b: unknown; }> ->scope({ a: type("string").pipe(function (s) { return s.length; }), b: () => $.type("a").pipe(function (n) { return n === 0; }),}) : Scope<{ a: Type; b: unknown; }> +>$ : Scope<{ readonly a: Type; readonly b: () => Type; }> +>scope({ a: type("string").pipe(function (s) { return s.length; }), b: () => $.type("a").pipe(function (n) { return n === 0; }),}) : Scope<{ readonly a: Type; readonly b: () => Type; }> >scope : (def: Validate) => Scope >{ a: type("string").pipe(function (s) { return s.length; }), b: () => $.type("a").pipe(function (n) { return n === 0; }),} : { a: Type; b: () => Type; } @@ -52,9 +52,9 @@ export const $ = scope({ >$.type("a").pipe(function (n) { return n === 0; }) : Type >$.type("a").pipe : (f: (x: number) => U) => Type >$.type("a") : Type ->$.type : (k: k_1) => Resolve<{ a: Type; b: unknown; }[k_1]> ->$ : Scope<{ a: Type; b: unknown; }> ->type : (k: k_1) => Resolve<{ a: Type; b: unknown; }[k_1]> +>$.type : (k: k_1) => Resolve<{ readonly a: Type; readonly b: () => Type; }[k_1]> +>$ : Scope<{ readonly a: Type; readonly b: () => Type; }> +>type : (k: k_1) => Resolve<{ readonly a: Type; readonly b: () => Type; }[k_1]> >"a" : "a" >pipe : (f: (x: number) => U) => Type >function (n) { return n === 0; } : (n: number) => n is 0 @@ -67,8 +67,8 @@ export const $ = scope({ // Entered from the function in the first property when queried in reverse export const $2 = scope({ ->$2 : Scope<{ a: Type; b: unknown; }> ->scope({ a: type("string").pipe(function (s) { return s.length; }), b: () => $2.type("a").pipe((n: number) => n === 0),}) : Scope<{ a: Type; b: unknown; }> +>$2 : Scope<{ readonly a: Type; readonly b: () => Type; }> +>scope({ a: type("string").pipe(function (s) { return s.length; }), b: () => $2.type("a").pipe((n: number) => n === 0),}) : Scope<{ readonly a: Type; readonly b: () => Type; }> >scope : (def: Validate) => Scope >{ a: type("string").pipe(function (s) { return s.length; }), b: () => $2.type("a").pipe((n: number) => n === 0),} : { a: Type; b: () => Type; } @@ -92,9 +92,9 @@ export const $2 = scope({ >$2.type("a").pipe((n: number) => n === 0) : Type >$2.type("a").pipe : (f: (x: number) => U) => Type >$2.type("a") : Type ->$2.type : (k: k_1) => Resolve<{ a: Type; b: unknown; }[k_1]> ->$2 : Scope<{ a: Type; b: unknown; }> ->type : (k: k_1) => Resolve<{ a: Type; b: unknown; }[k_1]> +>$2.type : (k: k_1) => Resolve<{ readonly a: Type; readonly b: () => Type; }[k_1]> +>$2 : Scope<{ readonly a: Type; readonly b: () => Type; }> +>type : (k: k_1) => Resolve<{ readonly a: Type; readonly b: () => Type; }[k_1]> >"a" : "a" >pipe : (f: (x: number) => U) => Type >(n: number) => n === 0 : (n: number) => n is 0 diff --git a/tsc/testdata/baselines/reference/compiler/circularScopeThunkReverseMapped(checkorder=typesfirst).types b/tsc/testdata/baselines/reference/compiler/circularScopeThunkReverseMapped(checkorder=typesfirst).types index 41f30b7dbe3f2..6edac2ffefa43 100644 --- a/tsc/testdata/baselines/reference/compiler/circularScopeThunkReverseMapped(checkorder=typesfirst).types +++ b/tsc/testdata/baselines/reference/compiler/circularScopeThunkReverseMapped(checkorder=typesfirst).types @@ -27,8 +27,8 @@ declare function type(x: T): Type; >x : T export const $ = scope({ ->$ : Scope<{ a: Type; b: unknown; }> ->scope({ a: type("string").pipe(function (s) { return s.length; }), b: () => $.type("a").pipe(function (n) { return n === 0; }),}) : Scope<{ a: Type; b: unknown; }> +>$ : Scope<{ readonly a: Type; readonly b: () => Type; }> +>scope({ a: type("string").pipe(function (s) { return s.length; }), b: () => $.type("a").pipe(function (n) { return n === 0; }),}) : Scope<{ readonly a: Type; readonly b: () => Type; }> >scope : (def: Validate) => Scope >{ a: type("string").pipe(function (s) { return s.length; }), b: () => $.type("a").pipe(function (n) { return n === 0; }),} : { a: Type; b: () => Type; } @@ -52,9 +52,9 @@ export const $ = scope({ >$.type("a").pipe(function (n) { return n === 0; }) : Type >$.type("a").pipe : (f: (x: number) => U) => Type >$.type("a") : Type ->$.type : (k: k_1) => Resolve<{ a: Type; b: unknown; }[k_1]> ->$ : Scope<{ a: Type; b: unknown; }> ->type : (k: k_1) => Resolve<{ a: Type; b: unknown; }[k_1]> +>$.type : (k: k_1) => Resolve<{ readonly a: Type; readonly b: () => Type; }[k_1]> +>$ : Scope<{ readonly a: Type; readonly b: () => Type; }> +>type : (k: k_1) => Resolve<{ readonly a: Type; readonly b: () => Type; }[k_1]> >"a" : "a" >pipe : (f: (x: number) => U) => Type >function (n) { return n === 0; } : (n: number) => n is 0 @@ -67,8 +67,8 @@ export const $ = scope({ // Entered from the function in the first property when queried in reverse export const $2 = scope({ ->$2 : Scope<{ a: Type; b: unknown; }> ->scope({ a: type("string").pipe(function (s) { return s.length; }), b: () => $2.type("a").pipe((n: number) => n === 0),}) : Scope<{ a: Type; b: unknown; }> +>$2 : Scope<{ readonly a: Type; readonly b: () => Type; }> +>scope({ a: type("string").pipe(function (s) { return s.length; }), b: () => $2.type("a").pipe((n: number) => n === 0),}) : Scope<{ readonly a: Type; readonly b: () => Type; }> >scope : (def: Validate) => Scope >{ a: type("string").pipe(function (s) { return s.length; }), b: () => $2.type("a").pipe((n: number) => n === 0),} : { a: Type; b: () => Type; } @@ -92,9 +92,9 @@ export const $2 = scope({ >$2.type("a").pipe((n: number) => n === 0) : Type >$2.type("a").pipe : (f: (x: number) => U) => Type >$2.type("a") : Type ->$2.type : (k: k_1) => Resolve<{ a: Type; b: unknown; }[k_1]> ->$2 : Scope<{ a: Type; b: unknown; }> ->type : (k: k_1) => Resolve<{ a: Type; b: unknown; }[k_1]> +>$2.type : (k: k_1) => Resolve<{ readonly a: Type; readonly b: () => Type; }[k_1]> +>$2 : Scope<{ readonly a: Type; readonly b: () => Type; }> +>type : (k: k_1) => Resolve<{ readonly a: Type; readonly b: () => Type; }[k_1]> >"a" : "a" >pipe : (f: (x: number) => U) => Type >(n: number) => n === 0 : (n: number) => n is 0 From 806fa7f79108370e67e0d9b8e857ed84935e46da Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sun, 8 Nov 2026 22:34:36 -0800 Subject: [PATCH 19/29] Keep the narrowing of a type variable in a conditional's true branch In the true branch of a conditional type, a reference to the check type is narrowed to the extends type by a substitution type. Instantiating it dropped the narrowing whenever the restrictive instantiation of the base type was assignable to the constraint, on the grounds that the conditional type would then resolve to its true branch. A conditional type whose check type is a type variable is deferred instead, so for a type variable that test decides nothing, and it can pass without the base satisfying the constraint: a deferred conditional type whose restrictive instantiation has no distributive constraint can have the base constraint never. Whether that conditional type had a distributive constraint depended on which restrictive instantiations were computed before, so the narrowing of a type such as Children> in type Children = S["states"] extends Record ? S["states"] : Record; was lost or kept depending on order, and losing it rejects Children<...> as a Record although both branches are one. (seen in xstate) --- tsc/internal/checker/checker.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index b0198afe4ae5a..4d1788c420ff5 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -23654,16 +23654,15 @@ func (c *Checker) instantiateTypeWorker(t *Type, m *TypeMapper, alias *TypeAlias newConstraint := c.instantiateType(t.AsSubstitutionType().constraint, m) // A substitution type originates in the true branch of a conditional type and can be resolved // to just the base type in the same cases as the conditional type resolves to its true branch - // (because the base type is then known to satisfy the constraint). - if newBaseType.flags&TypeFlagsTypeVariable != 0 && c.isGenericType(newConstraint) { + // (because the base type is then known to satisfy the constraint). A conditional type whose + // check type is a type variable is deferred instead, so a substitution for a type variable is + // kept. + if newBaseType.flags&TypeFlagsTypeVariable != 0 { return c.getSubstitutionType(newBaseType, newConstraint) } if newConstraint.flags&TypeFlagsAnyOrUnknown != 0 || c.isTypeAssignableTo(c.getRestrictiveInstantiation(newBaseType), c.getRestrictiveInstantiation(newConstraint)) { return newBaseType } - if newBaseType.flags&TypeFlagsTypeVariable != 0 { - return c.getSubstitutionType(newBaseType, newConstraint) - } return c.getIntersectionType([]*Type{newConstraint, newBaseType}) } return t From f1161346ac2e85deea5655f6198f7f596b45b092 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Tue, 10 Nov 2026 22:24:31 -0800 Subject: [PATCH 20/29] Analyze each flow loop independently of the reference reaching it A loop's control flow type is cached for every reference with the same key, but its analysis counted depth from the reference that reached the loop first. A reference already near the depth limit made the loop give up and cached an error type for all references, including those inside the loop, while any other order cached a correct type. Querying a deep reference first could thus turn a whole loop's narrowing into any and report TS2563 that checking in program order does not. The analysis of a loop now measures depth from the loop and neither reuses nor leaves behind nodes the reference visited, so its result and whether it gives up do not depend on the reference. A loop that gives up is remembered, so every reference reaching it reports the failure as it would by analyzing the loop itself. As depth no longer accumulates across loops, a much larger limit on the whole walk only guards the call stack, and is reached only by runaway walks. --- tsc/internal/checker/checker.go | 10 +- tsc/internal/checker/flow.go | 53 +- ...eckOrder(checkorder=typesfirst).errors.txt | 1031 ----------------- ...pthCheckOrder(checkorder=typesfirst).types | 6 +- 4 files changed, 58 insertions(+), 1042 deletions(-) delete mode 100644 tsc/testdata/baselines/reference/compiler/flowLoopDepthCheckOrder(checkorder=typesfirst).errors.txt diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index 4d1788c420ff5..5676a927b6a91 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -260,6 +260,12 @@ type FlowLoopKey struct { refKey CacheHashKey } +type flowLoopCacheEntry struct { + t *Type + // The analysis of the loop gave up because it was too deep. + tooDeep bool +} + type FlowLoopInfo struct { key FlowLoopKey types []*Type @@ -857,7 +863,7 @@ type Checker struct { lastGetCombinedModifierFlagsResult ast.ModifierFlags freeinferenceState *InferenceState freeFlowState *FlowState - flowLoopCache map[FlowLoopKey]*Type + flowLoopCache map[FlowLoopKey]flowLoopCacheEntry flowLoopStack []FlowLoopInfo sharedFlows []SharedFlow antecedentTypes []*Type @@ -1123,7 +1129,7 @@ func NewChecker(program Program, tracer *Tracer) (*Checker, *sync.Mutex) { c.zeroType = c.getNumberLiteralType(0) c.zeroBigIntType = c.getBigIntLiteralType(jsnum.PseudoBigInt{}) c.typeofType = c.getUnionType(core.Map(slices.Sorted(maps.Keys(typeofNEFacts)), c.getStringLiteralType)) - c.flowLoopCache = make(map[FlowLoopKey]*Type) + c.flowLoopCache = make(map[FlowLoopKey]flowLoopCacheEntry) c.flowNodeReachable = make(map[*ast.FlowNode]bool) c.flowNodePostSuper = make(map[*ast.FlowNode]bool) c.subtypeRelation = &Relation{} diff --git a/tsc/internal/checker/flow.go b/tsc/internal/checker/flow.go index 50fdea5bbb724..7dd6c4d3d9c4e 100644 --- a/tsc/internal/checker/flow.go +++ b/tsc/internal/checker/flow.go @@ -44,6 +44,8 @@ type FlowState struct { flowContainer *ast.Node refKey CacheHashKey depth int + depthBase int // depth of the loop analyses depth is measured from + limitHits int sharedFlowStart int reduceLabels []*ast.FlowReduceLabelData next *FlowState @@ -111,14 +113,25 @@ func (c *Checker) getFlowTypeOfReferenceEx(reference *ast.Node, declaredType *Ty return resultType } +// A walk gives up after maxFlowDepth nested steps. Each loop is analyzed +// once per reference key and its result is cached, so the analysis of a +// loop measures depth from the loop rather than from the reference that +// reached it first. maxFlowTotalDepth only guards the call stack against +// loop analyses nested so deeply that the walk is certain to be runaway. +const ( + maxFlowDepth = 2000 + maxFlowTotalDepth = 20 * maxFlowDepth +) + func (c *Checker) getTypeAtFlowNode(f *FlowState, flow *ast.FlowNode) FlowType { - if f.depth == 2000 { + if f.depth == maxFlowDepth || f.depthBase+f.depth == maxFlowTotalDepth { // We have made 2000 recursive invocations. To avoid overflowing the call stack we report an error // and give up on this reference. Each reference hits the limit on its own, so its type does not depend // on which other references were analyzed first. if tr := c.tracer; tr != nil { tr.Instant(tracing.PhaseCheckTypes, "getTypeAtFlowNode_DepthLimit", map[string]any{"depth": f.depth}) } + f.limitHits++ c.reportFlowControlError(f.reference) return FlowType{t: c.errorType} } @@ -1330,9 +1343,37 @@ func (c *Checker) getTypeAtFlowLoopLabel(f *FlowState, flow *ast.FlowNode) FlowT key := FlowLoopKey{flowNode: flow, refKey: f.refKey} // If we have previously computed the control flow type for the reference at // this flow loop junction, return the cached type. - if cached := c.flowLoopCache[key]; cached != nil { - return FlowType{t: cached} + if cached := c.flowLoopCache[key]; cached.t != nil { + if cached.tooDeep { + // Analyzing the loop again would give up again. + c.reportFlowControlError(f.reference) + } + return FlowType{t: cached.t} + } + // The result is cached for every reference with this key, so the analysis + // neither uses the depth left to this reference nor the nodes this + // reference already visited, and the nodes it visits are not reused + // after it. + depth, depthBase, sharedFlowStart, hits := f.depth, f.depthBase, f.sharedFlowStart, f.limitHits + f.depthBase += f.depth + f.depth = 0 + f.sharedFlowStart = len(c.sharedFlows) + result := c.getTypeAtFlowLoopLabelUncached(f, flow, key) + c.sharedFlows = c.sharedFlows[:f.sharedFlowStart] + f.depth, f.depthBase, f.sharedFlowStart = depth, depthBase, sharedFlowStart + if cached := c.flowLoopCache[key]; cached.t != nil { + if f.limitHits != hits { + cached.tooDeep = true + c.flowLoopCache[key] = cached + } else if cached.tooDeep { + // Another reference completed the analysis meanwhile. + c.reportFlowControlError(f.reference) + } } + return result +} + +func (c *Checker) getTypeAtFlowLoopLabelUncached(f *FlowState, flow *ast.FlowNode, key FlowLoopKey) FlowType { // If this flow loop junction and reference are already being processed, return // the union of the types computed for each branch so far, marked as incomplete. // It is possible to see an empty array in cases where loops are nested and the @@ -1377,8 +1418,8 @@ func (c *Checker) getTypeAtFlowLoopLabel(f *FlowState, flow *ast.FlowNode) FlowT // If we see a value appear in the cache it is a sign that control flow analysis // was restarted and completed by checkExpressionCached. We can simply pick up // the resulting type and bail out. - if cached := c.flowLoopCache[key]; cached != nil { - return FlowType{t: cached} + if cached := c.flowLoopCache[key]; cached.t != nil { + return FlowType{t: cached.t} } } antecedentTypes = core.AppendIfUnique(antecedentTypes, flowType.t) @@ -1401,7 +1442,7 @@ func (c *Checker) getTypeAtFlowLoopLabel(f *FlowState, flow *ast.FlowNode) FlowT if firstAntecedentType.incomplete { return c.newFlowType(result, true /*incomplete*/) } - c.flowLoopCache[key] = result + c.flowLoopCache[key] = flowLoopCacheEntry{t: result} return FlowType{t: result} } diff --git a/tsc/testdata/baselines/reference/compiler/flowLoopDepthCheckOrder(checkorder=typesfirst).errors.txt b/tsc/testdata/baselines/reference/compiler/flowLoopDepthCheckOrder(checkorder=typesfirst).errors.txt deleted file mode 100644 index 2e4675292eeb0..0000000000000 --- a/tsc/testdata/baselines/reference/compiler/flowLoopDepthCheckOrder(checkorder=typesfirst).errors.txt +++ /dev/null @@ -1,1031 +0,0 @@ -flowLoopDepthCheckOrder.ts(7,1): error TS2563: The containing function or module body is too large for control flow analysis. - - -==== flowLoopDepthCheckOrder.ts (1 errors) ==== - // A loop is analyzed once for all references to the same name and the - // result is cached, so its analysis must not depend on the reference that - // reached it first. 'deep' reaches the loop with little depth left. - // Analyzing the loop from there must not make 'x' inside it give up when - // 'deep' is queried first. - - declare function cond(): boolean; - ~~~~~~~ -!!! error TS2563: The containing function or module body is too large for control flow analysis. - declare let b: boolean; - - let x: string | number = 0; - while (cond()) { - if (typeof x === "string") { x = 1; } else { x = "a"; } - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - } - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - if (b) {} - const deep = x; - \ No newline at end of file diff --git a/tsc/testdata/baselines/reference/compiler/flowLoopDepthCheckOrder(checkorder=typesfirst).types b/tsc/testdata/baselines/reference/compiler/flowLoopDepthCheckOrder(checkorder=typesfirst).types index 247a176187cc8..efbb9a68a52ad 100644 --- a/tsc/testdata/baselines/reference/compiler/flowLoopDepthCheckOrder(checkorder=typesfirst).types +++ b/tsc/testdata/baselines/reference/compiler/flowLoopDepthCheckOrder(checkorder=typesfirst).types @@ -24,7 +24,7 @@ while (cond()) { if (typeof x === "string") { x = 1; } else { x = "a"; } >typeof x === "string" : boolean >typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" ->x : any +>x : string | number >"string" : "string" >x = 1 : 1 >x : string | number @@ -3064,6 +3064,6 @@ if (b) {} >b : boolean const deep = x; ->deep : any ->x : any +>deep : string | number +>x : string | number From c46685d54793190372e51d93764af1f373ca5e2e Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Tue, 10 Nov 2026 22:27:20 -0800 Subject: [PATCH 21/29] Make base constraints independent of the walk that reaches them A walk for a base constraint gives up on types nested 10 levels deep that are already on its stack, so a base constraint computed inside a walk depended on the types the walk came through, and caching it let every later walk reuse that. Real projects reach this: in webpack and xstate, cached constraints of zod and xstate types disagreed with the ones the walks reusing them would have computed. More types on the stack only make a walk give up sooner, so a base constraint whose own walk did not give up is the same however deep it is entered, and stays cached. One whose walk gave up inside another is not cached. Each cached constraint keeps how deep its own walk went and how often each recursion identity repeated along it, and a walk reuses it only where computing it again would give up nowhere; otherwise it computes the constraint again, as its own kind of resolution so that re-entering it is still a cycle. Reusing only constraints whose walks stay within the first 10 levels made projects with deep walks that never repeat compute the same constraints over and over (seen in misskey). That made distributiveConditionalBaseConstraint report a false error. The code there passed only because a deep walk had cached "no constraint" for a conditional type whose constraints lead back to it, which a walk from the type itself finds circular, and a conditional type with a circular base constraint had no constraint at all. Its constraint is computed from its branches one level at a time, so it is well defined regardless, and is now available; the cycle members themselves stay circular, as infiniteConstraints needs. A distributive conditional type still does not distribute over such a check type, though: doing so leads back into the circularity and leaves it without a usable constraint, where the constraint of its branches was well defined. arktype spreads Parameters of such a type. --- tsc/internal/checker/checker.go | 240 ++++++++++++++++-- tsc/internal/checker/types.go | 10 +- ...hCheckOrder(checkorder=default).errors.txt | 5 +- ...epthCheckOrder(checkorder=default).symbols | 2 + ...tDepthCheckOrder(checkorder=default).types | 4 +- ...eckOrder(checkorder=typesfirst).errors.txt | 16 ++ ...hCheckOrder(checkorder=typesfirst).symbols | 2 - ...pthCheckOrder(checkorder=typesfirst).types | 4 +- ...tCheckOrder(checkorder=default).errors.txt | 6 +- ...aintCheckOrder(checkorder=default).symbols | 4 +- ...traintCheckOrder(checkorder=default).types | 10 +- ...CheckOrder(checkorder=isolated).errors.txt | 6 +- ...intCheckOrder(checkorder=isolated).symbols | 4 - ...raintCheckOrder(checkorder=isolated).types | 8 +- ...tCheckOrder(checkorder=reverse).errors.txt | 6 +- ...aintCheckOrder(checkorder=reverse).symbols | 4 +- ...traintCheckOrder(checkorder=reverse).types | 10 +- ...eckOrder(checkorder=typesfirst).errors.txt | 5 +- ...tCheckOrder(checkorder=typesfirst).symbols | 2 + ...intCheckOrder(checkorder=typesfirst).types | 6 +- ...dConditionalConstraintInterning.errors.txt | 41 +++ 21 files changed, 321 insertions(+), 74 deletions(-) create mode 100644 tsc/testdata/baselines/reference/compiler/baseConstraintDepthCheckOrder(checkorder=typesfirst).errors.txt create mode 100644 tsc/testdata/baselines/reference/compiler/deferredConditionalConstraintInterning.errors.txt diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index 5676a927b6a91..3f35d8d2064ad 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -67,6 +67,7 @@ const ( TypeSystemPropertyNameInitializerIsUndefined TypeSystemPropertyNameAliasTarget TypeSystemPropertyNameComputedPropertyName + TypeSystemPropertyNameBaseConstraintInWalk ) type TypeResolution struct { @@ -618,6 +619,9 @@ type Checker struct { memberLayoutCount uint32 instantiationStack []*Type conditionalConstraintDepth uint32 + baseConstraintWalk baseConstraintWalk + baseConstraintRepeats map[*Type][]baseConstraintRepeat // Repeats of the walks of kept base constraints; see "Base constraint walks" + baseConstraintRepeatBuffer []baseConstraintRepeat // Repeats of the walks in progress inlineLevel int serializationLevel int currentNode *ast.Node @@ -1017,6 +1021,7 @@ func NewChecker(program Program, tracer *Tracer) (*Checker, *sync.Mutex) { c.discriminatedContextualTypes = make(map[DiscriminatedContextualTypeKey]*Type) c.instantiationExpressionTypes = make(map[InstantiationExpressionKey]*Type) c.substitutionTypes = make(map[SubstitutionTypeKey]*Type) + c.baseConstraintRepeats = make(map[*Type][]baseConstraintRepeat) c.reverseMappedCache = make(map[ReverseMappedTypeKey]*Type) c.reverseHomomorphicMappedCache = make(map[ReverseMappedTypeKey]*Type) c.iterationTypesCache = make(map[IterationTypesKey]IterationTypes) @@ -18102,10 +18107,11 @@ func (c *Checker) computeConstraintFromIndexedAccess(t *Type) *Type { } func (c *Checker) getConstraintOfConditionalType(t *Type) *Type { - if c.hasNonCircularBaseConstraint(t) { - return c.getConstraintFromConditionalType(t) - } - return nil + // The constraint of a conditional type is computed from its branches one + // level at a time, so it is well defined even where following constraints + // from it leads back to it, which makes its base constraint circular. + // Callers following constraints further stop where they nest too deeply. + return c.getConstraintFromConditionalType(t) } func (c *Checker) getConstraintFromConditionalType(t *Type) *Type { @@ -18154,7 +18160,14 @@ func (c *Checker) getConstraintOfDistributiveConditionalType(t *Type) *Type { if d.root.isDistributive && c.cachedTypes[CachedTypeKey{kind: CachedTypeKindRestrictiveInstantiation, typeId: t.id}] != t { constraint := c.getSimplifiedType(d.checkType, false /*writing*/) if constraint == d.checkType { - constraint = c.getConstraintOfType(constraint) + // A conditional check type whose base constraint is circular + // has a constraint, but distributing over it leads back into + // the circularity, leaving this type without a usable one. + if constraint.flags&TypeFlagsConditional != 0 && !c.hasNonCircularBaseConstraint(constraint) { + constraint = nil + } else { + constraint = c.getConstraintOfType(constraint) + } } if constraint != nil && constraint != d.checkType { instantiated := c.getConditionalTypeInstantiation(t, prependTypeMapping(d.root.checkType, constraint, d.mapper), true /*forConstraint*/, nil) @@ -19820,6 +19833,8 @@ func (c *Checker) typeResolutionHasProperty(r *TypeResolution) bool { return c.aliasSymbolLinks.Get(r.target.(*ast.Symbol)).aliasTarget != nil case TypeSystemPropertyNameComputedPropertyName: return c.typeNodeLinks.Get(r.target.(*ast.Node)).resolvedType != nil + case TypeSystemPropertyNameBaseConstraintInWalk: + return false } panic("Unhandled case in typeResolutionHasProperty") } @@ -23940,7 +23955,7 @@ func (c *Checker) instantiateMappedType(t *Type, typeParameters []*Type, m *Type return s } if d.declaration.NameType == nil { - if c.isArrayType(s) || s.flags&TypeFlagsAny != 0 && c.findResolutionCycleStartIndex(typeVariable, TypeSystemPropertyNameResolvedBaseConstraint) < 0 && c.hasArrayOrTypeTypeConstraint(typeVariable) { + if c.isArrayType(s) || s.flags&TypeFlagsAny != 0 && !c.isBaseConstraintInProgress(typeVariable) && c.hasArrayOrTypeTypeConstraint(typeVariable) { return c.instantiateMappedArrayType(s, t, prependTypeMapping(typeVariable, s, m)) } if isTupleType(s) { @@ -29113,28 +29128,174 @@ func (c *Checker) getBaseConstraintOfType(t *Type) *Type { return nil } +// Base constraint walks +// +// A walk for a base constraint gives up on types nested 10 levels deep that +// are already on its stack, or nested 50 levels deep, so a base constraint +// computed inside a walk may depend on the types the walk came through. As +// more types on the stack only make a walk give up sooner, a base constraint +// whose own walk did not give up is the same wherever it is computed, and is +// kept; one whose walk gave up is kept only if the walk was started for it. +// +// A kept base constraint is reused inside a walk where computing it again +// would give up nowhere: where its own walk, whose depth is kept with it, +// stays within the first 10 levels, or within 50 levels with none of the +// types it came through repeating a type on the stack or another of them. A +// summary of the recursion identities its walk came through, and how often +// each repeated, is kept with it for this. Elsewhere it is computed again +// inside the walk, as a distinct resolution so that re-entering it is still a +// cycle. + +const ( + baseConstraintFreeDepth = 10 + baseConstraintMaxDepth = 50 +) + +// countBaseConstraintRepeats returns how many of the recursion identities on a +// walk's stack are identity. +func countBaseConstraintRepeats(identity RecursionId, stack []RecursionId) int { + count := 0 + for _, id := range stack { + if id == identity { + count++ + } + } + return count +} + +// A baseConstraintRepeat summarizes the frames with one recursion identity +// along the paths of a walk: the most on any path. +type baseConstraintRepeat struct { + identity RecursionId + count int +} + +type baseConstraintWalk struct { + depth int32 // Deepest level the walk has reached + gaveUp bool + start int // Length of the stack the walk was entered with + repeatsStart int // Start of the walk's repeats in Checker.baseConstraintRepeatBuffer +} + +// addBaseConstraintRepeat records count frames with identity in the walk +// being computed. Its repeats are the end of the buffer, from repeatsStart. +func (c *Checker) addBaseConstraintRepeat(identity RecursionId, count int) { + if _, ok := identity.value.(*Type); ok { + // A type that is its own recursion identity repeats only where a walk + // re-enters it, which reusing a kept base constraint never accounts + // for: that is a circularity, whose results are not kept. + return + } + repeats := c.baseConstraintRepeatBuffer[c.baseConstraintWalk.repeatsStart:] + for i := range repeats { + if r := &repeats[i]; r.identity == identity { + r.count = max(r.count, count) + return + } + } + c.baseConstraintRepeatBuffer = append(c.baseConstraintRepeatBuffer, baseConstraintRepeat{identity: identity, count: count}) +} + +// addInnerBaseConstraintWalk records in the walk being computed a walk +// entered with stack that reached height levels below it, with repeats, +// counting the frames of the walk on the stack that its frames repeat. The +// walk's own repeats end at end in the buffer; when repeats are those of an +// inner walk just computed, which follow, each is read before the walk's own +// are written over it. +func (c *Checker) addInnerBaseConstraintWalk(height int32, repeats []baseConstraintRepeat, gaveUp bool, stack []RecursionId, end int) { + w := &c.baseConstraintWalk + w.depth = max(w.depth, int32(len(stack))+height) + w.gaveUp = w.gaveUp || gaveUp + frames := stack[w.start:] + buffer := c.baseConstraintRepeatBuffer[:end] + for _, r := range repeats { + count := countBaseConstraintRepeats(r.identity, frames) + r.count + found := false + for i := w.repeatsStart; i < len(buffer); i++ { + if own := &buffer[i]; own.identity == r.identity { + own.count = max(own.count, count) + found = true + break + } + } + if !found { + buffer = append(buffer, baseConstraintRepeat{identity: r.identity, count: count}) + } + } + c.baseConstraintRepeatBuffer = buffer +} + +// canReuseBaseConstraint reports whether computing the kept base constraint of +// t inside the walk with stack would give up nowhere. +func (c *Checker) canReuseBaseConstraint(t *Type, stack []RecursionId) bool { + depth := len(stack) + int(t.baseConstraintHeight) + if depth < baseConstraintFreeDepth { + return true + } + if depth >= baseConstraintMaxDepth { + return false + } + for _, r := range c.baseConstraintRepeats[t] { + if countBaseConstraintRepeats(r.identity, stack)+r.count > 1 { + return false + } + } + return true +} + func (c *Checker) getResolvedBaseConstraint(t *Type, stack []RecursionId) *Type { constrained := t.AsConstrainedType() if constrained == nil { return t } if constrained.resolvedBaseConstraint != nil { + if len(stack) != 0 { + if !c.canReuseBaseConstraint(t, stack) { + constraint, _, _, _ := c.resolveBaseConstraint(t, stack, TypeSystemPropertyNameBaseConstraintInWalk) + return constraint + } + c.addInnerBaseConstraintWalk(int32(t.baseConstraintHeight), c.baseConstraintRepeats[t], false, stack, len(c.baseConstraintRepeatBuffer)) + } return constrained.resolvedBaseConstraint } - if !c.pushTypeResolution(t, TypeSystemPropertyNameResolvedBaseConstraint) { - return c.circularConstraintType + saveWalk := c.baseConstraintWalk + saveBufferLength := len(c.baseConstraintRepeatBuffer) + if len(stack) == 0 { + c.baseConstraintWalk = baseConstraintWalk{repeatsStart: saveBufferLength} } - var constraint *Type - // We always explore at least 10 levels of nested constraints. Thereafter, we continue to explore - // up to 50 levels of nested constraints provided there are no "deeply nested" types on the stack - // (i.e. no types for which five instantiations have been recorded on the stack). If we reach 50 - // levels of nesting, we are presumably exploring a repeating pattern with a long cycle that hasn't - // yet triggered the deeply nested limiter. We have no test cases that actually get to 50 levels of - // nesting, so it is effectively just a safety stop. - identity := getRecursionIdentity(t) - if len(stack) < 10 || len(stack) < 50 && !slices.Contains(stack, identity) { - constraint = c.computeBaseConstraint(c.getSimplifiedType(t /*writing*/, false), append(stack, identity)) + constraint, height, repeats, gaveUp := c.resolveBaseConstraint(t, stack, TypeSystemPropertyNameResolvedBaseConstraint) + if len(stack) == 0 { + c.baseConstraintWalk = saveWalk + c.baseConstraintRepeatBuffer = c.baseConstraintRepeatBuffer[:saveBufferLength] + } + if gaveUp && len(stack) != 0 { + // Depends on the walk it was computed in. + return constraint + } + if constrained.resolvedBaseConstraint == nil { + if gaveUp { + // Computing it inside another walk would give up as well. + t.baseConstraintHeight = math.MaxUint8 + } else { + t.baseConstraintHeight = uint8(min(height, math.MaxUint8)) + if len(repeats) != 0 { + c.baseConstraintRepeats[t] = repeats + } + } + constrained.resolvedBaseConstraint = constraint + } + return constraint +} + +// resolveBaseConstraint computes the base constraint of t inside the walk +// with stack as the resolution of propertyName, and returns it with the depth +// its own walk reached, the repeats of its walk if they are to be kept, and +// whether its own walk gave up. +func (c *Checker) resolveBaseConstraint(t *Type, stack []RecursionId, propertyName TypeSystemPropertyName) (*Type, int32, []baseConstraintRepeat, bool) { + if !c.pushTypeResolution(t, propertyName) { + return c.circularConstraintType, 0, nil, false } + constraint, height, repeats, gaveUp := c.walkBaseConstraint(t, stack, propertyName == TypeSystemPropertyNameResolvedBaseConstraint) if !c.popTypeResolution() { if t.flags&TypeFlagsTypeParameter != 0 { errorNode := c.getConstraintDeclaration(t) @@ -29150,10 +29311,45 @@ func (c *Checker) getResolvedBaseConstraint(t *Type, stack []RecursionId) *Type if constraint == nil { constraint = c.noConstraintType } - if constrained.resolvedBaseConstraint == nil { - constrained.resolvedBaseConstraint = constraint - } - return constraint + return constraint, height, repeats, gaveUp +} + +func (c *Checker) isBaseConstraintInProgress(t *Type) bool { + return c.findResolutionCycleStartIndex(t, TypeSystemPropertyNameResolvedBaseConstraint) >= 0 || c.findResolutionCycleStartIndex(t, TypeSystemPropertyNameBaseConstraintInWalk) >= 0 +} + +// walkBaseConstraint computes the base constraint of t inside the walk with +// stack, and returns it with the depth its own walk reached, the repeats of +// its walk if they are to be kept and it did not give up, and whether its own +// walk gave up. +func (c *Checker) walkBaseConstraint(t *Type, stack []RecursionId, keep bool) (*Type, int32, []baseConstraintRepeat, bool) { + saveWalk := c.baseConstraintWalk + repeatsStart := len(c.baseConstraintRepeatBuffer) + c.baseConstraintWalk = baseConstraintWalk{depth: int32(len(stack)), start: len(stack), repeatsStart: repeatsStart} + var constraint *Type + // We always explore at least 10 levels of nested constraints. Thereafter, we continue to explore + // up to 50 levels of nested constraints provided there are no "deeply nested" types on the stack + // (i.e. no types for which five instantiations have been recorded on the stack). If we reach 50 + // levels of nesting, we are presumably exploring a repeating pattern with a long cycle that hasn't + // yet triggered the deeply nested limiter. We have no test cases that actually get to 50 levels of + // nesting, so it is effectively just a safety stop. + identity := getRecursionIdentity(t) + if len(stack) < baseConstraintFreeDepth || len(stack) < baseConstraintMaxDepth && !slices.Contains(stack, identity) { + c.addBaseConstraintRepeat(identity, 1) + constraint = c.computeBaseConstraint(c.getSimplifiedType(t /*writing*/, false), append(stack, identity)) + } else { + c.baseConstraintWalk.gaveUp = true + } + walk := c.baseConstraintWalk + height := walk.depth - int32(len(stack)) + repeats := c.baseConstraintRepeatBuffer[repeatsStart:] + var kept []baseConstraintRepeat + if keep && !walk.gaveUp { + kept = slices.Clone(repeats) + } + c.baseConstraintWalk = saveWalk + c.addInnerBaseConstraintWalk(height, repeats, walk.gaveUp, stack, repeatsStart) + return constraint, height, kept, walk.gaveUp } func (c *Checker) computeBaseConstraint(t *Type, stack []RecursionId) *Type { diff --git a/tsc/internal/checker/types.go b/tsc/internal/checker/types.go index 67d071d579142..456d5f970900c 100644 --- a/tsc/internal/checker/types.go +++ b/tsc/internal/checker/types.go @@ -810,10 +810,12 @@ type Type struct { objectFlags ObjectFlags id TypeId kind typeKind `customlint:"protected"` - generation uint16 // see Checker.typeGeneration; zero until computed - symbol *ast.Symbol - alias *TypeAlias - checker *Checker + // Depth of the walk for the cached base constraint; see "Base constraint walks" + baseConstraintHeight uint8 + generation uint16 // see Checker.typeGeneration; zero until computed + symbol *ast.Symbol + alias *TypeAlias + checker *Checker } // Enforce the layout required by the pointer conversions, on every architecture. diff --git a/tsc/testdata/baselines/reference/compiler/baseConstraintDepthCheckOrder(checkorder=default).errors.txt b/tsc/testdata/baselines/reference/compiler/baseConstraintDepthCheckOrder(checkorder=default).errors.txt index a247afb883ac5..a56b4e4614407 100644 --- a/tsc/testdata/baselines/reference/compiler/baseConstraintDepthCheckOrder(checkorder=default).errors.txt +++ b/tsc/testdata/baselines/reference/compiler/baseConstraintDepthCheckOrder(checkorder=default).errors.txt @@ -1,8 +1,7 @@ baseConstraintDepthCheckOrder.ts(7,7): error TS2339: Property 'length' does not exist on type 'T0'. -baseConstraintDepthCheckOrder.ts(8,7): error TS2339: Property 'length' does not exist on type 'T20'. -==== baseConstraintDepthCheckOrder.ts (2 errors) ==== +==== baseConstraintDepthCheckOrder.ts (1 errors) ==== // The base constraint of 'T0' is 60 type parameters deep and gives up after // 50, while that of 'T20' is found 40 deep. Neither may depend on which was // computed first: computing 'T0' first must not leave 'T20' without its @@ -13,7 +12,5 @@ baseConstraintDepthCheckOrder.ts(8,7): error TS2339: Property 'length' does not ~~~~~~ !!! error TS2339: Property 'length' does not exist on type 'T0'. y.length; - ~~~~~~ -!!! error TS2339: Property 'length' does not exist on type 'T20'. } \ No newline at end of file diff --git a/tsc/testdata/baselines/reference/compiler/baseConstraintDepthCheckOrder(checkorder=default).symbols b/tsc/testdata/baselines/reference/compiler/baseConstraintDepthCheckOrder(checkorder=default).symbols index 5cbd14622b89f..bea0526aba4e1 100644 --- a/tsc/testdata/baselines/reference/compiler/baseConstraintDepthCheckOrder(checkorder=default).symbols +++ b/tsc/testdata/baselines/reference/compiler/baseConstraintDepthCheckOrder(checkorder=default).symbols @@ -136,6 +136,8 @@ function fx : Symbol(x, Decl(baseConstraintDepthCheckOrder.ts, 5, 1015)) y.length; +>y.length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) >y : Symbol(y, Decl(baseConstraintDepthCheckOrder.ts, 5, 1021)) +>length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) } diff --git a/tsc/testdata/baselines/reference/compiler/baseConstraintDepthCheckOrder(checkorder=default).types b/tsc/testdata/baselines/reference/compiler/baseConstraintDepthCheckOrder(checkorder=default).types index fbc7735f18c4c..e36c86990b2ec 100644 --- a/tsc/testdata/baselines/reference/compiler/baseConstraintDepthCheckOrder(checkorder=default).types +++ b/tsc/testdata/baselines/reference/compiler/baseConstraintDepthCheckOrder(checkorder=default).types @@ -17,8 +17,8 @@ function flength : any y.length; ->y.length : any +>y.length : number >y : T20 ->length : any +>length : number } diff --git a/tsc/testdata/baselines/reference/compiler/baseConstraintDepthCheckOrder(checkorder=typesfirst).errors.txt b/tsc/testdata/baselines/reference/compiler/baseConstraintDepthCheckOrder(checkorder=typesfirst).errors.txt new file mode 100644 index 0000000000000..a56b4e4614407 --- /dev/null +++ b/tsc/testdata/baselines/reference/compiler/baseConstraintDepthCheckOrder(checkorder=typesfirst).errors.txt @@ -0,0 +1,16 @@ +baseConstraintDepthCheckOrder.ts(7,7): error TS2339: Property 'length' does not exist on type 'T0'. + + +==== baseConstraintDepthCheckOrder.ts (1 errors) ==== + // The base constraint of 'T0' is 60 type parameters deep and gives up after + // 50, while that of 'T20' is found 40 deep. Neither may depend on which was + // computed first: computing 'T0' first must not leave 'T20' without its + // constraint, and computing 'T20' first must not let 'T0' reuse it. + + function f(x: T0, y: T20) { + x.length; + ~~~~~~ +!!! error TS2339: Property 'length' does not exist on type 'T0'. + y.length; + } + \ No newline at end of file diff --git a/tsc/testdata/baselines/reference/compiler/baseConstraintDepthCheckOrder(checkorder=typesfirst).symbols b/tsc/testdata/baselines/reference/compiler/baseConstraintDepthCheckOrder(checkorder=typesfirst).symbols index 9b381179dc902..bea0526aba4e1 100644 --- a/tsc/testdata/baselines/reference/compiler/baseConstraintDepthCheckOrder(checkorder=typesfirst).symbols +++ b/tsc/testdata/baselines/reference/compiler/baseConstraintDepthCheckOrder(checkorder=typesfirst).symbols @@ -133,9 +133,7 @@ function fT20 : Symbol(T20, Decl(baseConstraintDepthCheckOrder.ts, 5, 331)) x.length; ->x.length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) >x : Symbol(x, Decl(baseConstraintDepthCheckOrder.ts, 5, 1015)) ->length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) y.length; >y.length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) diff --git a/tsc/testdata/baselines/reference/compiler/baseConstraintDepthCheckOrder(checkorder=typesfirst).types b/tsc/testdata/baselines/reference/compiler/baseConstraintDepthCheckOrder(checkorder=typesfirst).types index 0fb24141449cc..e36c86990b2ec 100644 --- a/tsc/testdata/baselines/reference/compiler/baseConstraintDepthCheckOrder(checkorder=typesfirst).types +++ b/tsc/testdata/baselines/reference/compiler/baseConstraintDepthCheckOrder(checkorder=typesfirst).types @@ -12,9 +12,9 @@ function fy : T20 x.length; ->x.length : number +>x.length : any >x : T0 ->length : number +>length : any y.length; >y.length : number diff --git a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=default).errors.txt b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=default).errors.txt index a1474c01bbc98..055c38a3cf0b6 100644 --- a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=default).errors.txt +++ b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=default).errors.txt @@ -1,5 +1,5 @@ -deepIndexedAccessChainConstraintCheckOrder.ts(14,14): error TS2339: Property 'b' does not exist on type 'T'. deepIndexedAccessChainConstraintCheckOrder.ts(14,20): error TS2339: Property 'b' does not exist on type 'T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. +deepIndexedAccessChainConstraintCheckOrder.ts(18,14): error TS2339: Property 'b' does not exist on type 'U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. ==== deepIndexedAccessChainConstraintCheckOrder.ts (2 errors) ==== @@ -17,13 +17,13 @@ deepIndexedAccessChainConstraintCheckOrder.ts(14,20): error TS2339: Property 'b' y: T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] ): string { return x.b + y.b; - ~ -!!! error TS2339: Property 'b' does not exist on type 'T'. ~ !!! error TS2339: Property 'b' does not exist on type 'T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. } function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]): string { return y.b; + ~ +!!! error TS2339: Property 'b' does not exist on type 'U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. } \ No newline at end of file diff --git a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=default).symbols b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=default).symbols index d4a45f6e4fbab..7d3b169810303 100644 --- a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=default).symbols +++ b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=default).symbols @@ -40,7 +40,9 @@ function victim( ): string { return x.b + y.b; +>x.b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) >x : Symbol(x, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 9, 31)) +>b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) >y : Symbol(y, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 10, 9)) } @@ -52,8 +54,6 @@ function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"][" >U : Symbol(U, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 16, 14)) return y.b; ->y.b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) >y : Symbol(y, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 16, 29)) ->b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) } diff --git a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=default).types b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=default).types index f3de565d90af5..eea7d8a40d8ca 100644 --- a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=default).types +++ b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=default).types @@ -32,10 +32,10 @@ function victim( ): string { return x.b + y.b; ->x.b + y.b : any ->x.b : any +>x.b + y.b : string +>x.b : string >x : T ->b : any +>b : string >y.b : any >y : T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] >b : any @@ -46,8 +46,8 @@ function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"][" >y : U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] return y.b; ->y.b : string +>y.b : any >y : U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] ->b : string +>b : any } diff --git a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=isolated).errors.txt b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=isolated).errors.txt index a1474c01bbc98..055c38a3cf0b6 100644 --- a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=isolated).errors.txt +++ b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=isolated).errors.txt @@ -1,5 +1,5 @@ -deepIndexedAccessChainConstraintCheckOrder.ts(14,14): error TS2339: Property 'b' does not exist on type 'T'. deepIndexedAccessChainConstraintCheckOrder.ts(14,20): error TS2339: Property 'b' does not exist on type 'T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. +deepIndexedAccessChainConstraintCheckOrder.ts(18,14): error TS2339: Property 'b' does not exist on type 'U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. ==== deepIndexedAccessChainConstraintCheckOrder.ts (2 errors) ==== @@ -17,13 +17,13 @@ deepIndexedAccessChainConstraintCheckOrder.ts(14,20): error TS2339: Property 'b' y: T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] ): string { return x.b + y.b; - ~ -!!! error TS2339: Property 'b' does not exist on type 'T'. ~ !!! error TS2339: Property 'b' does not exist on type 'T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. } function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]): string { return y.b; + ~ +!!! error TS2339: Property 'b' does not exist on type 'U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. } \ No newline at end of file diff --git a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=isolated).symbols b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=isolated).symbols index 0e2b934129ba9..7d3b169810303 100644 --- a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=isolated).symbols +++ b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=isolated).symbols @@ -43,9 +43,7 @@ function victim( >x.b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) >x : Symbol(x, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 9, 31)) >b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) ->y.b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) >y : Symbol(y, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 10, 9)) ->b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) } function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]): string { @@ -56,8 +54,6 @@ function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"][" >U : Symbol(U, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 16, 14)) return y.b; ->y.b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) >y : Symbol(y, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 16, 29)) ->b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) } diff --git a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=isolated).types b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=isolated).types index b2f6d1f4b2c0c..eea7d8a40d8ca 100644 --- a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=isolated).types +++ b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=isolated).types @@ -36,9 +36,9 @@ function victim( >x.b : string >x : T >b : string ->y.b : string +>y.b : any >y : T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] ->b : string +>b : any } function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]): string { @@ -46,8 +46,8 @@ function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"][" >y : U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] return y.b; ->y.b : string +>y.b : any >y : U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] ->b : string +>b : any } diff --git a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=reverse).errors.txt b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=reverse).errors.txt index a1474c01bbc98..055c38a3cf0b6 100644 --- a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=reverse).errors.txt +++ b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=reverse).errors.txt @@ -1,5 +1,5 @@ -deepIndexedAccessChainConstraintCheckOrder.ts(14,14): error TS2339: Property 'b' does not exist on type 'T'. deepIndexedAccessChainConstraintCheckOrder.ts(14,20): error TS2339: Property 'b' does not exist on type 'T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. +deepIndexedAccessChainConstraintCheckOrder.ts(18,14): error TS2339: Property 'b' does not exist on type 'U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. ==== deepIndexedAccessChainConstraintCheckOrder.ts (2 errors) ==== @@ -17,13 +17,13 @@ deepIndexedAccessChainConstraintCheckOrder.ts(14,20): error TS2339: Property 'b' y: T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] ): string { return x.b + y.b; - ~ -!!! error TS2339: Property 'b' does not exist on type 'T'. ~ !!! error TS2339: Property 'b' does not exist on type 'T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. } function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]): string { return y.b; + ~ +!!! error TS2339: Property 'b' does not exist on type 'U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. } \ No newline at end of file diff --git a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=reverse).symbols b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=reverse).symbols index d4a45f6e4fbab..7d3b169810303 100644 --- a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=reverse).symbols +++ b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=reverse).symbols @@ -40,7 +40,9 @@ function victim( ): string { return x.b + y.b; +>x.b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) >x : Symbol(x, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 9, 31)) +>b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) >y : Symbol(y, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 10, 9)) } @@ -52,8 +54,6 @@ function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"][" >U : Symbol(U, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 16, 14)) return y.b; ->y.b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) >y : Symbol(y, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 16, 29)) ->b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) } diff --git a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=reverse).types b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=reverse).types index f3de565d90af5..eea7d8a40d8ca 100644 --- a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=reverse).types +++ b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=reverse).types @@ -32,10 +32,10 @@ function victim( ): string { return x.b + y.b; ->x.b + y.b : any ->x.b : any +>x.b + y.b : string +>x.b : string >x : T ->b : any +>b : string >y.b : any >y : T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] >b : any @@ -46,8 +46,8 @@ function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"][" >y : U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] return y.b; ->y.b : string +>y.b : any >y : U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] ->b : string +>b : any } diff --git a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=typesfirst).errors.txt b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=typesfirst).errors.txt index ef5a88b87d18e..055c38a3cf0b6 100644 --- a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=typesfirst).errors.txt +++ b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=typesfirst).errors.txt @@ -1,9 +1,8 @@ -deepIndexedAccessChainConstraintCheckOrder.ts(14,14): error TS2339: Property 'b' does not exist on type 'T'. deepIndexedAccessChainConstraintCheckOrder.ts(14,20): error TS2339: Property 'b' does not exist on type 'T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. deepIndexedAccessChainConstraintCheckOrder.ts(18,14): error TS2339: Property 'b' does not exist on type 'U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. -==== deepIndexedAccessChainConstraintCheckOrder.ts (3 errors) ==== +==== deepIndexedAccessChainConstraintCheckOrder.ts (2 errors) ==== // The base constraint of a chain of indexed accesses is found through the // object type of each, all of which share the recursion identity of the // type parameter. The chain is finite, so the property access is valid @@ -18,8 +17,6 @@ deepIndexedAccessChainConstraintCheckOrder.ts(18,14): error TS2339: Property 'b' y: T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] ): string { return x.b + y.b; - ~ -!!! error TS2339: Property 'b' does not exist on type 'T'. ~ !!! error TS2339: Property 'b' does not exist on type 'T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. } diff --git a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=typesfirst).symbols b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=typesfirst).symbols index 0c09c7dce7f91..7d3b169810303 100644 --- a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=typesfirst).symbols +++ b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=typesfirst).symbols @@ -40,7 +40,9 @@ function victim( ): string { return x.b + y.b; +>x.b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) >x : Symbol(x, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 9, 31)) +>b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) >y : Symbol(y, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 10, 9)) } diff --git a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=typesfirst).types b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=typesfirst).types index 28f4ad3966190..eea7d8a40d8ca 100644 --- a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=typesfirst).types +++ b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=typesfirst).types @@ -32,10 +32,10 @@ function victim( ): string { return x.b + y.b; ->x.b + y.b : any ->x.b : any +>x.b + y.b : string +>x.b : string >x : T ->b : any +>b : string >y.b : any >y : T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] >b : any diff --git a/tsc/testdata/baselines/reference/compiler/deferredConditionalConstraintInterning.errors.txt b/tsc/testdata/baselines/reference/compiler/deferredConditionalConstraintInterning.errors.txt new file mode 100644 index 0000000000000..ac438489baf78 --- /dev/null +++ b/tsc/testdata/baselines/reference/compiler/deferredConditionalConstraintInterning.errors.txt @@ -0,0 +1,41 @@ +deferredConditionalConstraintInterning.ts(33,5): error TS2589: Type instantiation is excessively deep and possibly infinite. + + +==== deferredConditionalConstraintInterning.ts (1 errors) ==== + // Deferred conditional types created while computing constraints, which may + // resolve to their true branch, are interned apart from ordinary deferred + // conditional types. Relating this reduced form of type-fest's SetOptional to + // an index signature type must not exceed the instantiation depth limit. + + type KeysOf = T extends infer U ? keyof U : never; + + type SelectKey = Key extends unknown + ? {} extends Record + ? Key + : Key extends number ? `${Key}` : Key + : never; + type SelectedKeys = SelectKey & keyof Type | Extract, string>; + + type UnionMember = [T] extends [never] + ? never + : (T extends unknown ? [T] : never) extends infer Wrapped + ? Wrapped extends [infer Member] ? Member : never + : never; + type RemoveAllTags = T extends object ? RemoveAllTags> : T; + type CollapseLiterals = T extends string ? T extends infer Collapsed & {} ? Collapsed : T : T; + type UnwrapProperties = T extends infer Unwrapped & {} ? Unwrapped : T; + type UnwrapKey = Key extends unknown + ? Key extends string ? UnwrapProperties>> : Key + : never; + + type Simplify = {[K in keyof T]: T[K]}; + type SetOptional = Simplify<{ + [K in keyof Base as K extends SelectedKeys> ? K : never]?: Base[K]; + }>; + + function f(value: SetOptional & keyof T>): Record { + return value; + ~~~~~~ +!!! error TS2589: Type instantiation is excessively deep and possibly infinite. + } + \ No newline at end of file From 76e037eb094f37e80d9b57bed9ffe9b17c6dad87 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sun, 22 Nov 2026 23:29:12 -0800 Subject: [PATCH 22/29] Give up on conditional types that expand without end Computing base constraints again inside the walks that reach them exposed conditional types that expand without end as they are resolved, such as one whose recursive argument wraps the previous one in other conditional types. A walk restarted from a type it reached can always go further, so such walks went deep enough to exceed the instantiation depth limit before giving up, or took minutes to finish (seen in type-fest and 60278). A conditional type whose instantiation nests one recursion identity 5 times now has no base constraint; unlike the limits of the walk, this depends only on the type. Only nesting that such an expansion produces counts: levels of generic types instantiated from the level below, directly or through the conditional types resolved in between. Deep structure written or inferred in a program, such as a chain of indexed accesses or nested references and object literal types, keeps its constraints (seen in trpc, ariakit and react-navigation). --- tsc/internal/checker/checker.go | 98 ++++++++- tsc/internal/checker/types.go | 7 + ...ConstraintNestingOfWrittenTypes.errors.txt | 56 +++++ ...aseConstraintNestingOfWrittenTypes.symbols | 194 ++++++++++++++++++ .../baseConstraintNestingOfWrittenTypes.types | 156 ++++++++++++++ ...dConditionalConstraintInterning.errors.txt | 41 ---- .../baseConstraintNestingOfWrittenTypes.ts | 56 +++++ 7 files changed, 564 insertions(+), 44 deletions(-) create mode 100644 tsc/testdata/baselines/reference/compiler/baseConstraintNestingOfWrittenTypes.errors.txt create mode 100644 tsc/testdata/baselines/reference/compiler/baseConstraintNestingOfWrittenTypes.symbols create mode 100644 tsc/testdata/baselines/reference/compiler/baseConstraintNestingOfWrittenTypes.types delete mode 100644 tsc/testdata/baselines/reference/compiler/deferredConditionalConstraintInterning.errors.txt create mode 100644 tsc/testdata/tests/cases/compiler/baseConstraintNestingOfWrittenTypes.ts diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index 3f35d8d2064ad..781b72c49fcc5 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -622,6 +622,8 @@ type Checker struct { baseConstraintWalk baseConstraintWalk baseConstraintRepeats map[*Type][]baseConstraintRepeat // Repeats of the walks of kept base constraints; see "Base constraint walks" baseConstraintRepeatBuffer []baseConstraintRepeat // Repeats of the walks in progress + typeNestings map[*Type]typeNesting + typeNestingVisited collections.Set[*Type] inlineLevel int serializationLevel int currentNode *ast.Node @@ -1022,6 +1024,7 @@ func NewChecker(program Program, tracer *Tracer) (*Checker, *sync.Mutex) { c.instantiationExpressionTypes = make(map[InstantiationExpressionKey]*Type) c.substitutionTypes = make(map[SubstitutionTypeKey]*Type) c.baseConstraintRepeats = make(map[*Type][]baseConstraintRepeat) + c.typeNestings = make(map[*Type]typeNesting) c.reverseMappedCache = make(map[ReverseMappedTypeKey]*Type) c.reverseHomomorphicMappedCache = make(map[ReverseMappedTypeKey]*Type) c.iterationTypesCache = make(map[IterationTypesKey]IterationTypes) @@ -29145,10 +29148,24 @@ func (c *Checker) getBaseConstraintOfType(t *Type) *Type { // each repeated, is kept with it for this. Elsewhere it is computed again // inside the walk, as a distinct resolution so that re-entering it is still a // cycle. +// +// A conditional type whose instantiation nests some recursion identity 5 +// times has no base constraint. Walks through types that expand without end +// as their conditional types are resolved, such as one whose recursive +// argument wraps the previous one in other conditional types, would otherwise +// go deep enough to exceed the instantiation depth limit before giving up, +// and restarting such a walk from a type it reached can always go further. +// Unlike the walk's own limits, this depends only on the type. Only nesting +// that such an expansion produces counts: each level is a generic type +// instantiated from the level below, directly or through the conditional +// types resolved in between. Structure written or inferred in the program, +// such as type references nested through tuples or object literal types, +// can be nested deeply without expanding. const ( - baseConstraintFreeDepth = 10 - baseConstraintMaxDepth = 50 + baseConstraintFreeDepth = 10 + baseConstraintMaxDepth = 50 + baseConstraintMaxNesting = 5 ) // countBaseConstraintRepeats returns how many of the recursion identities on a @@ -29352,6 +29369,81 @@ func (c *Checker) walkBaseConstraint(t *Type, stack []RecursionId, keep bool) (* return constraint, height, kept, walk.gaveUp } +// getTypeNesting returns, of the recursion identities in the instantiation of +// t, the most times one is nested in itself: t's own as nested in the types t +// was instantiated from, or one in those types. +func (c *Checker) getTypeNesting(t *Type) int { + if c.typeGeneration(t)+1 < baseConstraintMaxNesting { + // Each level of nesting is a type instantiated from the one below. + return 0 + } + _, nesting := c.computeTypeNesting(t) + return nesting +} + +// computeTypeNesting returns how many times the recursion identity of t is +// nested in itself in its instantiation, and the most for any recursion +// identity in it. +func (c *Checker) computeTypeNesting(t *Type) (int, int) { + if n, ok := c.typeNestings[t]; ok { + return int(n.own), int(n.most) + } + if !c.couldContainTypeVariables(t) { + // Instantiating a type without type variables returns it unchanged, + // so it does not expand however deeply it is nested. + return c.setTypeNesting(t, 0, 0) + } + most := 0 + c.visitTypeSources(t, func(s *Type) { + _, m := c.computeTypeNesting(s) + most = max(most, m) + }) + if t.flags&TypeFlagsIndexedAccess != 0 { + // An indexed access shares the recursion identity of its object type + // and is a part of it, so it is nested as deeply as its object type. + own, _ := c.computeTypeNesting(t.AsIndexedAccessType().objectType) + return c.setTypeNesting(t, own, most) + } + // Find the nearest types t was instantiated from with its recursion + // identity, skipping those that cannot hold one nested more than found. + identity := getRecursionIdentity(t) + below := 0 + // The nestings of all the types t was instantiated from are computed by + // now, so this does not recur and the set of visited types can be shared. + visited := &c.typeNestingVisited + var visit func(t *Type) + visit = func(t *Type) { + c.visitTypeSources(t, func(s *Type) { + if visited.Has(s) { + return + } + visited.Add(s) + own, m := c.computeTypeNesting(s) + if m <= below { + return + } + if getRecursionIdentity(s) == identity { + below = max(below, own) + } else if s.flags&(TypeFlagsConditional|TypeFlagsUnion) != 0 { + // A level reached through other types, such as a reference or + // an object literal type holding it, is written structure. + visit(s) + } + }) + } + visit(t) + visited.Clear() + own := min(below+1, math.MaxUint8) + most = max(most, own) + return c.setTypeNesting(t, own, most) +} + +// setTypeNesting caches the nestings computeTypeNesting returns for t. +func (c *Checker) setTypeNesting(t *Type, own int, most int) (int, int) { + c.typeNestings[t] = typeNesting{own: uint8(own), most: uint8(most)} + return own, most +} + func (c *Checker) computeBaseConstraint(t *Type, stack []RecursionId) *Type { switch { case t.flags&TypeFlagsTypeParameter != 0: @@ -29425,7 +29517,7 @@ func (c *Checker) computeBaseConstraint(t *Type, stack []RecursionId) *Type { } return c.getNextBaseConstraint(c.getIndexedAccessTypeOrUndefined(baseObjectType, baseIndexType, t.AsIndexedAccessType().accessFlags, nil, nil), stack) case t.flags&TypeFlagsConditional != 0: - if c.conditionalConstraintDepth >= 100 { + if c.conditionalConstraintDepth >= 100 || c.getTypeNesting(t) >= baseConstraintMaxNesting { return nil } c.conditionalConstraintDepth++ diff --git a/tsc/internal/checker/types.go b/tsc/internal/checker/types.go index 456d5f970900c..6a7e7d4b5ecc4 100644 --- a/tsc/internal/checker/types.go +++ b/tsc/internal/checker/types.go @@ -1136,6 +1136,13 @@ type UniqueESSymbolType struct { // ConstrainedType (type with computed base constraint) +// A typeNesting caches the nesting of a type's recursion identity in its +// instantiation, and the most for any recursion identity; see getTypeNesting. +type typeNesting struct { + own uint8 + most uint8 +} + type ConstrainedType struct { TypeBase resolvedBaseConstraint *Type diff --git a/tsc/testdata/baselines/reference/compiler/baseConstraintNestingOfWrittenTypes.errors.txt b/tsc/testdata/baselines/reference/compiler/baseConstraintNestingOfWrittenTypes.errors.txt new file mode 100644 index 0000000000000..389c4b20c19ae --- /dev/null +++ b/tsc/testdata/baselines/reference/compiler/baseConstraintNestingOfWrittenTypes.errors.txt @@ -0,0 +1,56 @@ +nestedObjectLiterals.ts(13,58): error TS2322: Type 'number' is not assignable to type 'string'. + + +==== indexedAccessChain.ts (0 errors) ==== + // From trpc's CreateContextCallback. + type Router = { _def: { _config: { $types: { ctx: T } } } }; + type Ctx> = R["_def"]["_config"]["$types"]["ctx"]; + type PartialIf = C extends true ? Partial : T; + type CreateContextCallback = PartialIf TContext }>; + + function g>(o: CreateContextCallback>) { + o.createContext; + } + + type Box = X extends string ? { a: 1 } : { a: 2 }; + + function f(o: Box) { + o.a; + } + export {}; + +==== nestedReferences.ts (0 errors) ==== + // From ariakit, whose recipes nest recipes made by function calls. + interface Box { + value: T; + } + declare function box(value: T): Box; + + const box5 = box(box(box(box(box(""))))); + + type Like = keyof Base extends keyof Candidate ? Base : never; + + function nested>(r: R) { + r.value; + } + export {}; + +==== nestedObjectLiterals.ts (1 errors) ==== + // From react-navigation, whose screen parameters nest navigators. + type Wrap = { value: T }; + type Two = { a: T; b: number }; + + interface Nav

{ + navigate(...args: K extends unknown ? [key: K, value: P[K]] : never): K; + } + + declare const deep: Nav>>>>>>; + const key = deep.navigate("a", { value: { value: { value: { value: { value: "" } } } } }); + const a: "a" = key; + + deep.navigate("a", { value: { value: { value: { value: { value: 0 } } } } }); + ~~~~~ +!!! error TS2322: Type 'number' is not assignable to type 'string'. +!!! related TS6500 nestedObjectLiterals.ts:2:18: The expected type comes from property 'value' which is declared here on type 'Wrap' + export {}; + \ No newline at end of file diff --git a/tsc/testdata/baselines/reference/compiler/baseConstraintNestingOfWrittenTypes.symbols b/tsc/testdata/baselines/reference/compiler/baseConstraintNestingOfWrittenTypes.symbols new file mode 100644 index 0000000000000..c1b15358947ef --- /dev/null +++ b/tsc/testdata/baselines/reference/compiler/baseConstraintNestingOfWrittenTypes.symbols @@ -0,0 +1,194 @@ +//// [tests/cases/compiler/baseConstraintNestingOfWrittenTypes.ts] //// + +=== indexedAccessChain.ts === +// From trpc's CreateContextCallback. +type Router = { _def: { _config: { $types: { ctx: T } } } }; +>Router : Symbol(Router, Decl(indexedAccessChain.ts, 0, 0)) +>T : Symbol(T, Decl(indexedAccessChain.ts, 1, 12)) +>_def : Symbol(_def, Decl(indexedAccessChain.ts, 1, 18)) +>_config : Symbol(_config, Decl(indexedAccessChain.ts, 1, 26)) +>$types : Symbol($types, Decl(indexedAccessChain.ts, 1, 37)) +>ctx : Symbol(ctx, Decl(indexedAccessChain.ts, 1, 47)) +>T : Symbol(T, Decl(indexedAccessChain.ts, 1, 12)) + +type Ctx> = R["_def"]["_config"]["$types"]["ctx"]; +>Ctx : Symbol(Ctx, Decl(indexedAccessChain.ts, 1, 63)) +>R : Symbol(R, Decl(indexedAccessChain.ts, 2, 9)) +>Router : Symbol(Router, Decl(indexedAccessChain.ts, 0, 0)) +>R : Symbol(R, Decl(indexedAccessChain.ts, 2, 9)) + +type PartialIf = C extends true ? Partial : T; +>PartialIf : Symbol(PartialIf, Decl(indexedAccessChain.ts, 2, 72)) +>C : Symbol(C, Decl(indexedAccessChain.ts, 3, 15)) +>T : Symbol(T, Decl(indexedAccessChain.ts, 3, 33)) +>C : Symbol(C, Decl(indexedAccessChain.ts, 3, 15)) +>Partial : Symbol(Partial, Decl(lib.es5.d.ts, --, --)) +>T : Symbol(T, Decl(indexedAccessChain.ts, 3, 33)) +>T : Symbol(T, Decl(indexedAccessChain.ts, 3, 33)) + +type CreateContextCallback = PartialIf TContext }>; +>CreateContextCallback : Symbol(CreateContextCallback, Decl(indexedAccessChain.ts, 3, 71)) +>TContext : Symbol(TContext, Decl(indexedAccessChain.ts, 4, 27)) +>PartialIf : Symbol(PartialIf, Decl(indexedAccessChain.ts, 2, 72)) +>TContext : Symbol(TContext, Decl(indexedAccessChain.ts, 4, 27)) +>createContext : Symbol(createContext, Decl(indexedAccessChain.ts, 4, 90)) +>TContext : Symbol(TContext, Decl(indexedAccessChain.ts, 4, 27)) + +function g>(o: CreateContextCallback>) { +>g : Symbol(g, Decl(indexedAccessChain.ts, 4, 124)) +>R : Symbol(R, Decl(indexedAccessChain.ts, 6, 11)) +>Router : Symbol(Router, Decl(indexedAccessChain.ts, 0, 0)) +>o : Symbol(o, Decl(indexedAccessChain.ts, 6, 34)) +>CreateContextCallback : Symbol(CreateContextCallback, Decl(indexedAccessChain.ts, 3, 71)) +>Ctx : Symbol(Ctx, Decl(indexedAccessChain.ts, 1, 63)) +>R : Symbol(R, Decl(indexedAccessChain.ts, 6, 11)) + + o.createContext; +>o.createContext : Symbol(createContext, Decl(indexedAccessChain.ts, 4, 90)) +>o : Symbol(o, Decl(indexedAccessChain.ts, 6, 34)) +>createContext : Symbol(createContext, Decl(indexedAccessChain.ts, 4, 90)) +} + +type Box = X extends string ? { a: 1 } : { a: 2 }; +>Box : Symbol(Box, Decl(indexedAccessChain.ts, 8, 1)) +>X : Symbol(X, Decl(indexedAccessChain.ts, 10, 9)) +>X : Symbol(X, Decl(indexedAccessChain.ts, 10, 9)) +>a : Symbol(a, Decl(indexedAccessChain.ts, 10, 34)) +>a : Symbol(a, Decl(indexedAccessChain.ts, 10, 45)) + +function f(o: Box) { +>f : Symbol(f, Decl(indexedAccessChain.ts, 10, 53)) +>R : Symbol(R, Decl(indexedAccessChain.ts, 12, 11)) +>a : Symbol(a, Decl(indexedAccessChain.ts, 12, 22)) +>b : Symbol(b, Decl(indexedAccessChain.ts, 12, 27)) +>c : Symbol(c, Decl(indexedAccessChain.ts, 12, 32)) +>d : Symbol(d, Decl(indexedAccessChain.ts, 12, 37)) +>o : Symbol(o, Decl(indexedAccessChain.ts, 12, 57)) +>Box : Symbol(Box, Decl(indexedAccessChain.ts, 8, 1)) +>R : Symbol(R, Decl(indexedAccessChain.ts, 12, 11)) + + o.a; +>o.a : Symbol(a, Decl(indexedAccessChain.ts, 10, 34)) +>o : Symbol(o, Decl(indexedAccessChain.ts, 12, 57)) +>a : Symbol(a, Decl(indexedAccessChain.ts, 10, 34)) +} +export {}; + +=== nestedReferences.ts === +// From ariakit, whose recipes nest recipes made by function calls. +interface Box { +>Box : Symbol(Box, Decl(nestedReferences.ts, 0, 0)) +>T : Symbol(T, Decl(nestedReferences.ts, 1, 14)) + + value: T; +>value : Symbol(Box.value, Decl(nestedReferences.ts, 1, 18)) +>T : Symbol(T, Decl(nestedReferences.ts, 1, 14)) +} +declare function box(value: T): Box; +>box : Symbol(box, Decl(nestedReferences.ts, 3, 1)) +>T : Symbol(T, Decl(nestedReferences.ts, 4, 21)) +>value : Symbol(value, Decl(nestedReferences.ts, 4, 24)) +>T : Symbol(T, Decl(nestedReferences.ts, 4, 21)) +>Box : Symbol(Box, Decl(nestedReferences.ts, 0, 0)) +>T : Symbol(T, Decl(nestedReferences.ts, 4, 21)) + +const box5 = box(box(box(box(box(""))))); +>box5 : Symbol(box5, Decl(nestedReferences.ts, 6, 5)) +>box : Symbol(box, Decl(nestedReferences.ts, 3, 1)) +>box : Symbol(box, Decl(nestedReferences.ts, 3, 1)) +>box : Symbol(box, Decl(nestedReferences.ts, 3, 1)) +>box : Symbol(box, Decl(nestedReferences.ts, 3, 1)) +>box : Symbol(box, Decl(nestedReferences.ts, 3, 1)) + +type Like = keyof Base extends keyof Candidate ? Base : never; +>Like : Symbol(Like, Decl(nestedReferences.ts, 6, 41)) +>Base : Symbol(Base, Decl(nestedReferences.ts, 8, 10)) +>Candidate : Symbol(Candidate, Decl(nestedReferences.ts, 8, 15)) +>Base : Symbol(Base, Decl(nestedReferences.ts, 8, 10)) +>Candidate : Symbol(Candidate, Decl(nestedReferences.ts, 8, 15)) +>Base : Symbol(Base, Decl(nestedReferences.ts, 8, 10)) + +function nested>(r: R) { +>nested : Symbol(nested, Decl(nestedReferences.ts, 8, 79)) +>R : Symbol(R, Decl(nestedReferences.ts, 10, 16)) +>Like : Symbol(Like, Decl(nestedReferences.ts, 6, 41)) +>box5 : Symbol(box5, Decl(nestedReferences.ts, 6, 5)) +>R : Symbol(R, Decl(nestedReferences.ts, 10, 16)) +>r : Symbol(r, Decl(nestedReferences.ts, 10, 48)) +>R : Symbol(R, Decl(nestedReferences.ts, 10, 16)) + + r.value; +>r.value : Symbol(Box.value, Decl(nestedReferences.ts, 1, 18)) +>r : Symbol(r, Decl(nestedReferences.ts, 10, 48)) +>value : Symbol(Box.value, Decl(nestedReferences.ts, 1, 18)) +} +export {}; + +=== nestedObjectLiterals.ts === +// From react-navigation, whose screen parameters nest navigators. +type Wrap = { value: T }; +>Wrap : Symbol(Wrap, Decl(nestedObjectLiterals.ts, 0, 0)) +>T : Symbol(T, Decl(nestedObjectLiterals.ts, 1, 10)) +>value : Symbol(value, Decl(nestedObjectLiterals.ts, 1, 16)) +>T : Symbol(T, Decl(nestedObjectLiterals.ts, 1, 10)) + +type Two = { a: T; b: number }; +>Two : Symbol(Two, Decl(nestedObjectLiterals.ts, 1, 28)) +>T : Symbol(T, Decl(nestedObjectLiterals.ts, 2, 9)) +>a : Symbol(a, Decl(nestedObjectLiterals.ts, 2, 15)) +>T : Symbol(T, Decl(nestedObjectLiterals.ts, 2, 9)) +>b : Symbol(b, Decl(nestedObjectLiterals.ts, 2, 21)) + +interface Nav

{ +>Nav : Symbol(Nav, Decl(nestedObjectLiterals.ts, 2, 34)) +>P : Symbol(P, Decl(nestedObjectLiterals.ts, 4, 14)) + + navigate(...args: K extends unknown ? [key: K, value: P[K]] : never): K; +>navigate : Symbol(Nav.navigate, Decl(nestedObjectLiterals.ts, 4, 18)) +>K : Symbol(K, Decl(nestedObjectLiterals.ts, 5, 13)) +>P : Symbol(P, Decl(nestedObjectLiterals.ts, 4, 14)) +>args : Symbol(args, Decl(nestedObjectLiterals.ts, 5, 32)) +>K : Symbol(K, Decl(nestedObjectLiterals.ts, 5, 13)) +>K : Symbol(K, Decl(nestedObjectLiterals.ts, 5, 13)) +>P : Symbol(P, Decl(nestedObjectLiterals.ts, 4, 14)) +>K : Symbol(K, Decl(nestedObjectLiterals.ts, 5, 13)) +>K : Symbol(K, Decl(nestedObjectLiterals.ts, 5, 13)) +} + +declare const deep: Nav>>>>>>; +>deep : Symbol(deep, Decl(nestedObjectLiterals.ts, 8, 13)) +>Nav : Symbol(Nav, Decl(nestedObjectLiterals.ts, 2, 34)) +>Two : Symbol(Two, Decl(nestedObjectLiterals.ts, 1, 28)) +>Wrap : Symbol(Wrap, Decl(nestedObjectLiterals.ts, 0, 0)) +>Wrap : Symbol(Wrap, Decl(nestedObjectLiterals.ts, 0, 0)) +>Wrap : Symbol(Wrap, Decl(nestedObjectLiterals.ts, 0, 0)) +>Wrap : Symbol(Wrap, Decl(nestedObjectLiterals.ts, 0, 0)) +>Wrap : Symbol(Wrap, Decl(nestedObjectLiterals.ts, 0, 0)) + +const key = deep.navigate("a", { value: { value: { value: { value: { value: "" } } } } }); +>key : Symbol(key, Decl(nestedObjectLiterals.ts, 9, 5)) +>deep.navigate : Symbol(Nav.navigate, Decl(nestedObjectLiterals.ts, 4, 18)) +>deep : Symbol(deep, Decl(nestedObjectLiterals.ts, 8, 13)) +>navigate : Symbol(Nav.navigate, Decl(nestedObjectLiterals.ts, 4, 18)) +>value : Symbol(value, Decl(nestedObjectLiterals.ts, 9, 32)) +>value : Symbol(value, Decl(nestedObjectLiterals.ts, 9, 41)) +>value : Symbol(value, Decl(nestedObjectLiterals.ts, 9, 50)) +>value : Symbol(value, Decl(nestedObjectLiterals.ts, 9, 59)) +>value : Symbol(value, Decl(nestedObjectLiterals.ts, 9, 68)) + +const a: "a" = key; +>a : Symbol(a, Decl(nestedObjectLiterals.ts, 10, 5)) +>key : Symbol(key, Decl(nestedObjectLiterals.ts, 9, 5)) + +deep.navigate("a", { value: { value: { value: { value: { value: 0 } } } } }); +>deep.navigate : Symbol(Nav.navigate, Decl(nestedObjectLiterals.ts, 4, 18)) +>deep : Symbol(deep, Decl(nestedObjectLiterals.ts, 8, 13)) +>navigate : Symbol(Nav.navigate, Decl(nestedObjectLiterals.ts, 4, 18)) +>value : Symbol(value, Decl(nestedObjectLiterals.ts, 12, 20)) +>value : Symbol(value, Decl(nestedObjectLiterals.ts, 12, 29)) +>value : Symbol(value, Decl(nestedObjectLiterals.ts, 12, 38)) +>value : Symbol(value, Decl(nestedObjectLiterals.ts, 12, 47)) +>value : Symbol(value, Decl(nestedObjectLiterals.ts, 12, 56)) + +export {}; + diff --git a/tsc/testdata/baselines/reference/compiler/baseConstraintNestingOfWrittenTypes.types b/tsc/testdata/baselines/reference/compiler/baseConstraintNestingOfWrittenTypes.types new file mode 100644 index 0000000000000..9d8040f3f3d30 --- /dev/null +++ b/tsc/testdata/baselines/reference/compiler/baseConstraintNestingOfWrittenTypes.types @@ -0,0 +1,156 @@ +//// [tests/cases/compiler/baseConstraintNestingOfWrittenTypes.ts] //// + +=== indexedAccessChain.ts === +// From trpc's CreateContextCallback. +type Router = { _def: { _config: { $types: { ctx: T } } } }; +>Router : Router +>_def : { _config: { $types: { ctx: T; }; }; } +>_config : { $types: { ctx: T; }; } +>$types : { ctx: T; } +>ctx : T + +type Ctx> = R["_def"]["_config"]["$types"]["ctx"]; +>Ctx : Ctx + +type PartialIf = C extends true ? Partial : T; +>PartialIf : PartialIf +>true : true + +type CreateContextCallback = PartialIf TContext }>; +>CreateContextCallback : CreateContextCallback +>true : true +>false : false +>createContext : () => TContext + +function g>(o: CreateContextCallback>) { +>g : >(o: CreateContextCallback>) => void +>o : PartialIf ? true : false, { createContext: () => Ctx; }> + + o.createContext; +>o.createContext : (() => Ctx) | undefined +>o : Partial<{ createContext: () => Ctx; }> | { createContext: () => Ctx; } +>createContext : (() => Ctx) | undefined +} + +type Box = X extends string ? { a: 1 } : { a: 2 }; +>Box : Box +>a : 1 +>a : 2 + +function f(o: Box) { +>f : (o: Box) => void +>a : { b: { c: { d: string; }; }; } +>b : { c: { d: string; }; } +>c : { d: string; } +>d : string +>o : Box + + o.a; +>o.a : 1 +>o : Box +>a : 1 +} +export {}; + +=== nestedReferences.ts === +// From ariakit, whose recipes nest recipes made by function calls. +interface Box { + value: T; +>value : T +} +declare function box(value: T): Box; +>box : (value: T) => Box +>value : T + +const box5 = box(box(box(box(box(""))))); +>box5 : Box>>>> +>box(box(box(box(box(""))))) : Box>>>> +>box : (value: T) => Box +>box(box(box(box("")))) : Box>>> +>box : (value: T) => Box +>box(box(box(""))) : Box>> +>box : (value: T) => Box +>box(box("")) : Box> +>box : (value: T) => Box +>box("") : Box +>box : (value: T) => Box +>"" : "" + +type Like = keyof Base extends keyof Candidate ? Base : never; +>Like : Like + +function nested>(r: R) { +>nested : >(r: R) => void +>box5 : Box>>>> +>r : R + + r.value; +>r.value : Box>>> +>r : R +>value : Box>>> +} +export {}; + +=== nestedObjectLiterals.ts === +// From react-navigation, whose screen parameters nest navigators. +type Wrap = { value: T }; +>Wrap : Wrap +>value : T + +type Two = { a: T; b: number }; +>Two : Two +>a : T +>b : number + +interface Nav

{ + navigate(...args: K extends unknown ? [key: K, value: P[K]] : never): K; +>navigate : (...args: K extends unknown ? [key: K, value: P[K]] : never) => K +>args : K extends unknown ? [key: K, value: P[K]] : never +} + +declare const deep: Nav>>>>>>; +>deep : Nav>>>>>> + +const key = deep.navigate("a", { value: { value: { value: { value: { value: "" } } } } }); +>key : "a" +>deep.navigate("a", { value: { value: { value: { value: { value: "" } } } } }) : "a" +>deep.navigate : >>>>>>(...args: K extends unknown ? [key: K, value: Two>>>>>[K]] : never) => K +>deep : Nav>>>>>> +>navigate : >>>>>>(...args: K extends unknown ? [key: K, value: Two>>>>>[K]] : never) => K +>"a" : "a" +>{ value: { value: { value: { value: { value: "" } } } } } : { value: { value: { value: { value: { value: string; }; }; }; }; } +>value : { value: { value: { value: { value: string; }; }; }; } +>{ value: { value: { value: { value: "" } } } } : { value: { value: { value: { value: string; }; }; }; } +>value : { value: { value: { value: string; }; }; } +>{ value: { value: { value: "" } } } : { value: { value: { value: string; }; }; } +>value : { value: { value: string; }; } +>{ value: { value: "" } } : { value: { value: string; }; } +>value : { value: string; } +>{ value: "" } : { value: string; } +>value : string +>"" : "" + +const a: "a" = key; +>a : "a" +>key : "a" + +deep.navigate("a", { value: { value: { value: { value: { value: 0 } } } } }); +>deep.navigate("a", { value: { value: { value: { value: { value: 0 } } } } }) : "a" +>deep.navigate : >>>>>>(...args: K extends unknown ? [key: K, value: Two>>>>>[K]] : never) => K +>deep : Nav>>>>>> +>navigate : >>>>>>(...args: K extends unknown ? [key: K, value: Two>>>>>[K]] : never) => K +>"a" : "a" +>{ value: { value: { value: { value: { value: 0 } } } } } : { value: { value: { value: { value: { value: number; }; }; }; }; } +>value : { value: { value: { value: { value: number; }; }; }; } +>{ value: { value: { value: { value: 0 } } } } : { value: { value: { value: { value: number; }; }; }; } +>value : { value: { value: { value: number; }; }; } +>{ value: { value: { value: 0 } } } : { value: { value: { value: number; }; }; } +>value : { value: { value: number; }; } +>{ value: { value: 0 } } : { value: { value: number; }; } +>value : { value: number; } +>{ value: 0 } : { value: number; } +>value : number +>0 : 0 + +export {}; + diff --git a/tsc/testdata/baselines/reference/compiler/deferredConditionalConstraintInterning.errors.txt b/tsc/testdata/baselines/reference/compiler/deferredConditionalConstraintInterning.errors.txt deleted file mode 100644 index ac438489baf78..0000000000000 --- a/tsc/testdata/baselines/reference/compiler/deferredConditionalConstraintInterning.errors.txt +++ /dev/null @@ -1,41 +0,0 @@ -deferredConditionalConstraintInterning.ts(33,5): error TS2589: Type instantiation is excessively deep and possibly infinite. - - -==== deferredConditionalConstraintInterning.ts (1 errors) ==== - // Deferred conditional types created while computing constraints, which may - // resolve to their true branch, are interned apart from ordinary deferred - // conditional types. Relating this reduced form of type-fest's SetOptional to - // an index signature type must not exceed the instantiation depth limit. - - type KeysOf = T extends infer U ? keyof U : never; - - type SelectKey = Key extends unknown - ? {} extends Record - ? Key - : Key extends number ? `${Key}` : Key - : never; - type SelectedKeys = SelectKey & keyof Type | Extract, string>; - - type UnionMember = [T] extends [never] - ? never - : (T extends unknown ? [T] : never) extends infer Wrapped - ? Wrapped extends [infer Member] ? Member : never - : never; - type RemoveAllTags = T extends object ? RemoveAllTags> : T; - type CollapseLiterals = T extends string ? T extends infer Collapsed & {} ? Collapsed : T : T; - type UnwrapProperties = T extends infer Unwrapped & {} ? Unwrapped : T; - type UnwrapKey = Key extends unknown - ? Key extends string ? UnwrapProperties>> : Key - : never; - - type Simplify = {[K in keyof T]: T[K]}; - type SetOptional = Simplify<{ - [K in keyof Base as K extends SelectedKeys> ? K : never]?: Base[K]; - }>; - - function f(value: SetOptional & keyof T>): Record { - return value; - ~~~~~~ -!!! error TS2589: Type instantiation is excessively deep and possibly infinite. - } - \ No newline at end of file diff --git a/tsc/testdata/tests/cases/compiler/baseConstraintNestingOfWrittenTypes.ts b/tsc/testdata/tests/cases/compiler/baseConstraintNestingOfWrittenTypes.ts new file mode 100644 index 0000000000000..b1eb44110b1e6 --- /dev/null +++ b/tsc/testdata/tests/cases/compiler/baseConstraintNestingOfWrittenTypes.ts @@ -0,0 +1,56 @@ +// @strict: true +// @noEmit: true + +// A conditional type keeps its base constraint when its instantiation nests +// types deeply in ways that cannot expand without end: chains of indexed +// accesses, and types nested in themselves without type variables. + +// @filename: indexedAccessChain.ts +// From trpc's CreateContextCallback. +type Router = { _def: { _config: { $types: { ctx: T } } } }; +type Ctx> = R["_def"]["_config"]["$types"]["ctx"]; +type PartialIf = C extends true ? Partial : T; +type CreateContextCallback = PartialIf TContext }>; + +function g>(o: CreateContextCallback>) { + o.createContext; +} + +type Box = X extends string ? { a: 1 } : { a: 2 }; + +function f(o: Box) { + o.a; +} +export {}; + +// @filename: nestedReferences.ts +// From ariakit, whose recipes nest recipes made by function calls. +interface Box { + value: T; +} +declare function box(value: T): Box; + +const box5 = box(box(box(box(box(""))))); + +type Like = keyof Base extends keyof Candidate ? Base : never; + +function nested>(r: R) { + r.value; +} +export {}; + +// @filename: nestedObjectLiterals.ts +// From react-navigation, whose screen parameters nest navigators. +type Wrap = { value: T }; +type Two = { a: T; b: number }; + +interface Nav

{ + navigate(...args: K extends unknown ? [key: K, value: P[K]] : never): K; +} + +declare const deep: Nav>>>>>>; +const key = deep.navigate("a", { value: { value: { value: { value: { value: "" } } } } }); +const a: "a" = key; + +deep.navigate("a", { value: { value: { value: { value: { value: 0 } } } } }); +export {}; From 460c2f1226348b6a6db2b83b89690137df43c115 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sun, 22 Nov 2026 11:11:30 -0800 Subject: [PATCH 23/29] Count only expanding types as repeats in base constraint walks Computing a base constraint gives up past ten levels of nesting once a type with the same recursion identity repeats, as a repeating pattern could be instantiated without end. The object types of a chain of indexed accesses, such as T["a"]["a"]["a"], all share the identity of T, so a chain of ten or more gave up, and accessing a property of it failed. Which levels were already resolved, and so not walked again, decided whether main reached the limit, so main's result depended on which file was checked first; resolving each walk the same way made it give up always. A type repeats only if it is no older than the type with the same identity on the stack, as each step of an expanding instantiation is built from the step before it, whereas the object type of an indexed access is a part of it. The repeats kept with a cached base constraint record the generations they need, so a walk reusing it decides repeats the same way. They also record how many levels below the reused walk each identity first appears and first repeats, as only levels past ten can give up. A walk reusing the base constraint deeper down needs to compute it again only if those levels then pass ten. Counting repeats at every level instead had most reuses inside deep walks walk the type again (seen in xstate). Fixes 65508 --- tsc/internal/checker/checker.go | 104 +++++++++++++----- ...tCheckOrder(checkorder=default).errors.txt | 29 ----- ...aintCheckOrder(checkorder=default).symbols | 4 + ...traintCheckOrder(checkorder=default).types | 8 +- ...CheckOrder(checkorder=isolated).errors.txt | 29 ----- ...intCheckOrder(checkorder=isolated).symbols | 4 + ...raintCheckOrder(checkorder=isolated).types | 8 +- ...tCheckOrder(checkorder=reverse).errors.txt | 29 ----- ...aintCheckOrder(checkorder=reverse).symbols | 4 + ...traintCheckOrder(checkorder=reverse).types | 8 +- ...eckOrder(checkorder=typesfirst).errors.txt | 29 ----- ...tCheckOrder(checkorder=typesfirst).symbols | 4 + ...intCheckOrder(checkorder=typesfirst).types | 8 +- 13 files changed, 106 insertions(+), 162 deletions(-) delete mode 100644 tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=default).errors.txt delete mode 100644 tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=isolated).errors.txt delete mode 100644 tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=reverse).errors.txt delete mode 100644 tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=typesfirst).errors.txt diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index 781b72c49fcc5..8f96cc7fb14a7 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -29168,23 +29168,50 @@ const ( baseConstraintMaxNesting = 5 ) -// countBaseConstraintRepeats returns how many of the recursion identities on a -// walk's stack are identity. -func countBaseConstraintRepeats(identity RecursionId, stack []RecursionId) int { +// A baseConstraintFrame is a type whose base constraint a walk is computing: +// its recursion identity and generation. +type baseConstraintFrame struct { + identity RecursionId + generation int +} + +// countBaseConstraintRepeats returns how many of frames a type with identity +// and generation repeats, as repeatsInBaseConstraintWalk decides, and the +// highest generation among them, or generation if none. +func countBaseConstraintRepeats(identity RecursionId, generation int, frames []baseConstraintFrame) (int, int) { count := 0 - for _, id := range stack { - if id == identity { + highest := generation + for _, f := range frames { + if f.identity == identity && generation >= f.generation { + if count == 0 || f.generation > highest { + highest = f.generation + } count++ } } - return count + return count, highest +} + +// repeatsInBaseConstraintWalk reports whether the walk with stack, computing +// the base constraint of a type with identity and generation, is in a +// repeating pattern: whether a type with the same recursion identity is +// already on the stack, and the type is no older than it. A newer type may be +// instantiated from it without end, whereas an older one is a part of it, +// such as the object type of an indexed access, of which there are only as +// many as the type has. +func repeatsInBaseConstraintWalk(identity RecursionId, generation int, stack []baseConstraintFrame) bool { + count, _ := countBaseConstraintRepeats(identity, generation, stack) + return count != 0 } // A baseConstraintRepeat summarizes the frames with one recursion identity -// along the paths of a walk: the most on any path. +// along the paths of a walk: the deepest relative level, and the highest +// generation among them. type baseConstraintRepeat struct { - identity RecursionId - count int + identity RecursionId + generation int + depth int32 + repeatDepth int32 } type baseConstraintWalk struct { @@ -29194,9 +29221,10 @@ type baseConstraintWalk struct { repeatsStart int // Start of the walk's repeats in Checker.baseConstraintRepeatBuffer } -// addBaseConstraintRepeat records count frames with identity in the walk -// being computed. Its repeats are the end of the buffer, from repeatsStart. -func (c *Checker) addBaseConstraintRepeat(identity RecursionId, count int) { +// addBaseConstraintRepeat records a frame with identity, generation, and +// relative depth in the walk being computed. Its repeats are the end of the +// buffer, from repeatsStart. +func (c *Checker) addBaseConstraintRepeat(identity RecursionId, generation int, depth int32) { if _, ok := identity.value.(*Type); ok { // A type that is its own recursion identity repeats only where a walk // re-enters it, which reusing a kept base constraint never accounts @@ -29206,11 +29234,12 @@ func (c *Checker) addBaseConstraintRepeat(identity RecursionId, count int) { repeats := c.baseConstraintRepeatBuffer[c.baseConstraintWalk.repeatsStart:] for i := range repeats { if r := &repeats[i]; r.identity == identity { - r.count = max(r.count, count) + r.generation = max(r.generation, generation) + r.depth = max(r.depth, depth) return } } - c.baseConstraintRepeatBuffer = append(c.baseConstraintRepeatBuffer, baseConstraintRepeat{identity: identity, count: count}) + c.baseConstraintRepeatBuffer = append(c.baseConstraintRepeatBuffer, baseConstraintRepeat{identity: identity, generation: generation, depth: depth, repeatDepth: -1}) } // addInnerBaseConstraintWalk records in the walk being computed a walk @@ -29219,24 +29248,35 @@ func (c *Checker) addBaseConstraintRepeat(identity RecursionId, count int) { // walk's own repeats end at end in the buffer; when repeats are those of an // inner walk just computed, which follow, each is read before the walk's own // are written over it. -func (c *Checker) addInnerBaseConstraintWalk(height int32, repeats []baseConstraintRepeat, gaveUp bool, stack []RecursionId, end int) { +func (c *Checker) addInnerBaseConstraintWalk(height int32, repeats []baseConstraintRepeat, gaveUp bool, stack []baseConstraintFrame, end int) { w := &c.baseConstraintWalk + offset := int32(len(stack) - w.start) w.depth = max(w.depth, int32(len(stack))+height) w.gaveUp = w.gaveUp || gaveUp frames := stack[w.start:] buffer := c.baseConstraintRepeatBuffer[:end] for _, r := range repeats { - count := countBaseConstraintRepeats(r.identity, frames) + r.count + depth := offset + r.depth + repeatDepth := int32(-1) + if r.repeatDepth >= 0 { + repeatDepth = offset + r.repeatDepth + } + count, generation := countBaseConstraintRepeats(r.identity, r.generation, frames) + if count > 0 { + repeatDepth = depth + } found := false for i := w.repeatsStart; i < len(buffer); i++ { if own := &buffer[i]; own.identity == r.identity { - own.count = max(own.count, count) + own.generation = max(own.generation, generation) + own.depth = max(own.depth, depth) + own.repeatDepth = max(own.repeatDepth, repeatDepth) found = true break } } if !found { - buffer = append(buffer, baseConstraintRepeat{identity: r.identity, count: count}) + buffer = append(buffer, baseConstraintRepeat{identity: r.identity, generation: generation, depth: depth, repeatDepth: repeatDepth}) } } c.baseConstraintRepeatBuffer = buffer @@ -29244,7 +29284,7 @@ func (c *Checker) addInnerBaseConstraintWalk(height int32, repeats []baseConstra // canReuseBaseConstraint reports whether computing the kept base constraint of // t inside the walk with stack would give up nowhere. -func (c *Checker) canReuseBaseConstraint(t *Type, stack []RecursionId) bool { +func (c *Checker) canReuseBaseConstraint(t *Type, stack []baseConstraintFrame) bool { depth := len(stack) + int(t.baseConstraintHeight) if depth < baseConstraintFreeDepth { return true @@ -29253,14 +29293,17 @@ func (c *Checker) canReuseBaseConstraint(t *Type, stack []RecursionId) bool { return false } for _, r := range c.baseConstraintRepeats[t] { - if countBaseConstraintRepeats(r.identity, stack)+r.count > 1 { + if r.repeatDepth >= 0 && len(stack)+int(r.repeatDepth) >= baseConstraintFreeDepth { + return false + } + if len(stack)+int(r.depth) >= baseConstraintFreeDepth && repeatsInBaseConstraintWalk(r.identity, r.generation, stack) { return false } } return true } -func (c *Checker) getResolvedBaseConstraint(t *Type, stack []RecursionId) *Type { +func (c *Checker) getResolvedBaseConstraint(t *Type, stack []baseConstraintFrame) *Type { constrained := t.AsConstrainedType() if constrained == nil { return t @@ -29306,9 +29349,9 @@ func (c *Checker) getResolvedBaseConstraint(t *Type, stack []RecursionId) *Type // resolveBaseConstraint computes the base constraint of t inside the walk // with stack as the resolution of propertyName, and returns it with the depth -// its own walk reached, the repeats of its walk if they are to be kept, and -// whether its own walk gave up. -func (c *Checker) resolveBaseConstraint(t *Type, stack []RecursionId, propertyName TypeSystemPropertyName) (*Type, int32, []baseConstraintRepeat, bool) { +// its own walk reached, the repeats of its walk, and whether its own walk gave +// up. +func (c *Checker) resolveBaseConstraint(t *Type, stack []baseConstraintFrame, propertyName TypeSystemPropertyName) (*Type, int32, []baseConstraintRepeat, bool) { if !c.pushTypeResolution(t, propertyName) { return c.circularConstraintType, 0, nil, false } @@ -29339,7 +29382,7 @@ func (c *Checker) isBaseConstraintInProgress(t *Type) bool { // stack, and returns it with the depth its own walk reached, the repeats of // its walk if they are to be kept and it did not give up, and whether its own // walk gave up. -func (c *Checker) walkBaseConstraint(t *Type, stack []RecursionId, keep bool) (*Type, int32, []baseConstraintRepeat, bool) { +func (c *Checker) walkBaseConstraint(t *Type, stack []baseConstraintFrame, keep bool) (*Type, int32, []baseConstraintRepeat, bool) { saveWalk := c.baseConstraintWalk repeatsStart := len(c.baseConstraintRepeatBuffer) c.baseConstraintWalk = baseConstraintWalk{depth: int32(len(stack)), start: len(stack), repeatsStart: repeatsStart} @@ -29351,9 +29394,10 @@ func (c *Checker) walkBaseConstraint(t *Type, stack []RecursionId, keep bool) (* // yet triggered the deeply nested limiter. We have no test cases that actually get to 50 levels of // nesting, so it is effectively just a safety stop. identity := getRecursionIdentity(t) - if len(stack) < baseConstraintFreeDepth || len(stack) < baseConstraintMaxDepth && !slices.Contains(stack, identity) { - c.addBaseConstraintRepeat(identity, 1) - constraint = c.computeBaseConstraint(c.getSimplifiedType(t /*writing*/, false), append(stack, identity)) + generation := c.typeGeneration(t) + if len(stack) < baseConstraintFreeDepth || len(stack) < baseConstraintMaxDepth && !repeatsInBaseConstraintWalk(identity, generation, stack) { + c.addBaseConstraintRepeat(identity, generation, 0) + constraint = c.computeBaseConstraint(c.getSimplifiedType(t /*writing*/, false), append(stack, baseConstraintFrame{identity, generation})) } else { c.baseConstraintWalk.gaveUp = true } @@ -29444,7 +29488,7 @@ func (c *Checker) setTypeNesting(t *Type, own int, most int) (int, int) { return own, most } -func (c *Checker) computeBaseConstraint(t *Type, stack []RecursionId) *Type { +func (c *Checker) computeBaseConstraint(t *Type, stack []baseConstraintFrame) *Type { switch { case t.flags&TypeFlagsTypeParameter != 0: constraint := c.getConstraintFromTypeParameter(t) @@ -29547,7 +29591,7 @@ func (c *Checker) computeBaseConstraint(t *Type, stack []RecursionId) *Type { return t } -func (c *Checker) getNextBaseConstraint(t *Type, stack []RecursionId) *Type { +func (c *Checker) getNextBaseConstraint(t *Type, stack []baseConstraintFrame) *Type { if t == nil { return nil } diff --git a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=default).errors.txt b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=default).errors.txt deleted file mode 100644 index 055c38a3cf0b6..0000000000000 --- a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=default).errors.txt +++ /dev/null @@ -1,29 +0,0 @@ -deepIndexedAccessChainConstraintCheckOrder.ts(14,20): error TS2339: Property 'b' does not exist on type 'T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. -deepIndexedAccessChainConstraintCheckOrder.ts(18,14): error TS2339: Property 'b' does not exist on type 'U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. - - -==== deepIndexedAccessChainConstraintCheckOrder.ts (2 errors) ==== - // The base constraint of a chain of indexed accesses is found through the - // object type of each, all of which share the recursion identity of the - // type parameter. The chain is finite, so the property access is valid - // however deep the chain, and whichever declaration is checked first (65508). - - interface Box { a: Box; b: string } - - const f: typeof victim = (x: U, y: { b: string }) => x.b; - - function victim( - x: T, - y: T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] - ): string { - return x.b + y.b; - ~ -!!! error TS2339: Property 'b' does not exist on type 'T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. - } - - function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]): string { - return y.b; - ~ -!!! error TS2339: Property 'b' does not exist on type 'U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. - } - \ No newline at end of file diff --git a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=default).symbols b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=default).symbols index 7d3b169810303..0e2b934129ba9 100644 --- a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=default).symbols +++ b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=default).symbols @@ -43,7 +43,9 @@ function victim( >x.b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) >x : Symbol(x, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 9, 31)) >b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) +>y.b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) >y : Symbol(y, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 10, 9)) +>b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) } function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]): string { @@ -54,6 +56,8 @@ function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"][" >U : Symbol(U, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 16, 14)) return y.b; +>y.b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) >y : Symbol(y, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 16, 29)) +>b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) } diff --git a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=default).types b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=default).types index eea7d8a40d8ca..b2f6d1f4b2c0c 100644 --- a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=default).types +++ b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=default).types @@ -36,9 +36,9 @@ function victim( >x.b : string >x : T >b : string ->y.b : any +>y.b : string >y : T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] ->b : any +>b : string } function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]): string { @@ -46,8 +46,8 @@ function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"][" >y : U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] return y.b; ->y.b : any +>y.b : string >y : U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] ->b : any +>b : string } diff --git a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=isolated).errors.txt b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=isolated).errors.txt deleted file mode 100644 index 055c38a3cf0b6..0000000000000 --- a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=isolated).errors.txt +++ /dev/null @@ -1,29 +0,0 @@ -deepIndexedAccessChainConstraintCheckOrder.ts(14,20): error TS2339: Property 'b' does not exist on type 'T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. -deepIndexedAccessChainConstraintCheckOrder.ts(18,14): error TS2339: Property 'b' does not exist on type 'U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. - - -==== deepIndexedAccessChainConstraintCheckOrder.ts (2 errors) ==== - // The base constraint of a chain of indexed accesses is found through the - // object type of each, all of which share the recursion identity of the - // type parameter. The chain is finite, so the property access is valid - // however deep the chain, and whichever declaration is checked first (65508). - - interface Box { a: Box; b: string } - - const f: typeof victim = (x: U, y: { b: string }) => x.b; - - function victim( - x: T, - y: T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] - ): string { - return x.b + y.b; - ~ -!!! error TS2339: Property 'b' does not exist on type 'T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. - } - - function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]): string { - return y.b; - ~ -!!! error TS2339: Property 'b' does not exist on type 'U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. - } - \ No newline at end of file diff --git a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=isolated).symbols b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=isolated).symbols index 7d3b169810303..0e2b934129ba9 100644 --- a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=isolated).symbols +++ b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=isolated).symbols @@ -43,7 +43,9 @@ function victim( >x.b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) >x : Symbol(x, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 9, 31)) >b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) +>y.b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) >y : Symbol(y, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 10, 9)) +>b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) } function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]): string { @@ -54,6 +56,8 @@ function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"][" >U : Symbol(U, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 16, 14)) return y.b; +>y.b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) >y : Symbol(y, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 16, 29)) +>b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) } diff --git a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=isolated).types b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=isolated).types index eea7d8a40d8ca..b2f6d1f4b2c0c 100644 --- a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=isolated).types +++ b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=isolated).types @@ -36,9 +36,9 @@ function victim( >x.b : string >x : T >b : string ->y.b : any +>y.b : string >y : T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] ->b : any +>b : string } function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]): string { @@ -46,8 +46,8 @@ function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"][" >y : U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] return y.b; ->y.b : any +>y.b : string >y : U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] ->b : any +>b : string } diff --git a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=reverse).errors.txt b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=reverse).errors.txt deleted file mode 100644 index 055c38a3cf0b6..0000000000000 --- a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=reverse).errors.txt +++ /dev/null @@ -1,29 +0,0 @@ -deepIndexedAccessChainConstraintCheckOrder.ts(14,20): error TS2339: Property 'b' does not exist on type 'T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. -deepIndexedAccessChainConstraintCheckOrder.ts(18,14): error TS2339: Property 'b' does not exist on type 'U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. - - -==== deepIndexedAccessChainConstraintCheckOrder.ts (2 errors) ==== - // The base constraint of a chain of indexed accesses is found through the - // object type of each, all of which share the recursion identity of the - // type parameter. The chain is finite, so the property access is valid - // however deep the chain, and whichever declaration is checked first (65508). - - interface Box { a: Box; b: string } - - const f: typeof victim = (x: U, y: { b: string }) => x.b; - - function victim( - x: T, - y: T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] - ): string { - return x.b + y.b; - ~ -!!! error TS2339: Property 'b' does not exist on type 'T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. - } - - function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]): string { - return y.b; - ~ -!!! error TS2339: Property 'b' does not exist on type 'U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. - } - \ No newline at end of file diff --git a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=reverse).symbols b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=reverse).symbols index 7d3b169810303..0e2b934129ba9 100644 --- a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=reverse).symbols +++ b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=reverse).symbols @@ -43,7 +43,9 @@ function victim( >x.b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) >x : Symbol(x, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 9, 31)) >b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) +>y.b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) >y : Symbol(y, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 10, 9)) +>b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) } function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]): string { @@ -54,6 +56,8 @@ function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"][" >U : Symbol(U, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 16, 14)) return y.b; +>y.b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) >y : Symbol(y, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 16, 29)) +>b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) } diff --git a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=reverse).types b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=reverse).types index eea7d8a40d8ca..b2f6d1f4b2c0c 100644 --- a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=reverse).types +++ b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=reverse).types @@ -36,9 +36,9 @@ function victim( >x.b : string >x : T >b : string ->y.b : any +>y.b : string >y : T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] ->b : any +>b : string } function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]): string { @@ -46,8 +46,8 @@ function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"][" >y : U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] return y.b; ->y.b : any +>y.b : string >y : U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] ->b : any +>b : string } diff --git a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=typesfirst).errors.txt b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=typesfirst).errors.txt deleted file mode 100644 index 055c38a3cf0b6..0000000000000 --- a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=typesfirst).errors.txt +++ /dev/null @@ -1,29 +0,0 @@ -deepIndexedAccessChainConstraintCheckOrder.ts(14,20): error TS2339: Property 'b' does not exist on type 'T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. -deepIndexedAccessChainConstraintCheckOrder.ts(18,14): error TS2339: Property 'b' does not exist on type 'U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. - - -==== deepIndexedAccessChainConstraintCheckOrder.ts (2 errors) ==== - // The base constraint of a chain of indexed accesses is found through the - // object type of each, all of which share the recursion identity of the - // type parameter. The chain is finite, so the property access is valid - // however deep the chain, and whichever declaration is checked first (65508). - - interface Box { a: Box; b: string } - - const f: typeof victim = (x: U, y: { b: string }) => x.b; - - function victim( - x: T, - y: T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] - ): string { - return x.b + y.b; - ~ -!!! error TS2339: Property 'b' does not exist on type 'T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. - } - - function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]): string { - return y.b; - ~ -!!! error TS2339: Property 'b' does not exist on type 'U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]'. - } - \ No newline at end of file diff --git a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=typesfirst).symbols b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=typesfirst).symbols index 7d3b169810303..0e2b934129ba9 100644 --- a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=typesfirst).symbols +++ b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=typesfirst).symbols @@ -43,7 +43,9 @@ function victim( >x.b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) >x : Symbol(x, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 9, 31)) >b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) +>y.b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) >y : Symbol(y, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 10, 9)) +>b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) } function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]): string { @@ -54,6 +56,8 @@ function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"][" >U : Symbol(U, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 16, 14)) return y.b; +>y.b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) >y : Symbol(y, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 16, 29)) +>b : Symbol(Box.b, Decl(deepIndexedAccessChainConstraintCheckOrder.ts, 5, 23)) } diff --git a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=typesfirst).types b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=typesfirst).types index eea7d8a40d8ca..b2f6d1f4b2c0c 100644 --- a/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=typesfirst).types +++ b/tsc/testdata/baselines/reference/compiler/deepIndexedAccessChainConstraintCheckOrder(checkorder=typesfirst).types @@ -36,9 +36,9 @@ function victim( >x.b : string >x : T >b : string ->y.b : any +>y.b : string >y : T["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] ->b : any +>b : string } function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]): string { @@ -46,8 +46,8 @@ function lone(y: U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"][" >y : U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] return y.b; ->y.b : any +>y.b : string >y : U["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"]["a"] ->b : any +>b : string } From 490a6953a40e5f47061faad23c374ebc33ca7071 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Wed, 11 Nov 2026 22:57:40 -0800 Subject: [PATCH 24/29] Assign contextual parameter types before reading a parameter A parameter of a context-sensitive function read before its contextual parameter types were assigned got its raw contextual type, without the widening by its initializer that the assignment applies. In const f: (g: () => number, x: 1) => void = (g = () => x, x = 0) => {}; the reference to x in the initializer of g was 1 when it was queried first, but number when the function was checked first. Obtaining the signature of the function already requests the assignment, so reading one of its parameters now does too. The assignment checks the initializers of the parameters in order, so checking the initializer of g still read x before x was assigned, and the arrow function was () => 1 when the function was checked first, but () => number when the arrow function was queried first. The type a parameter is assigned depends only on its own contextual type and initializer, so a parameter read while the parameters before it are assigned is now assigned first, and the arrow function is () => number, the type of the x it returns, in every order. Fixes 64278 --- tsc/internal/checker/checker.go | 102 ++++++++++++++---- ...erenceCheckOrder(checkorder=default).types | 2 +- ...nceCheckOrder(checkorder=typesfirst).types | 4 +- 3 files changed, 86 insertions(+), 22 deletions(-) diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index 8f96cc7fb14a7..093ad73c2dac3 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -871,6 +871,8 @@ type Checker struct { freeFlowState *FlowState flowLoopCache map[FlowLoopKey]flowLoopCacheEntry flowLoopStack []FlowLoopInfo + contextualParameterAssignments []contextualParameterAssignment + parametersAssigning []*ast.Symbol sharedFlows []SharedFlow antecedentTypes []*Type flowInvocationCount int @@ -10789,23 +10791,11 @@ func (c *Checker) assignContextualParameterTypes(sig *Signature, context *Signat } } length := len(sig.parameters) - core.IfElse(signatureHasRestParameter(sig), 1, 0) + c.contextualParameterAssignments = append(c.contextualParameterAssignments, contextualParameterAssignment{sig, context}) for i := range length { - parameter := sig.parameters[i] - declaration := parameter.ValueDeclaration() - if declaration.Type() == nil { - t := c.tryGetTypeAtPosition(context, i) - if t != nil && declaration.Initializer() != nil { - initializerType := c.checkDeclarationInitializer(declaration, CheckModeNormal, nil) - if !c.isTypeAssignableTo(initializerType, t) { - initializerType = c.widenTypeInferredFromInitializer(declaration, initializerType) - if c.isTypeAssignableTo(t, initializerType) { - t = initializerType - } - } - } - c.assignParameterType(parameter, t) - } + c.assignContextualParameterType(sig, context, i) } + c.contextualParameterAssignments = c.contextualParameterAssignments[:len(c.contextualParameterAssignments)-1] if signatureHasRestParameter(sig) { // parameter might be a transient symbol generated by use of `arguments` in the function body. parameter := core.LastOrNil(sig.parameters) @@ -10817,6 +10807,60 @@ func (c *Checker) assignContextualParameterTypes(sig *Signature, context *Signat } } +// A contextualParameterAssignment is the assignment of the contextual +// parameter types of a signature in progress. +type contextualParameterAssignment struct { + signature *Signature + context *Signature +} + +// assignContextualParameterType assigns the parameter at index i of sig its +// type from the contextual signature, unless it is annotated or already +// being assigned. The type depends only on the parameter's own declaration, +// so a parameter read while the parameters before it are assigned is +// assigned first; see getTypeOfVariableOrParameterOrProperty. +func (c *Checker) assignContextualParameterType(sig *Signature, context *Signature, i int) { + parameter := sig.parameters[i] + declaration := parameter.ValueDeclaration() + if declaration.Type() != nil || slices.Contains(c.parametersAssigning, parameter) { + return + } + c.parametersAssigning = append(c.parametersAssigning, parameter) + t := c.tryGetTypeAtPosition(context, i) + if t != nil && declaration.Initializer() != nil { + initializerType := c.checkDeclarationInitializer(declaration, CheckModeNormal, nil) + if !c.isTypeAssignableTo(initializerType, t) { + initializerType = c.widenTypeInferredFromInitializer(declaration, initializerType) + if c.isTypeAssignableTo(t, initializerType) { + t = initializerType + } + } + } + c.assignParameterType(parameter, t) + c.parametersAssigning = c.parametersAssigning[:len(c.parametersAssigning)-1] +} + +// assignContextualParameterTypeInProgress assigns the parameter of fn +// declaring symbol, or one of its binding elements, its contextual type, +// while the contextual parameter types of fn are being assigned. +func (c *Checker) assignContextualParameterTypeInProgress(fn *ast.Node, symbol *ast.Symbol) { + decl := symbol.ValueDeclaration() + if ast.IsBindingElement(decl) { + decl = ast.WalkUpBindingElementsAndPatterns(decl) + } + for _, a := range slices.Backward(c.contextualParameterAssignments) { + if a.signature.declaration == fn { + length := len(a.signature.parameters) - core.IfElse(signatureHasRestParameter(a.signature), 1, 0) + for i, parameter := range a.signature.parameters[:length] { + if parameter.ValueDeclaration() == decl { + c.assignContextualParameterType(a.signature, a.context, i) + } + } + return + } + } +} + func (c *Checker) assignNonContextualParameterTypes(signature *Signature) { if signature.ThisParameter() != nil { c.assignParameterType(signature.ThisParameter(), nil) @@ -17376,6 +17420,19 @@ func (c *Checker) instantiatedFromUnaffected(links *ValueSymbolLinks) *ast.Symbo func (c *Checker) getTypeOfVariableOrParameterOrProperty(symbol *ast.Symbol) *Type { links := c.valueSymbolLinks.Get(symbol) if links.resolvedType == nil { + if fn := c.getContextSensitiveFunctionOfParameter(symbol); fn != nil { + // The type of a parameter of a context-sensitive function is the + // one its contextual parameter types assign it, as for the + // signature of the function (see getTypeOfFuncClassEnumModule). + if c.nodeLinks.Get(fn).flags&NodeCheckFlagsContextChecked == 0 { + c.assignContextualParameterTypesOfFunction(fn, CheckModeNormal) + } else { + c.assignContextualParameterTypeInProgress(fn, symbol) + } + if assigned := links.resolvedType; assigned != nil { + return assigned + } + } t := c.getTypeOfVariableOrParameterOrPropertyWorker(symbol) if t == nil { panic("Unexpected nil type") @@ -17397,17 +17454,24 @@ func (c *Checker) getTypeOfVariableOrParameterOrProperty(symbol *ast.Symbol) *Ty } func (c *Checker) isParameterOfContextSensitiveSignature(symbol *ast.Symbol) bool { + return c.getContextSensitiveFunctionOfParameter(symbol) != nil +} + +// getContextSensitiveFunctionOfParameter returns the context-sensitive +// function or object literal method declaring the parameter symbol, or one +// of its binding elements, or nil. +func (c *Checker) getContextSensitiveFunctionOfParameter(symbol *ast.Symbol) *ast.Node { decl := symbol.ValueDeclaration() if decl == nil { - return false + return nil } if ast.IsBindingElement(decl) { decl = ast.WalkUpBindingElementsAndPatterns(decl) } - if ast.IsParameterDeclaration(decl) { - return c.isContextSensitiveFunctionOrObjectLiteralMethod(decl.Parent) + if ast.IsParameterDeclaration(decl) && c.isContextSensitiveFunctionOrObjectLiteralMethod(decl.Parent) { + return decl.Parent } - return false + return nil } func (c *Checker) getTypeOfVariableOrParameterOrPropertyWorker(symbol *ast.Symbol) *Type { diff --git a/tsc/testdata/baselines/reference/compiler/contextualParameterDefaultReferenceCheckOrder(checkorder=default).types b/tsc/testdata/baselines/reference/compiler/contextualParameterDefaultReferenceCheckOrder(checkorder=default).types index b977f7c29faff..86f6c20f91df3 100644 --- a/tsc/testdata/baselines/reference/compiler/contextualParameterDefaultReferenceCheckOrder(checkorder=default).types +++ b/tsc/testdata/baselines/reference/compiler/contextualParameterDefaultReferenceCheckOrder(checkorder=default).types @@ -11,7 +11,7 @@ const f: (g: () => number, x: 1) => void = (g = () => x, x = 0) => {}; >x : 1 >(g = () => x, x = 0) => {} : (g?: () => number, x?: number) => void >g : () => number ->() => x : () => 1 +>() => x : () => number >x : number >x : number >0 : 0 diff --git a/tsc/testdata/baselines/reference/compiler/contextualParameterDefaultReferenceCheckOrder(checkorder=typesfirst).types b/tsc/testdata/baselines/reference/compiler/contextualParameterDefaultReferenceCheckOrder(checkorder=typesfirst).types index ef328c8e6e1bc..86f6c20f91df3 100644 --- a/tsc/testdata/baselines/reference/compiler/contextualParameterDefaultReferenceCheckOrder(checkorder=typesfirst).types +++ b/tsc/testdata/baselines/reference/compiler/contextualParameterDefaultReferenceCheckOrder(checkorder=typesfirst).types @@ -11,8 +11,8 @@ const f: (g: () => number, x: 1) => void = (g = () => x, x = 0) => {}; >x : 1 >(g = () => x, x = 0) => {} : (g?: () => number, x?: number) => void >g : () => number ->() => x : () => 1 ->x : 1 +>() => x : () => number +>x : number >x : number >0 : 0 From d5fd02a0e6584109e4078ee9c5fa3e067b8a758b Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 12 Nov 2026 00:21:09 -0800 Subject: [PATCH 25/29] Check imported names despite invalid import attribute values An import attribute with a value other than a string literal is a grammar error that does not affect the module the import refers to, yet it made checking the import skip its imported names. Resolving one of them for a query still resolved the module, so in import x from "x" with { a: 0 }; the missing module was reported only when the type of x was queried before the import was checked. The names are now checked as they are for an import type with such attributes. (seen in 32063) --- tsc/internal/checker/checker.go | 7 ++++--- ...AttributeValueCheckOrder(checkorder=default).errors.txt | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index 093ad73c2dac3..745dbfb1fa3cf 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -5587,9 +5587,10 @@ func (c *Checker) checkExternalImportOrExportDeclaration(node *ast.Node) bool { if !ast.IsImportEqualsDeclaration(node) { attributes := ast.GetImportAttributes(node) if attributes != nil { - if c.checkGrammarImportAttributeValues(attributes.AsImportAttributes()) { - return false - } + // As for an import type, invalid attribute values leave the + // imported names to be checked, as resolving them for any query + // would check them. + c.checkGrammarImportAttributeValues(attributes.AsImportAttributes()) } } return true diff --git a/tsc/testdata/baselines/reference/compiler/importAttributeValueCheckOrder(checkorder=default).errors.txt b/tsc/testdata/baselines/reference/compiler/importAttributeValueCheckOrder(checkorder=default).errors.txt index d95e6caed1e54..ebb125845b45c 100644 --- a/tsc/testdata/baselines/reference/compiler/importAttributeValueCheckOrder(checkorder=default).errors.txt +++ b/tsc/testdata/baselines/reference/compiler/importAttributeValueCheckOrder(checkorder=default).errors.txt @@ -1,15 +1,18 @@ +importAttributeValueCheckOrder.ts(5,15): error TS2307: Cannot find module 'x' or its corresponding type declarations. importAttributeValueCheckOrder.ts(5,19): error TS2322: Type '{ a: 0; }' is not assignable to type 'ImportAttributes'. Property 'a' is incompatible with index signature. Type 'number' is not assignable to type 'string'. importAttributeValueCheckOrder.ts(5,29): error TS2858: Import attribute values must be string literal expressions. -==== importAttributeValueCheckOrder.ts (2 errors) ==== +==== importAttributeValueCheckOrder.ts (3 errors) ==== // The attribute value is invalid, which does not affect the module. Its // missing module must be reported whether or not the type of x is queried // before the import is checked. import x from "x" with { a: 0 }; + ~~~ +!!! error TS2307: Cannot find module 'x' or its corresponding type declarations. ~~~~~~~~~~~~~ !!! error TS2322: Type '{ a: 0; }' is not assignable to type 'ImportAttributes'. !!! error TS2322: Property 'a' is incompatible with index signature. From f95b43670f15d855c201fadfefeb125f6c270be3 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 12 Nov 2026 00:23:47 -0800 Subject: [PATCH 26/29] Infer the constraint of an infer type parameter without instantiating The constraint of U in a type reference such as S is inferred from the constraint of the corresponding type parameter of S. Finding that type parameter resolved the type of the reference, instantiating S with U, which can itself need the constraint of U. In type Copy = { [K in keyof T]: T[K] }; type S = Copy<{ x: 0 } & T>; type I = {} extends S ? U : never; U had no constraint, and did not satisfy object, when the type arguments of S were checked first, but had the constraint object when I was queried first. The type parameters of the declaration the reference refers to are now used directly. Fixes 38460 --- tsc/internal/checker/checker.go | 28 ++++++++++++++++++- ...nCheckOrder(checkorder=default).errors.txt | 16 ----------- 2 files changed, 27 insertions(+), 17 deletions(-) delete mode 100644 tsc/testdata/baselines/reference/compiler/inferTypeParameterConstraintFromMappedIntersectionCheckOrder(checkorder=default).errors.txt diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index 745dbfb1fa3cf..55e3c27e99bfa 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -18044,7 +18044,7 @@ func (c *Checker) getInferredTypeParameterConstraint(t *Type, omitTypeReferences } switch { case ast.IsTypeReferenceNode(parent) && !omitTypeReferences: - typeParameters := c.getTypeParametersForTypeReferenceOrImport(parent) + typeParameters := c.getDeclaredTypeParametersOfTypeReference(parent) if typeParameters != nil { index := slices.Index(parent.TypeArguments(), child) if index >= 0 && index < len(typeParameters) { @@ -18111,6 +18111,32 @@ func (c *Checker) getTypeParametersForTypeReferenceOrImport(node *ast.Node) []*T return nil } +// getDeclaredTypeParametersOfTypeReference returns the type parameters of the +// type a type reference refers to, if it has an acceptable number of type +// arguments. Unlike getTypeParametersForTypeReferenceOrImport, it does not +// instantiate the type, which can need the constraints of the infer type +// parameters among its type arguments, inferred from these type parameters. +func (c *Checker) getDeclaredTypeParametersOfTypeReference(node *ast.Node) []*Type { + symbol := c.getSymbolFromTypeReference(node) + if symbol == c.unknownSymbol { + return nil + } + declared := c.getDeclaredTypeOfSymbol(symbol) + if c.isErrorType(declared) { + return nil + } + var typeParameters []*Type + if symbol.Flags()&ast.SymbolFlagsTypeAlias != 0 { + typeParameters = c.typeAliasLinks.Get(symbol).typeParameters + } else if declared.objectFlags&ObjectFlagsClassOrInterface != 0 { + typeParameters = declared.AsInterfaceType().LocalTypeParameters() + } + if n := len(node.TypeArguments()); n < c.getMinTypeArgumentCount(typeParameters) || n > len(typeParameters) { + return nil + } + return typeParameters +} + func (c *Checker) getTypeParametersForTypeAndSymbol(t *Type, symbol *ast.Symbol) []*Type { if !c.isErrorType(t) { if symbol.Flags()&ast.SymbolFlagsTypeAlias != 0 { diff --git a/tsc/testdata/baselines/reference/compiler/inferTypeParameterConstraintFromMappedIntersectionCheckOrder(checkorder=default).errors.txt b/tsc/testdata/baselines/reference/compiler/inferTypeParameterConstraintFromMappedIntersectionCheckOrder(checkorder=default).errors.txt deleted file mode 100644 index 451dbe9e554a3..0000000000000 --- a/tsc/testdata/baselines/reference/compiler/inferTypeParameterConstraintFromMappedIntersectionCheckOrder(checkorder=default).errors.txt +++ /dev/null @@ -1,16 +0,0 @@ -inferTypeParameterConstraintFromMappedIntersectionCheckOrder.ts(8,23): error TS2344: Type 'U' does not satisfy the constraint 'object'. - - -==== inferTypeParameterConstraintFromMappedIntersectionCheckOrder.ts (1 errors) ==== - // The constraint of U is inferred from the constraint of the type parameter - // of S. Instantiating S with U needs the constraint of U, so whether U - // satisfies object must not depend on whether I is queried before its type - // arguments are checked. - - type Copy = { [K in keyof T]: T[K] }; - type S = Copy<{ x: 0 } & T>; - type I = {} extends S ? U : never; - ~~~~~~~ -!!! error TS2344: Type 'U' does not satisfy the constraint 'object'. -!!! related TS2208 inferTypeParameterConstraintFromMappedIntersectionCheckOrder.ts:8:29: This type parameter might need an `extends object` constraint. - \ No newline at end of file From 07f8cd7060cac17499444ee046a7a858a6656795 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 13 Nov 2026 01:12:25 -0800 Subject: [PATCH 27/29] Instantiate an instantiation expression with the type arguments given An instantiation expression whose type arguments did not satisfy their constraints kept the generic signature, unlike a type reference, whose type is that of the type arguments given, with the constraints checked separately. Checking the constraints while computing the type made both depend on order: in declare function b(): U; interface A { value: T; child: typeof b>; } checking A against the constraint A needs the variances of A, which need the type of child. Checking A first measured the variances with child incomplete, which missed the constraint error, while querying child first reported it and kept the generic signature, giving child a different type. The signature is now instantiated with the type arguments given, as for a type reference, and the constraints are checked once the types they need are resolved, so child has the same type and error in every order. Type argument completions in a decorator read the signatures of its expression, which now has the type arguments being typed applied, so they read those of the expression the type arguments apply to. (seen in 52892) Fixes 61982 --- tsc/internal/checker/checker.go | 14 ++++++++----- tsc/internal/checker/services.go | 7 ++++++- ...eCheckOrder(checkorder=default).errors.txt | 8 ++++++- ...cleCheckOrder(checkorder=typesfirst).types | 2 +- ...nstraintInStaticClassExpression.errors.txt | 21 +++++++++++++++++++ 5 files changed, 44 insertions(+), 8 deletions(-) create mode 100644 tsc/testdata/baselines/reference/compiler/instantiationExpressionConstraintInStaticClassExpression.errors.txt diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index 55e3c27e99bfa..713c9b8381fd6 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -11143,11 +11143,15 @@ func (c *Checker) getInstantiationExpressionType(exprType *Type, node *ast.Node) return len(sig.TypeParameters()) != 0 && c.hasCorrectTypeArgumentArity(sig, typeArguments.Nodes) }) return core.SameMap(applicableSignatures, func(sig *Signature) *Signature { - typeArgumentTypes := c.checkTypeArguments(sig, typeArguments.Nodes, true /*reportErrors*/, nil) - if typeArgumentTypes != nil { - return c.getSignatureInstantiation(sig, typeArgumentTypes, ast.IsInJSFile(sig.declaration), nil) - } - return sig + // As for a type reference, the type arguments are those given + // whether or not they satisfy their constraints, which are + // checked once the types they need are resolved: checking them + // can need the variances of a type whose members include this + // expression. + c.addDeferredDiagnostic(func() { + c.checkTypeArguments(sig, typeArguments.Nodes, true /*reportErrors*/, nil) + }) + return c.getSignatureInstantiation(sig, core.Map(typeArguments.Nodes, c.getTypeFromTypeNode), ast.IsInJSFile(sig.declaration), nil) }) } var getInstantiatedType func(*Type) *Type diff --git a/tsc/internal/checker/services.go b/tsc/internal/checker/services.go index c36f873dfc5e2..415dbffc8cfb3 100644 --- a/tsc/internal/checker/services.go +++ b/tsc/internal/checker/services.go @@ -662,7 +662,12 @@ func (c *Checker) GetTypeArgumentConstraint(node *ast.Node) *Type { func (c *Checker) getUninstantiatedSignatures(node *ast.Node) []*Signature { switch node.Kind { case ast.KindCallExpression, ast.KindDecorator: - return c.getSignaturesOfType(c.getTypeOfExpression(node.Expression()), SignatureKindCall) + expression := node.Expression() + if ast.IsDecorator(node) && ast.IsExpressionWithTypeArguments(expression) { + // The type arguments of a decorator are part of its expression. + expression = expression.Expression() + } + return c.getSignaturesOfType(c.getTypeOfExpression(expression), SignatureKindCall) case ast.KindNewExpression: return c.getSignaturesOfType(c.getTypeOfExpression(node.Expression()), SignatureKindConstruct) case ast.KindJsxSelfClosingElement, ast.KindJsxOpeningElement: diff --git a/tsc/testdata/baselines/reference/compiler/instantiationExpressionConstraintCycleCheckOrder(checkorder=default).errors.txt b/tsc/testdata/baselines/reference/compiler/instantiationExpressionConstraintCycleCheckOrder(checkorder=default).errors.txt index a674eea18c3f4..34b433cab41d3 100644 --- a/tsc/testdata/baselines/reference/compiler/instantiationExpressionConstraintCycleCheckOrder(checkorder=default).errors.txt +++ b/tsc/testdata/baselines/reference/compiler/instantiationExpressionConstraintCycleCheckOrder(checkorder=default).errors.txt @@ -1,8 +1,10 @@ +instantiationExpressionConstraintCycleCheckOrder.ts(10,25): error TS2344: Type 'A' does not satisfy the constraint 'A'. + Type 'T' is not assignable to type 'number'. instantiationExpressionConstraintCycleCheckOrder.ts(17,41): error TS2344: Type 'A' does not satisfy the constraint 'A'. Type 'T' is not assignable to type 'number'. -==== instantiationExpressionConstraintCycleCheckOrder.ts (1 errors) ==== +==== instantiationExpressionConstraintCycleCheckOrder.ts (2 errors) ==== // Checking the type arguments of the instantiation expressions against their // constraints needs the variances of A, which need the type of child. The // constraint errors and the types of child must not depend on whether child @@ -13,6 +15,10 @@ instantiationExpressionConstraintCycleCheckOrder.ts(17,41): error TS2344: Type ' interface A { value: T; child: typeof b>; + ~~~~ +!!! error TS2344: Type 'A' does not satisfy the constraint 'A'. +!!! error TS2344: Type 'T' is not assignable to type 'number'. +!!! related TS2208 instantiationExpressionConstraintCycleCheckOrder.ts:8:17: This type parameter might need an `extends number` constraint. } } diff --git a/tsc/testdata/baselines/reference/compiler/instantiationExpressionConstraintCycleCheckOrder(checkorder=typesfirst).types b/tsc/testdata/baselines/reference/compiler/instantiationExpressionConstraintCycleCheckOrder(checkorder=typesfirst).types index 4b7e7e4ea94e9..21ae95de09035 100644 --- a/tsc/testdata/baselines/reference/compiler/instantiationExpressionConstraintCycleCheckOrder(checkorder=typesfirst).types +++ b/tsc/testdata/baselines/reference/compiler/instantiationExpressionConstraintCycleCheckOrder(checkorder=typesfirst).types @@ -17,7 +17,7 @@ namespace InterfaceCycle { >value : T child: typeof b>; ->child : () => A +>child : typeof b> >b : >() => U } } diff --git a/tsc/testdata/baselines/reference/compiler/instantiationExpressionConstraintInStaticClassExpression.errors.txt b/tsc/testdata/baselines/reference/compiler/instantiationExpressionConstraintInStaticClassExpression.errors.txt new file mode 100644 index 0000000000000..069ae1cb033da --- /dev/null +++ b/tsc/testdata/baselines/reference/compiler/instantiationExpressionConstraintInStaticClassExpression.errors.txt @@ -0,0 +1,21 @@ +instantiationExpressionConstraintInStaticClassExpression.ts(6,35): error TS2344: Type 'A' does not satisfy the constraint 'A'. + Type 'T' is not assignable to type 'number'. + + +==== instantiationExpressionConstraintInStaticClassExpression.ts (1 errors) ==== + // A does not satisfy the constraint A of B, as T is not assignable to + // number, which must be reported. + + class A { + value!: T; + child!: InstanceType>>; // this should error + ~~~~ +!!! error TS2344: Type 'A' does not satisfy the constraint 'A'. +!!! error TS2344: Type 'T' is not assignable to type 'number'. +!!! related TS2208 instantiationExpressionConstraintInStaticClassExpression.ts:4:9: This type parameter might need an `extends number` constraint. + + static B = class B { + parent!: T; + }; + } + \ No newline at end of file From b83a2563a1df72920855174d5847fb6a72c6a889 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sun, 22 Nov 2026 09:06:43 -0800 Subject: [PATCH 28/29] Count only expanding type references as nested recursion Comparing types assumes a comparison holds once it is nested in three others of types with the same recursion identity, and inference stops at two. A type reference created while resolving a type node was tracked by itself rather than by its symbol, as it cannot be the source of generative recursion without being instantiated. Type references are interned, so this depended on how a reference was first created. In interface A { slice(): B; every(predicate: (value: T) => value is S): this is A; flatMap(callback: (value: T) => U | readonly U[] | A): U[]; } interface B extends A {} const a: A<0> = []; const b: B<0> = []; B<0> was tracked by itself when the annotation of b was resolved before checking a instantiated slice, and by its symbol otherwise, so the comparison for b was cut short at different depths, changing the error it reported. Cutting a comparison short can also change whether the types are related. Type references are all tracked by their symbol, and a nested occurrence of one counts toward the limit only if it is built from one of the type arguments of the occurrence before it, as each step of an infinitely expanding instantiation is. Otherwise the same generic type can occur nested with unrelated type arguments, as Promise> does within Promise> when inferring from an async iterable (seen in rakazo), which must not stop the inference. A union or intersection with all the constituents of a type argument is built from it, as instantiating T & U with a union for T distributes over it or flattens it into the result (seen in mikro-orm). Other types keep counting any deeper occurrence, as they may be built from parts of the types they were instantiated from, extracted by inference. (seen in 54921) --- packages/typescript/enums/objectFlags.d.ts | 1 - packages/typescript/enums/objectFlags.js | 1 - tsc/internal/api/enum_values_generated.go | 1 - tsc/internal/checker/checker.go | 30 +- tsc/internal/checker/relater.go | 221 ++++++--- tsc/internal/checker/tracer.go | 2 +- tsc/internal/checker/types.go | 1 - .../deeplyNestedIntersectionWithUnion.symbols | 437 ++++++++++++++++++ .../deeplyNestedIntersectionWithUnion.types | 177 +++++++ ...yCheckOrder(checkorder=default).errors.txt | 4 +- ...teTrace-creates-types-in-a-stable-order.js | 36 +- ...e-with-multiple-files-and-complex-types.js | 36 +- .../deeplyNestedIntersectionWithUnion.ts | 50 ++ 13 files changed, 869 insertions(+), 128 deletions(-) create mode 100644 tsc/testdata/baselines/reference/compiler/deeplyNestedIntersectionWithUnion.symbols create mode 100644 tsc/testdata/baselines/reference/compiler/deeplyNestedIntersectionWithUnion.types create mode 100644 tsc/testdata/tests/cases/compiler/deeplyNestedIntersectionWithUnion.ts diff --git a/packages/typescript/enums/objectFlags.d.ts b/packages/typescript/enums/objectFlags.d.ts index 0b3fd779a8258..d60a083e2e4ec 100644 --- a/packages/typescript/enums/objectFlags.d.ts +++ b/packages/typescript/enums/objectFlags.d.ts @@ -36,7 +36,6 @@ export declare enum ObjectFlags { IsClassInstanceClone = 1 << 26, IdenticalBaseTypeCalculated = 1 << 27, IdenticalBaseTypeExists = 1 << 28, - FromTypeNode = 1 << 29, IsGenericTypeComputed = 1 << 22, IsGenericObjectType = 1 << 23, IsGenericIndexType = 1 << 24, diff --git a/packages/typescript/enums/objectFlags.js b/packages/typescript/enums/objectFlags.js index ed823a5ae3c53..ebd245abcd51d 100644 --- a/packages/typescript/enums/objectFlags.js +++ b/packages/typescript/enums/objectFlags.js @@ -36,7 +36,6 @@ export var ObjectFlags; ObjectFlags[ObjectFlags["IsClassInstanceClone"] = 67108864] = "IsClassInstanceClone"; ObjectFlags[ObjectFlags["IdenticalBaseTypeCalculated"] = 134217728] = "IdenticalBaseTypeCalculated"; ObjectFlags[ObjectFlags["IdenticalBaseTypeExists"] = 268435456] = "IdenticalBaseTypeExists"; - ObjectFlags[ObjectFlags["FromTypeNode"] = 536870912] = "FromTypeNode"; ObjectFlags[ObjectFlags["IsGenericTypeComputed"] = 4194304] = "IsGenericTypeComputed"; ObjectFlags[ObjectFlags["IsGenericObjectType"] = 8388608] = "IsGenericObjectType"; ObjectFlags[ObjectFlags["IsGenericIndexType"] = 16777216] = "IsGenericIndexType"; diff --git a/tsc/internal/api/enum_values_generated.go b/tsc/internal/api/enum_values_generated.go index 77fd0ed5ac852..ced522d465d55 100644 --- a/tsc/internal/api/enum_values_generated.go +++ b/tsc/internal/api/enum_values_generated.go @@ -245,7 +245,6 @@ func main() { "IsClassInstanceClone": toInt32(checker.ObjectFlagsIsClassInstanceClone), "IdenticalBaseTypeCalculated": toInt32(checker.ObjectFlagsIdenticalBaseTypeCalculated), "IdenticalBaseTypeExists": toInt32(checker.ObjectFlagsIdenticalBaseTypeExists), - "FromTypeNode": toInt32(checker.ObjectFlagsFromTypeNode), "IsGenericTypeComputed": toInt32(checker.ObjectFlagsIsGenericTypeComputed), "IsGenericObjectType": toInt32(checker.ObjectFlagsIsGenericObjectType), "IsGenericIndexType": toInt32(checker.ObjectFlagsIsGenericIndexType), diff --git a/tsc/internal/checker/checker.go b/tsc/internal/checker/checker.go index 713c9b8381fd6..7a4ec0b20b369 100644 --- a/tsc/internal/checker/checker.go +++ b/tsc/internal/checker/checker.go @@ -24800,7 +24800,7 @@ func (c *Checker) getTypeFromClassOrInterfaceReference(node *ast.Node, symbol *a // of the class or interface. localTypeArguments := c.fillMissingTypeArguments(c.getTypeArgumentsFromNode(node), typeParameters, minTypeArgumentCount, isJs) typeArguments := append(d.OuterTypeParameters(), localTypeArguments...) - return c.createTypeReferenceEx(t, typeArguments, ObjectFlagsFromTypeNode) + return c.createTypeReference(t, typeArguments) } if c.checkNoTypeArguments(node, symbol) { return t @@ -24895,11 +24895,11 @@ func (c *Checker) createNormalizedTypeReference(target *Type, typeArguments []*T return c.createTypeReference(target, typeArguments) } -func (c *Checker) createNormalizedTupleTypeEx(target *Type, elementTypes []*Type, objectFlags ObjectFlags) *Type { +func (c *Checker) createNormalizedTupleType(target *Type, elementTypes []*Type) *Type { d := target.AsTupleType() if d.combinedFlags&ElementFlagsNonRequired == 0 { // No need to normalize when we only have regular required elements - return c.createTypeReferenceEx(target, elementTypes, objectFlags) + return c.createTypeReference(target, elementTypes) } if d.combinedFlags&ElementFlagsVariadic != 0 { for i, e := range elementTypes { @@ -24913,7 +24913,7 @@ func (c *Checker) createNormalizedTupleTypeEx(target *Type, elementTypes []*Type }) if c.checkCrossProductUnion(checkTypes) { return c.mapType(e, func(t *Type) *Type { - return c.createNormalizedTupleTypeEx(target, core.ReplaceElement(elementTypes, i, t), objectFlags) + return c.createNormalizedTupleType(target, core.ReplaceElement(elementTypes, i, t)) }) } } @@ -24938,15 +24938,11 @@ func (c *Checker) createNormalizedTupleTypeEx(target *Type, elementTypes []*Type case tupleTarget == c.emptyGenericType: return c.emptyObjectType case len(n.types) != 0: - return c.createTypeReferenceEx(tupleTarget, n.types, objectFlags) + return c.createTypeReference(tupleTarget, n.types) } return tupleTarget } -func (c *Checker) createNormalizedTupleType(target *Type, elementTypes []*Type) *Type { - return c.createNormalizedTupleTypeEx(target, elementTypes, ObjectFlagsNone) -} - type TupleNormalizer struct { c *Checker types []*Type @@ -25741,9 +25737,9 @@ func (c *Checker) getTypeFromArrayOrTupleTypeNode(node *ast.Node) *Type { elementTypes = core.Map(node.Elements(), c.getTypeFromTypeNode) } if target.objectFlags&ObjectFlagsTuple != 0 { - links.resolvedType = c.createNormalizedTupleTypeEx(target, elementTypes, ObjectFlagsFromTypeNode) + links.resolvedType = c.createNormalizedTupleType(target, elementTypes) } else { - links.resolvedType = c.createTypeReferenceEx(target, elementTypes, ObjectFlagsFromTypeNode) + links.resolvedType = c.createTypeReference(target, elementTypes) } } } @@ -26778,16 +26774,12 @@ func (c *Checker) tryCreateTypeReference(target *Type, typeArguments []*Type) *T } func (c *Checker) createTypeReference(target *Type, typeArguments []*Type) *Type { - return c.createTypeReferenceEx(target, typeArguments, ObjectFlagsNone) -} - -func (c *Checker) createTypeReferenceEx(target *Type, typeArguments []*Type, objectFlags ObjectFlags) *Type { id := getTypeListKey(typeArguments) intf := target.AsInterfaceType() if t, ok := intf.instantiations[id]; ok { return t } - t := c.newObjectType(ObjectFlagsReference|objectFlags|c.getPropagatingFlagsOfTypes(typeArguments, TypeFlagsNone), target.symbol) + t := c.newObjectType(ObjectFlagsReference|c.getPropagatingFlagsOfTypes(typeArguments, TypeFlagsNone), target.symbol) d := t.AsTypeReference() d.target = target d.resolvedTypeArguments = typeArguments @@ -29488,7 +29480,7 @@ func (c *Checker) walkBaseConstraint(t *Type, stack []baseConstraintFrame, keep // levels of nesting, we are presumably exploring a repeating pattern with a long cycle that hasn't // yet triggered the deeply nested limiter. We have no test cases that actually get to 50 levels of // nesting, so it is effectively just a safety stop. - identity := getRecursionIdentity(t) + identity := c.getRecursionIdentity(t) generation := c.typeGeneration(t) if len(stack) < baseConstraintFreeDepth || len(stack) < baseConstraintMaxDepth && !repeatsInBaseConstraintWalk(identity, generation, stack) { c.addBaseConstraintRepeat(identity, generation, 0) @@ -29545,7 +29537,7 @@ func (c *Checker) computeTypeNesting(t *Type) (int, int) { } // Find the nearest types t was instantiated from with its recursion // identity, skipping those that cannot hold one nested more than found. - identity := getRecursionIdentity(t) + identity := c.getRecursionIdentity(t) below := 0 // The nestings of all the types t was instantiated from are computed by // now, so this does not recur and the set of visited types can be shared. @@ -29561,7 +29553,7 @@ func (c *Checker) computeTypeNesting(t *Type) (int, int) { if m <= below { return } - if getRecursionIdentity(s) == identity { + if c.getRecursionIdentity(s) == identity { below = max(below, own) } else if s.flags&(TypeFlagsConditional|TypeFlagsUnion) != 0 { // A level reached through other types, such as a reference or diff --git a/tsc/internal/checker/relater.go b/tsc/internal/checker/relater.go index 9cd06ba775205..d0de1bd5c7453 100644 --- a/tsc/internal/checker/relater.go +++ b/tsc/internal/checker/relater.go @@ -783,12 +783,13 @@ func (c *Checker) isDeeplyNestedType(t *Type, stack []*Type, maxDepth int) bool } } } else { - identity := getRecursionIdentityFromTarget(target) + identity := c.getRecursionIdentityFromTarget(target) count := 0 var previous *Type for _, t := range stack { - if hasMatchingRecursionIdentity(t, identity) { - if previous == nil || c.isDeeperOccurrence(t, previous) { + if c.hasMatchingRecursionIdentity(t, identity) { + // We only count occurrences that may continue an expansion from the previous occurrence. + if previous == nil || c.continuesExpansion(t, previous) { count++ if count >= maxDepth { return true @@ -827,47 +828,156 @@ func (c *Checker) isDeeperOccurrence(t *Type, previous *Type) bool { !slices.Equal(t.Types(), previous.Types()) || t.alias != nil && previous.alias != nil } - return t.flags&TypeFlagsInstantiable != 0 && !c.isBuiltFrom(previous, t) + if t.flags&TypeFlagsInstantiable == 0 { + return false + } + found, _ := c.isBuiltFrom(previous, t) + return !found } -// isBuiltFrom reports whether t was instantiated, transitively, from s, as -// visitTypeSources visits the types a type was instantiated from. Since a type -// has a higher generation than the types it was built from, only those of a -// higher generation than s are searched. -func (c *Checker) isBuiltFrom(t *Type, s *Type) bool { +const ( + maxTypeGeneration = 1<<16 - 3 + typeGenerationInProgress = 1<<16 - 1 +) + +// typeGeneration returns one more than the highest generation of the types t +// was instantiated from, as visitTypeSources visits them, or zero if it was not +// instantiated from any. A type is created after the types it is instantiated +// from, so this orders types by creation where the order follows from their +// structure, and unlike type ids does not depend on the order in which +// unrelated types were created. +func (c *Checker) typeGeneration(t *Type) int { + debug.Assert(t.generation != typeGenerationInProgress, "types are only built from existing types") + if t.generation != 0 { + return int(t.generation) - 1 + } + t.generation = typeGenerationInProgress + generation := 0 + visit := func(s *Type) { + generation = max(generation, c.typeGeneration(s)+1) + } + if t.flags&TypeFlagsObject != 0 && t.objectFlags&ObjectFlagsReference != 0 && t.AsTypeReference().node != nil { + // A deferred type reference is built from the types its mapper maps + // to, though which of them its type arguments are is not known. + if m := t.AsObjectType().mapper; m != nil { + c.visitMapperTargets(m, visit) + } + } else { + c.visitTypeSources(t, visit) + } + generation = min(generation, maxTypeGeneration) + t.generation = uint16(generation + 1) + return generation +} + +// continuesExpansion reports whether t, an occurrence of a recursion identity +// nested within the occurrence previous, may be the next step of an infinitely +// expanding instantiation. Such a step is a deeper occurrence, as +// isDeeperOccurrence decides. A step from a type reference is moreover built +// from one of its type arguments, whereas the same generic type may otherwise +// occur nested with unrelated type arguments, as Promise> +// does within Promise>. Other types may be built from parts +// of the types they were instantiated from, extracted by inference, so any +// deeper occurrence of them counts, as does one built from types not known. +func (c *Checker) continuesExpansion(t *Type, previous *Type) bool { + if !c.isDeeperOccurrence(t, previous) { + return false + } + if t == previous || previous.objectFlags&ObjectFlagsReference == 0 || previous.AsTypeReference().node != nil { + return true + } + typeArguments := previous.AsTypeReference().resolvedTypeArguments + known := true + for _, s := range typeArguments { + found, k := c.isBuiltFrom(t, s) + if found { + return true + } + known = known && k + } + return len(typeArguments) == 0 || !known +} + +// isBuiltFrom reports whether t is s, or was instantiated, transitively, from +// s, as visitTypeSources visits the types a type was instantiated from, and +// whether the types t was built from were all known. +func (c *Checker) isBuiltFrom(t *Type, s *Type) (found bool, known bool) { + if t == s || hasConstituentsOf(t, s) { + return true, true + } + known = true + if s.flags&TypeFlagsUnion != 0 { + // Instantiating T & U with a union s for T distributes over s, so the + // result is built from the constituents of s. + for _, u := range s.Types() { + if u.flags&TypeFlagsStructuredOrInstantiable != 0 { + builtFrom, k := c.isBuiltFrom(t, u) + if builtFrom { + return true, true + } + known = known && k + } + } + } target := c.typeGeneration(s) var visited collections.Set[*Type] var visit func(t *Type) bool visit = func(t *Type) bool { - if t == s { + if t == s || hasConstituentsOf(t, s) { return true } if t == nil || c.typeGeneration(t) <= target || visited.Has(t) { return false } visited.Add(t) - found := false - c.visitTypeSources(t, func(u *Type) { - found = found || visit(u) - }) - return found + builtFrom := false + if !c.visitTypeSources(t, func(u *Type) { + if !builtFrom && visit(u) { + builtFrom = true + } + }) { + known = false + } + return builtFrom + } + found = visit(t) + return found, known +} + +// hasConstituentsOf reports whether t is a union or intersection with all the +// constituents of the union or intersection s. Such a t is built from s: +// instantiating T & U with s for T flattens the constituents of s into the +// result, and a copy of s with another origin or alias has the same +// constituents. +func hasConstituentsOf(t *Type, s *Type) bool { + kind := s.flags & TypeFlagsUnionOrIntersection + if kind == 0 || t.flags&TypeFlagsUnionOrIntersection != kind || len(t.Types()) < len(s.Types()) { + return false + } + for _, u := range s.Types() { + if !slices.Contains(t.Types(), u) { + return false + } } - return visit(t) + return true } // visitTypeSources calls f with each type t was instantiated from, as far as -// they are known without computing them. Object literals are built from the -// types of their properties, except for those resolved lazily, such as -// accessors. -func (c *Checker) visitTypeSources(t *Type, f func(*Type)) { +// they are known without computing them, and reports whether those are all +// known. Object literals are built from the types of their properties, except +// for those resolved lazily, such as accessors. +func (c *Checker) visitTypeSources(t *Type, f func(*Type)) bool { switch { case t.flags&TypeFlagsObject != 0: - if t.objectFlags&ObjectFlagsReference != 0 && t.AsTypeReference().node == nil { + if t.objectFlags&ObjectFlagsReference != 0 { + if t.AsTypeReference().node != nil { + return false + } for _, a := range t.AsTypeReference().resolvedTypeArguments { f(a) } } else if m := t.AsObjectType().mapper; m != nil { - c.visitMapperTargets(m, f) + return c.visitMapperTargets(m, f) } else if t.symbol != nil && t.symbol.Flags()&ast.SymbolFlagsObjectLiteral != 0 { for prop := range t.AsStructuredType().members.Values() { if prop.Flags()&ast.SymbolFlagsTransient == 0 || prop.CheckFlags()&(ast.CheckFlagsInstantiated|ast.CheckFlagsMapped|ast.CheckFlagsReverseMapped|ast.CheckFlagsDeferredType) != 0 { @@ -880,7 +990,7 @@ func (c *Checker) visitTypeSources(t *Type, f func(*Type)) { } case t.flags&TypeFlagsConditional != 0: if m := t.AsConditionalType().mapper; m != nil { - c.visitMapperTargets(m, f) + return c.visitMapperTargets(m, f) } case t.flags&TypeFlagsIndexedAccess != 0: d := t.AsIndexedAccessType() @@ -897,55 +1007,36 @@ func (c *Checker) visitTypeSources(t *Type, f func(*Type)) { f(d.baseType) f(d.constraint) } + return true } // visitMapperTargets calls f with each type m maps to, as far as they are -// known without computing them. -func (c *Checker) visitMapperTargets(m *TypeMapper, f func(*Type)) { +// known without computing them, and reports whether those are all known. +func (c *Checker) visitMapperTargets(m *TypeMapper, f func(*Type)) bool { switch m.kind { case TypeMapperKindSimple: f(castTypeMapper[SimpleTypeMapper](m, TypeMapperKindSimple).target) + return true case TypeMapperKindArray: for _, t := range castTypeMapper[ArrayTypeMapper](m, TypeMapperKindArray).targets { f(t) } + return true case TypeMapperKindArrayToSingle: f(castTypeMapper[ArrayToSingleTypeMapper](m, TypeMapperKindArrayToSingle).target) + return true case TypeMapperKindMerged: d := castTypeMapper[MergedTypeMapper](m, TypeMapperKindMerged) - c.visitMapperTargets(d.m1, f) - c.visitMapperTargets(d.m2, f) + known1 := c.visitMapperTargets(d.m1, f) + known2 := c.visitMapperTargets(d.m2, f) + return known1 && known2 case TypeMapperKindComposite: d := castTypeMapper[CompositeTypeMapper](m, TypeMapperKindComposite) - c.visitMapperTargets(d.m1, f) - c.visitMapperTargets(d.m2, f) + known1 := c.visitMapperTargets(d.m1, f) + known2 := c.visitMapperTargets(d.m2, f) + return known1 && known2 } -} - -const ( - maxTypeGeneration = 1<<16 - 3 - typeGenerationInProgress = 1<<16 - 1 -) - -// typeGeneration returns one more than the highest generation of the types t -// was instantiated from, as visitTypeSources visits them, or zero if it was not -// instantiated from any. A type is created after the types it is instantiated -// from, so this orders types by creation where the order follows from their -// structure, and unlike type ids does not depend on the order in which -// unrelated types were created. -func (c *Checker) typeGeneration(t *Type) int { - debug.Assert(t.generation != typeGenerationInProgress, "types are only built from existing types") - if t.generation != 0 { - return int(t.generation) - 1 - } - t.generation = typeGenerationInProgress - generation := 0 - c.visitTypeSources(t, func(s *Type) { - generation = max(generation, c.typeGeneration(s)+1) - }) - generation = min(generation, maxTypeGeneration) - t.generation = uint16(generation + 1) - return generation + return false } // deeplyNestedStart returns the highest index in stack from which t is still @@ -963,21 +1054,21 @@ func (c *Checker) deeplyNestedStart(t *Type, stack []*Type, maxDepth int) int { return 0 } -func hasMatchingRecursionIdentity(t *Type, identity RecursionId) bool { +func (c *Checker) hasMatchingRecursionIdentity(t *Type, identity RecursionId) bool { target := getRecursionIdentityTarget(t) if target.flags&TypeFlagsIntersection != 0 { for _, t := range target.Types() { - if hasMatchingRecursionIdentity(t, identity) { + if c.hasMatchingRecursionIdentity(t, identity) { return true } } return false } - return getRecursionIdentityFromTarget(target) == identity + return c.getRecursionIdentityFromTarget(target) == identity } -func getRecursionIdentity(t *Type) RecursionId { - return getRecursionIdentityFromTarget(getRecursionIdentityTarget(t)) +func (c *Checker) getRecursionIdentity(t *Type) RecursionId { + return c.getRecursionIdentityFromTarget(getRecursionIdentityTarget(t)) } // Get the recursion identity target type from a type. Recursively (a) obtain the target object type of an @@ -1006,7 +1097,7 @@ func getRecursionIdentityTarget(t *Type) *Type { // instantiations of that type have the same recursion identity. The default recursion identity is the object // identity of the type, meaning that every type is unique. Generally, types with constituents that could circularly // reference the type have a recursion identity that differs from the object identity. -func getRecursionIdentityFromTarget(t *Type) RecursionId { +func (c *Checker) getRecursionIdentityFromTarget(t *Type) RecursionId { // Object and array literals are known not to contain recursive references and don't need a recursion identity. if t.flags&TypeFlagsObject != 0 && !isObjectOrArrayLiteralType(t) { if t.objectFlags&ObjectFlagsReference != 0 && t.AsTypeReference().node != nil { @@ -1015,14 +1106,12 @@ func getRecursionIdentityFromTarget(t *Type) RecursionId { // unique AST node. return asRecursionId(t.AsTypeReference().node) } - if t.symbol != nil && !(t.objectFlags&ObjectFlagsAnonymous != 0 && t.symbol.Flags()&ast.SymbolFlagsClass != 0) && t.objectFlags&ObjectFlagsFromTypeNode == 0 { + if t.symbol != nil && !(t.objectFlags&ObjectFlagsAnonymous != 0 && t.symbol.Flags()&ast.SymbolFlagsClass != 0) { // We track object types that have a symbol by that symbol (representing the origin of the type), but - // exclude the static sides of classes (since they share their symbols with the instance sides) and type - // references that originate in resolution of AST type nodes (since such type nodes cannot be the source - // of generative recursion without first being instantiated). + // exclude the static sides of classes (since they share their symbols with the instance sides). return asRecursionId(t.symbol) } - if isTupleType(t) && t.objectFlags&ObjectFlagsFromTypeNode == 0 { + if isTupleType(t) { return asRecursionId(t.Target()) } } diff --git a/tsc/internal/checker/tracer.go b/tsc/internal/checker/tracer.go index 0fea57f8d4d70..d514ef9fbd4da 100644 --- a/tsc/internal/checker/tracer.go +++ b/tsc/internal/checker/tracer.go @@ -323,7 +323,7 @@ func (a *tracedTypeAdapter) Pattern() *ast.Node { } func (a *tracedTypeAdapter) RecursionIdentity() any { - return getRecursionIdentity(a.t).value + return a.checker.getRecursionIdentity(a.t).value } func (a *tracedTypeAdapter) Display() string { diff --git a/tsc/internal/checker/types.go b/tsc/internal/checker/types.go index 6a7e7d4b5ecc4..14df59476084f 100644 --- a/tsc/internal/checker/types.go +++ b/tsc/internal/checker/types.go @@ -734,7 +734,6 @@ const ( // Flags that require TypeFlags.Object and ObjectFlags.Reference ObjectFlagsIdenticalBaseTypeCalculated = 1 << 27 // has had `getSingleBaseForNonAugmentingSubtype` invoked on it already ObjectFlagsIdenticalBaseTypeExists = 1 << 28 // has a defined cachedEquivalentBaseType member - ObjectFlagsFromTypeNode = 1 << 29 // Originates in resolution of AST type node // Flags that require TypeFlags.UnionOrIntersection or TypeFlags.Substitution ObjectFlagsIsGenericTypeComputed = 1 << 22 // IsGenericObjectType flag has been computed ObjectFlagsIsGenericObjectType = 1 << 23 // Union or intersection contains generic object type diff --git a/tsc/testdata/baselines/reference/compiler/deeplyNestedIntersectionWithUnion.symbols b/tsc/testdata/baselines/reference/compiler/deeplyNestedIntersectionWithUnion.symbols new file mode 100644 index 0000000000000..c0703ae78566c --- /dev/null +++ b/tsc/testdata/baselines/reference/compiler/deeplyNestedIntersectionWithUnion.symbols @@ -0,0 +1,437 @@ +//// [tests/cases/compiler/deeplyNestedIntersectionWithUnion.ts] //// + +=== deeplyNestedIntersectionWithUnion.ts === +// Reduced from yargs as used by mikro-orm. Comparing Argv structurally +// builds Argv again and again. With a union for T, each +// intersection distributes over the union or flattens a copy of it, and is +// still another level of nesting. + +type BuilderCallback = ((args: Argv) => PromiseLike>) | ((args: Argv) => Argv) | ((args: Argv) => void); +>BuilderCallback : Symbol(BuilderCallback, Decl(deeplyNestedIntersectionWithUnion.ts, 0, 0)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 21)) +>R : Symbol(R, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 23)) +>args : Symbol(args, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 31)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 21)) +>PromiseLike : Symbol(PromiseLike, Decl(lib.es5.d.ts, --, --)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>R : Symbol(R, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 23)) +>args : Symbol(args, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 75)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 21)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>R : Symbol(R, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 23)) +>args : Symbol(args, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 106)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 21)) + +interface Argv { +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) + + alias(shortName: K1, longName: K2 | readonly K2[]): Argv; +>alias : Symbol(Argv.alias, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 19), Decl(deeplyNestedIntersectionWithUnion.ts, 7, 128)) +>K1 : Symbol(K1, Decl(deeplyNestedIntersectionWithUnion.ts, 7, 10)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>K2 : Symbol(K2, Decl(deeplyNestedIntersectionWithUnion.ts, 7, 29)) +>shortName : Symbol(shortName, Decl(deeplyNestedIntersectionWithUnion.ts, 7, 49)) +>K1 : Symbol(K1, Decl(deeplyNestedIntersectionWithUnion.ts, 7, 10)) +>longName : Symbol(longName, Decl(deeplyNestedIntersectionWithUnion.ts, 7, 63)) +>K2 : Symbol(K2, Decl(deeplyNestedIntersectionWithUnion.ts, 7, 29)) +>K2 : Symbol(K2, Decl(deeplyNestedIntersectionWithUnion.ts, 7, 29)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 7, 107)) +>K2 : Symbol(K2, Decl(deeplyNestedIntersectionWithUnion.ts, 7, 29)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>K1 : Symbol(K1, Decl(deeplyNestedIntersectionWithUnion.ts, 7, 10)) + + alias(shortName: K2, longName: K1 | readonly K1[]): Argv; +>alias : Symbol(Argv.alias, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 19), Decl(deeplyNestedIntersectionWithUnion.ts, 7, 128)) +>K1 : Symbol(K1, Decl(deeplyNestedIntersectionWithUnion.ts, 8, 10)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>K2 : Symbol(K2, Decl(deeplyNestedIntersectionWithUnion.ts, 8, 29)) +>shortName : Symbol(shortName, Decl(deeplyNestedIntersectionWithUnion.ts, 8, 49)) +>K2 : Symbol(K2, Decl(deeplyNestedIntersectionWithUnion.ts, 8, 29)) +>longName : Symbol(longName, Decl(deeplyNestedIntersectionWithUnion.ts, 8, 63)) +>K1 : Symbol(K1, Decl(deeplyNestedIntersectionWithUnion.ts, 8, 10)) +>K1 : Symbol(K1, Decl(deeplyNestedIntersectionWithUnion.ts, 8, 10)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 8, 107)) +>K2 : Symbol(K2, Decl(deeplyNestedIntersectionWithUnion.ts, 8, 29)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>K1 : Symbol(K1, Decl(deeplyNestedIntersectionWithUnion.ts, 8, 10)) + + argv: { [key in keyof Arguments as key | CamelCaseKey]: Arguments[key] } | Promise<{ [key in keyof Arguments as key | CamelCaseKey]: Arguments[key] }>; +>argv : Symbol(Argv.argv, Decl(deeplyNestedIntersectionWithUnion.ts, 8, 128)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 9, 13)) +>Arguments : Symbol(Arguments, Decl(deeplyNestedIntersectionWithUnion.ts, 26, 1)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 9, 13)) +>CamelCaseKey : Symbol(CamelCaseKey, Decl(deeplyNestedIntersectionWithUnion.ts, 30, 33)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 9, 13)) +>Arguments : Symbol(Arguments, Decl(deeplyNestedIntersectionWithUnion.ts, 26, 1)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 9, 13)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 9, 101)) +>Arguments : Symbol(Arguments, Decl(deeplyNestedIntersectionWithUnion.ts, 26, 1)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 9, 101)) +>CamelCaseKey : Symbol(CamelCaseKey, Decl(deeplyNestedIntersectionWithUnion.ts, 30, 33)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 9, 101)) +>Arguments : Symbol(Arguments, Decl(deeplyNestedIntersectionWithUnion.ts, 26, 1)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 9, 101)) + + array(key: K | readonly K[]): Argv; +>array : Symbol(Argv.array, Decl(deeplyNestedIntersectionWithUnion.ts, 9, 177)) +>K : Symbol(K, Decl(deeplyNestedIntersectionWithUnion.ts, 10, 10)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 10, 28)) +>K : Symbol(K, Decl(deeplyNestedIntersectionWithUnion.ts, 10, 10)) +>K : Symbol(K, Decl(deeplyNestedIntersectionWithUnion.ts, 10, 10)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 10, 64)) +>K : Symbol(K, Decl(deeplyNestedIntersectionWithUnion.ts, 10, 10)) + + command(builder?: BuilderCallback, handler?: (args: ArgumentsCamelCase) => void, middlewares?: Array>): Argv; +>command : Symbol(Argv.command, Decl(deeplyNestedIntersectionWithUnion.ts, 10, 87), Decl(deeplyNestedIntersectionWithUnion.ts, 11, 154), Decl(deeplyNestedIntersectionWithUnion.ts, 12, 161), Decl(deeplyNestedIntersectionWithUnion.ts, 13, 59)) +>U : Symbol(U, Decl(deeplyNestedIntersectionWithUnion.ts, 11, 12)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>builder : Symbol(builder, Decl(deeplyNestedIntersectionWithUnion.ts, 11, 19)) +>BuilderCallback : Symbol(BuilderCallback, Decl(deeplyNestedIntersectionWithUnion.ts, 0, 0)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>U : Symbol(U, Decl(deeplyNestedIntersectionWithUnion.ts, 11, 12)) +>handler : Symbol(handler, Decl(deeplyNestedIntersectionWithUnion.ts, 11, 51)) +>args : Symbol(args, Decl(deeplyNestedIntersectionWithUnion.ts, 11, 63)) +>ArgumentsCamelCase : Symbol(ArgumentsCamelCase, Decl(deeplyNestedIntersectionWithUnion.ts, 27, 40)) +>U : Symbol(U, Decl(deeplyNestedIntersectionWithUnion.ts, 11, 12)) +>middlewares : Symbol(middlewares, Decl(deeplyNestedIntersectionWithUnion.ts, 11, 100)) +>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 4 more) +>MiddlewareFunction : Symbol(MiddlewareFunction, Decl(deeplyNestedIntersectionWithUnion.ts, 40, 55)) +>U : Symbol(U, Decl(deeplyNestedIntersectionWithUnion.ts, 11, 12)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) + + command(showInHelp: false, builder?: O, handler?: (args: ArgumentsCamelCase>) => void): Argv; +>command : Symbol(Argv.command, Decl(deeplyNestedIntersectionWithUnion.ts, 10, 87), Decl(deeplyNestedIntersectionWithUnion.ts, 11, 154), Decl(deeplyNestedIntersectionWithUnion.ts, 12, 161), Decl(deeplyNestedIntersectionWithUnion.ts, 13, 59)) +>O : Symbol(O, Decl(deeplyNestedIntersectionWithUnion.ts, 12, 12)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 12, 25)) +>Options : Symbol(Options, Decl(deeplyNestedIntersectionWithUnion.ts, 28, 85)) +>showInHelp : Symbol(showInHelp, Decl(deeplyNestedIntersectionWithUnion.ts, 12, 50)) +>builder : Symbol(builder, Decl(deeplyNestedIntersectionWithUnion.ts, 12, 68)) +>O : Symbol(O, Decl(deeplyNestedIntersectionWithUnion.ts, 12, 12)) +>handler : Symbol(handler, Decl(deeplyNestedIntersectionWithUnion.ts, 12, 81)) +>args : Symbol(args, Decl(deeplyNestedIntersectionWithUnion.ts, 12, 93)) +>ArgumentsCamelCase : Symbol(ArgumentsCamelCase, Decl(deeplyNestedIntersectionWithUnion.ts, 27, 40)) +>InferredOptionTypes : Symbol(InferredOptionTypes, Decl(deeplyNestedIntersectionWithUnion.ts, 34, 14)) +>O : Symbol(O, Decl(deeplyNestedIntersectionWithUnion.ts, 12, 12)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) + + command(module: CommandModule): Argv; +>command : Symbol(Argv.command, Decl(deeplyNestedIntersectionWithUnion.ts, 10, 87), Decl(deeplyNestedIntersectionWithUnion.ts, 11, 154), Decl(deeplyNestedIntersectionWithUnion.ts, 12, 161), Decl(deeplyNestedIntersectionWithUnion.ts, 13, 59)) +>U : Symbol(U, Decl(deeplyNestedIntersectionWithUnion.ts, 13, 12)) +>module : Symbol(module, Decl(deeplyNestedIntersectionWithUnion.ts, 13, 21)) +>CommandModule : Symbol(CommandModule, Decl(deeplyNestedIntersectionWithUnion.ts, 35, 114)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>U : Symbol(U, Decl(deeplyNestedIntersectionWithUnion.ts, 13, 12)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) + + command(module: CommandModule): Argv; +>command : Symbol(Argv.command, Decl(deeplyNestedIntersectionWithUnion.ts, 10, 87), Decl(deeplyNestedIntersectionWithUnion.ts, 11, 154), Decl(deeplyNestedIntersectionWithUnion.ts, 12, 161), Decl(deeplyNestedIntersectionWithUnion.ts, 13, 59)) +>U : Symbol(U, Decl(deeplyNestedIntersectionWithUnion.ts, 14, 12)) +>module : Symbol(module, Decl(deeplyNestedIntersectionWithUnion.ts, 14, 21)) +>CommandModule : Symbol(CommandModule, Decl(deeplyNestedIntersectionWithUnion.ts, 35, 114)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>U : Symbol(U, Decl(deeplyNestedIntersectionWithUnion.ts, 14, 12)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) + + demandOption(key: K | readonly K[]): Argv; +>demandOption : Symbol(Argv.demandOption, Decl(deeplyNestedIntersectionWithUnion.ts, 14, 59)) +>K : Symbol(K, Decl(deeplyNestedIntersectionWithUnion.ts, 15, 17)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 15, 35)) +>K : Symbol(K, Decl(deeplyNestedIntersectionWithUnion.ts, 15, 17)) +>K : Symbol(K, Decl(deeplyNestedIntersectionWithUnion.ts, 15, 17)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 15, 71)) +>K : Symbol(K, Decl(deeplyNestedIntersectionWithUnion.ts, 15, 17)) + + parse(parseCallback?: ParseCallback): { [key in keyof Arguments as key | CamelCaseKey]: Arguments[key] } | Promise<{ [key in keyof Arguments as key | CamelCaseKey]: Arguments[key] }>; +>parse : Symbol(Argv.parse, Decl(deeplyNestedIntersectionWithUnion.ts, 15, 93)) +>parseCallback : Symbol(parseCallback, Decl(deeplyNestedIntersectionWithUnion.ts, 16, 10)) +>ParseCallback : Symbol(ParseCallback, Decl(deeplyNestedIntersectionWithUnion.ts, 38, 1)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 16, 48)) +>Arguments : Symbol(Arguments, Decl(deeplyNestedIntersectionWithUnion.ts, 26, 1)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 16, 48)) +>CamelCaseKey : Symbol(CamelCaseKey, Decl(deeplyNestedIntersectionWithUnion.ts, 30, 33)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 16, 48)) +>Arguments : Symbol(Arguments, Decl(deeplyNestedIntersectionWithUnion.ts, 26, 1)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 16, 48)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 16, 136)) +>Arguments : Symbol(Arguments, Decl(deeplyNestedIntersectionWithUnion.ts, 26, 1)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 16, 136)) +>CamelCaseKey : Symbol(CamelCaseKey, Decl(deeplyNestedIntersectionWithUnion.ts, 30, 33)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 16, 136)) +>Arguments : Symbol(Arguments, Decl(deeplyNestedIntersectionWithUnion.ts, 26, 1)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 16, 136)) + + parseSync(parseCallback?: ParseCallback): { [key in keyof Arguments as key | CamelCaseKey]: Arguments[key] }; +>parseSync : Symbol(Argv.parseSync, Decl(deeplyNestedIntersectionWithUnion.ts, 16, 212)) +>parseCallback : Symbol(parseCallback, Decl(deeplyNestedIntersectionWithUnion.ts, 17, 14)) +>ParseCallback : Symbol(ParseCallback, Decl(deeplyNestedIntersectionWithUnion.ts, 38, 1)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 17, 52)) +>Arguments : Symbol(Arguments, Decl(deeplyNestedIntersectionWithUnion.ts, 26, 1)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 17, 52)) +>CamelCaseKey : Symbol(CamelCaseKey, Decl(deeplyNestedIntersectionWithUnion.ts, 30, 33)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 17, 52)) +>Arguments : Symbol(Arguments, Decl(deeplyNestedIntersectionWithUnion.ts, 26, 1)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 17, 52)) + + parseAsync(parseCallback?: ParseCallback): Promise<{ [key in keyof Arguments as key | CamelCaseKey]: Arguments[key] }>; +>parseAsync : Symbol(Argv.parseAsync, Decl(deeplyNestedIntersectionWithUnion.ts, 17, 127)) +>parseCallback : Symbol(parseCallback, Decl(deeplyNestedIntersectionWithUnion.ts, 18, 15)) +>ParseCallback : Symbol(ParseCallback, Decl(deeplyNestedIntersectionWithUnion.ts, 38, 1)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 18, 61)) +>Arguments : Symbol(Arguments, Decl(deeplyNestedIntersectionWithUnion.ts, 26, 1)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 18, 61)) +>CamelCaseKey : Symbol(CamelCaseKey, Decl(deeplyNestedIntersectionWithUnion.ts, 30, 33)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 18, 61)) +>Arguments : Symbol(Arguments, Decl(deeplyNestedIntersectionWithUnion.ts, 26, 1)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 18, 61)) + + positional(opt: O): Argv & { [key in K]: InferredOptionType }>; +>positional : Symbol(Argv.positional, Decl(deeplyNestedIntersectionWithUnion.ts, 18, 137), Decl(deeplyNestedIntersectionWithUnion.ts, 19, 129)) +>K : Symbol(K, Decl(deeplyNestedIntersectionWithUnion.ts, 19, 15)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>O : Symbol(O, Decl(deeplyNestedIntersectionWithUnion.ts, 19, 33)) +>PositionalOptions : Symbol(PositionalOptions, Decl(deeplyNestedIntersectionWithUnion.ts, 29, 20)) +>opt : Symbol(opt, Decl(deeplyNestedIntersectionWithUnion.ts, 19, 63)) +>O : Symbol(O, Decl(deeplyNestedIntersectionWithUnion.ts, 19, 33)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>Omit : Symbol(Omit, Decl(lib.es5.d.ts, --, --)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>K : Symbol(K, Decl(deeplyNestedIntersectionWithUnion.ts, 19, 15)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 19, 93)) +>K : Symbol(K, Decl(deeplyNestedIntersectionWithUnion.ts, 19, 15)) +>InferredOptionType : Symbol(InferredOptionType, Decl(deeplyNestedIntersectionWithUnion.ts, 31, 81)) +>O : Symbol(O, Decl(deeplyNestedIntersectionWithUnion.ts, 19, 33)) + + positional(key: K, opt: O): Argv }>; +>positional : Symbol(Argv.positional, Decl(deeplyNestedIntersectionWithUnion.ts, 18, 137), Decl(deeplyNestedIntersectionWithUnion.ts, 19, 129)) +>K : Symbol(K, Decl(deeplyNestedIntersectionWithUnion.ts, 20, 15)) +>O : Symbol(O, Decl(deeplyNestedIntersectionWithUnion.ts, 20, 32)) +>PositionalOptions : Symbol(PositionalOptions, Decl(deeplyNestedIntersectionWithUnion.ts, 29, 20)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 20, 62)) +>K : Symbol(K, Decl(deeplyNestedIntersectionWithUnion.ts, 20, 15)) +>opt : Symbol(opt, Decl(deeplyNestedIntersectionWithUnion.ts, 20, 69)) +>O : Symbol(O, Decl(deeplyNestedIntersectionWithUnion.ts, 20, 32)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 20, 91)) +>K : Symbol(K, Decl(deeplyNestedIntersectionWithUnion.ts, 20, 15)) +>InferredOptionType : Symbol(InferredOptionType, Decl(deeplyNestedIntersectionWithUnion.ts, 31, 81)) +>O : Symbol(O, Decl(deeplyNestedIntersectionWithUnion.ts, 20, 32)) + + usage(builder?: (args: Argv) => Argv, handler?: (args: ArgumentsCamelCase) => void): Argv; +>usage : Symbol(Argv.usage, Decl(deeplyNestedIntersectionWithUnion.ts, 20, 127), Decl(deeplyNestedIntersectionWithUnion.ts, 21, 109), Decl(deeplyNestedIntersectionWithUnion.ts, 22, 109), Decl(deeplyNestedIntersectionWithUnion.ts, 23, 140)) +>U : Symbol(U, Decl(deeplyNestedIntersectionWithUnion.ts, 21, 10)) +>builder : Symbol(builder, Decl(deeplyNestedIntersectionWithUnion.ts, 21, 13)) +>args : Symbol(args, Decl(deeplyNestedIntersectionWithUnion.ts, 21, 24)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>U : Symbol(U, Decl(deeplyNestedIntersectionWithUnion.ts, 21, 10)) +>handler : Symbol(handler, Decl(deeplyNestedIntersectionWithUnion.ts, 21, 50)) +>args : Symbol(args, Decl(deeplyNestedIntersectionWithUnion.ts, 21, 62)) +>ArgumentsCamelCase : Symbol(ArgumentsCamelCase, Decl(deeplyNestedIntersectionWithUnion.ts, 27, 40)) +>U : Symbol(U, Decl(deeplyNestedIntersectionWithUnion.ts, 21, 10)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) + + usage(builder?: (args: Argv) => Argv, handler?: (args: ArgumentsCamelCase) => void): Argv; +>usage : Symbol(Argv.usage, Decl(deeplyNestedIntersectionWithUnion.ts, 20, 127), Decl(deeplyNestedIntersectionWithUnion.ts, 21, 109), Decl(deeplyNestedIntersectionWithUnion.ts, 22, 109), Decl(deeplyNestedIntersectionWithUnion.ts, 23, 140)) +>U : Symbol(U, Decl(deeplyNestedIntersectionWithUnion.ts, 22, 10)) +>builder : Symbol(builder, Decl(deeplyNestedIntersectionWithUnion.ts, 22, 13)) +>args : Symbol(args, Decl(deeplyNestedIntersectionWithUnion.ts, 22, 24)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>U : Symbol(U, Decl(deeplyNestedIntersectionWithUnion.ts, 22, 10)) +>handler : Symbol(handler, Decl(deeplyNestedIntersectionWithUnion.ts, 22, 50)) +>args : Symbol(args, Decl(deeplyNestedIntersectionWithUnion.ts, 22, 62)) +>ArgumentsCamelCase : Symbol(ArgumentsCamelCase, Decl(deeplyNestedIntersectionWithUnion.ts, 27, 40)) +>U : Symbol(U, Decl(deeplyNestedIntersectionWithUnion.ts, 22, 10)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) + + usage(builder?: O, handler?: (args: ArgumentsCamelCase>) => void): Argv; +>usage : Symbol(Argv.usage, Decl(deeplyNestedIntersectionWithUnion.ts, 20, 127), Decl(deeplyNestedIntersectionWithUnion.ts, 21, 109), Decl(deeplyNestedIntersectionWithUnion.ts, 22, 109), Decl(deeplyNestedIntersectionWithUnion.ts, 23, 140)) +>O : Symbol(O, Decl(deeplyNestedIntersectionWithUnion.ts, 23, 10)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 23, 23)) +>Options : Symbol(Options, Decl(deeplyNestedIntersectionWithUnion.ts, 28, 85)) +>builder : Symbol(builder, Decl(deeplyNestedIntersectionWithUnion.ts, 23, 48)) +>O : Symbol(O, Decl(deeplyNestedIntersectionWithUnion.ts, 23, 10)) +>handler : Symbol(handler, Decl(deeplyNestedIntersectionWithUnion.ts, 23, 60)) +>args : Symbol(args, Decl(deeplyNestedIntersectionWithUnion.ts, 23, 72)) +>ArgumentsCamelCase : Symbol(ArgumentsCamelCase, Decl(deeplyNestedIntersectionWithUnion.ts, 27, 40)) +>InferredOptionTypes : Symbol(InferredOptionTypes, Decl(deeplyNestedIntersectionWithUnion.ts, 34, 14)) +>O : Symbol(O, Decl(deeplyNestedIntersectionWithUnion.ts, 23, 10)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) + + usage(builder?: O, handler?: (args: ArgumentsCamelCase>) => void): Argv; +>usage : Symbol(Argv.usage, Decl(deeplyNestedIntersectionWithUnion.ts, 20, 127), Decl(deeplyNestedIntersectionWithUnion.ts, 21, 109), Decl(deeplyNestedIntersectionWithUnion.ts, 22, 109), Decl(deeplyNestedIntersectionWithUnion.ts, 23, 140)) +>O : Symbol(O, Decl(deeplyNestedIntersectionWithUnion.ts, 24, 10)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 24, 23)) +>Options : Symbol(Options, Decl(deeplyNestedIntersectionWithUnion.ts, 28, 85)) +>builder : Symbol(builder, Decl(deeplyNestedIntersectionWithUnion.ts, 24, 48)) +>O : Symbol(O, Decl(deeplyNestedIntersectionWithUnion.ts, 24, 10)) +>handler : Symbol(handler, Decl(deeplyNestedIntersectionWithUnion.ts, 24, 60)) +>args : Symbol(args, Decl(deeplyNestedIntersectionWithUnion.ts, 24, 72)) +>ArgumentsCamelCase : Symbol(ArgumentsCamelCase, Decl(deeplyNestedIntersectionWithUnion.ts, 27, 40)) +>InferredOptionTypes : Symbol(InferredOptionTypes, Decl(deeplyNestedIntersectionWithUnion.ts, 34, 14)) +>O : Symbol(O, Decl(deeplyNestedIntersectionWithUnion.ts, 24, 10)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) + + version(version: string): Argv; +>version : Symbol(Argv.version, Decl(deeplyNestedIntersectionWithUnion.ts, 24, 140)) +>version : Symbol(version, Decl(deeplyNestedIntersectionWithUnion.ts, 25, 12)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 6, 15)) +} +type Arguments = T & { _: string[] }; +>Arguments : Symbol(Arguments, Decl(deeplyNestedIntersectionWithUnion.ts, 26, 1)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 27, 15)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 27, 15)) +>_ : Symbol(_, Decl(deeplyNestedIntersectionWithUnion.ts, 27, 25)) + +type ArgumentsCamelCase = { [key in keyof T as key | CamelCaseKey]: T[key] }; +>ArgumentsCamelCase : Symbol(ArgumentsCamelCase, Decl(deeplyNestedIntersectionWithUnion.ts, 27, 40)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 28, 24)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 28, 32)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 28, 24)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 28, 32)) +>CamelCaseKey : Symbol(CamelCaseKey, Decl(deeplyNestedIntersectionWithUnion.ts, 30, 33)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 28, 32)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 28, 24)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 28, 32)) + +interface Options {} +>Options : Symbol(Options, Decl(deeplyNestedIntersectionWithUnion.ts, 28, 85)) + +type PositionalOptions = Options; +>PositionalOptions : Symbol(PositionalOptions, Decl(deeplyNestedIntersectionWithUnion.ts, 29, 20)) +>Options : Symbol(Options, Decl(deeplyNestedIntersectionWithUnion.ts, 28, 85)) + +type CamelCaseKey = K extends string ? Exclude : K; +>CamelCaseKey : Symbol(CamelCaseKey, Decl(deeplyNestedIntersectionWithUnion.ts, 30, 33)) +>K : Symbol(K, Decl(deeplyNestedIntersectionWithUnion.ts, 31, 18)) +>PropertyKey : Symbol(PropertyKey, Decl(lib.es5.d.ts, --, --)) +>K : Symbol(K, Decl(deeplyNestedIntersectionWithUnion.ts, 31, 18)) +>Exclude : Symbol(Exclude, Decl(lib.es5.d.ts, --, --)) +>K : Symbol(K, Decl(deeplyNestedIntersectionWithUnion.ts, 31, 18)) +>K : Symbol(K, Decl(deeplyNestedIntersectionWithUnion.ts, 31, 18)) + +type InferredOptionType = +>InferredOptionType : Symbol(InferredOptionType, Decl(deeplyNestedIntersectionWithUnion.ts, 31, 81)) +>O : Symbol(O, Decl(deeplyNestedIntersectionWithUnion.ts, 32, 24)) + + O extends { coerce: (arg: any) => infer T } ? T +>O : Symbol(O, Decl(deeplyNestedIntersectionWithUnion.ts, 32, 24)) +>coerce : Symbol(coerce, Decl(deeplyNestedIntersectionWithUnion.ts, 33, 15)) +>arg : Symbol(arg, Decl(deeplyNestedIntersectionWithUnion.ts, 33, 25)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 33, 43)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 33, 43)) + + : unknown; +type InferredOptionTypes = { [key in keyof O]: InferredOptionType }; +>InferredOptionTypes : Symbol(InferredOptionTypes, Decl(deeplyNestedIntersectionWithUnion.ts, 34, 14)) +>O : Symbol(O, Decl(deeplyNestedIntersectionWithUnion.ts, 35, 25)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 35, 38)) +>Options : Symbol(Options, Decl(deeplyNestedIntersectionWithUnion.ts, 28, 85)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 35, 68)) +>O : Symbol(O, Decl(deeplyNestedIntersectionWithUnion.ts, 35, 25)) +>InferredOptionType : Symbol(InferredOptionType, Decl(deeplyNestedIntersectionWithUnion.ts, 31, 81)) +>O : Symbol(O, Decl(deeplyNestedIntersectionWithUnion.ts, 35, 25)) +>key : Symbol(key, Decl(deeplyNestedIntersectionWithUnion.ts, 35, 68)) + +interface CommandModule { +>CommandModule : Symbol(CommandModule, Decl(deeplyNestedIntersectionWithUnion.ts, 35, 114)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 36, 24)) +>U : Symbol(U, Decl(deeplyNestedIntersectionWithUnion.ts, 36, 26)) + + builder?: CommandBuilder; +>builder : Symbol(CommandModule.builder, Decl(deeplyNestedIntersectionWithUnion.ts, 36, 31)) +>CommandBuilder : Symbol(CommandBuilder, Decl(deeplyNestedIntersectionWithUnion.ts, 39, 32)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 36, 24)) +>U : Symbol(U, Decl(deeplyNestedIntersectionWithUnion.ts, 36, 26)) +} +type ParseCallback = () => T; +>ParseCallback : Symbol(ParseCallback, Decl(deeplyNestedIntersectionWithUnion.ts, 38, 1)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 39, 19)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 39, 19)) + +type CommandBuilder = (args: Argv) => Argv; +>CommandBuilder : Symbol(CommandBuilder, Decl(deeplyNestedIntersectionWithUnion.ts, 39, 32)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 40, 20)) +>U : Symbol(U, Decl(deeplyNestedIntersectionWithUnion.ts, 40, 22)) +>args : Symbol(args, Decl(deeplyNestedIntersectionWithUnion.ts, 40, 29)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 40, 20)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>U : Symbol(U, Decl(deeplyNestedIntersectionWithUnion.ts, 40, 22)) + +type MiddlewareFunction = (args: ArgumentsCamelCase) => void; +>MiddlewareFunction : Symbol(MiddlewareFunction, Decl(deeplyNestedIntersectionWithUnion.ts, 40, 55)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 41, 24)) +>args : Symbol(args, Decl(deeplyNestedIntersectionWithUnion.ts, 41, 30)) +>ArgumentsCamelCase : Symbol(ArgumentsCamelCase, Decl(deeplyNestedIntersectionWithUnion.ts, 27, 40)) +>T : Symbol(T, Decl(deeplyNestedIntersectionWithUnion.ts, 41, 24)) + +declare const argv: Argv<{ config: string[] | undefined; contextName: string; quiet: boolean }>; +>argv : Symbol(argv, Decl(deeplyNestedIntersectionWithUnion.ts, 42, 13)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>config : Symbol(config, Decl(deeplyNestedIntersectionWithUnion.ts, 42, 26)) +>contextName : Symbol(contextName, Decl(deeplyNestedIntersectionWithUnion.ts, 42, 56)) +>quiet : Symbol(quiet, Decl(deeplyNestedIntersectionWithUnion.ts, 42, 77)) + +type BaseArgs = Awaited; +>BaseArgs : Symbol(BaseArgs, Decl(deeplyNestedIntersectionWithUnion.ts, 42, 96)) +>Awaited : Symbol(Awaited, Decl(lib.es5.d.ts, --, --)) +>argv : Symbol(argv, Decl(deeplyNestedIntersectionWithUnion.ts, 42, 13)) + +declare function builder(args: Argv): Argv; +>builder : Symbol(builder, Decl(deeplyNestedIntersectionWithUnion.ts, 43, 45)) +>args : Symbol(args, Decl(deeplyNestedIntersectionWithUnion.ts, 44, 25)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>BaseArgs : Symbol(BaseArgs, Decl(deeplyNestedIntersectionWithUnion.ts, 42, 96)) +>Argv : Symbol(Argv, Decl(deeplyNestedIntersectionWithUnion.ts, 5, 130)) +>BaseArgs : Symbol(BaseArgs, Decl(deeplyNestedIntersectionWithUnion.ts, 42, 96)) +>class : Symbol(class, Decl(deeplyNestedIntersectionWithUnion.ts, 44, 65)) + +argv.command({ builder }); +>argv.command : Symbol(Argv.command, Decl(deeplyNestedIntersectionWithUnion.ts, 10, 87), Decl(deeplyNestedIntersectionWithUnion.ts, 11, 154), Decl(deeplyNestedIntersectionWithUnion.ts, 12, 161), Decl(deeplyNestedIntersectionWithUnion.ts, 13, 59)) +>argv : Symbol(argv, Decl(deeplyNestedIntersectionWithUnion.ts, 42, 13)) +>command : Symbol(Argv.command, Decl(deeplyNestedIntersectionWithUnion.ts, 10, 87), Decl(deeplyNestedIntersectionWithUnion.ts, 11, 154), Decl(deeplyNestedIntersectionWithUnion.ts, 12, 161), Decl(deeplyNestedIntersectionWithUnion.ts, 13, 59)) +>builder : Symbol(builder, Decl(deeplyNestedIntersectionWithUnion.ts, 45, 14)) + diff --git a/tsc/testdata/baselines/reference/compiler/deeplyNestedIntersectionWithUnion.types b/tsc/testdata/baselines/reference/compiler/deeplyNestedIntersectionWithUnion.types new file mode 100644 index 0000000000000..7893354ff6956 --- /dev/null +++ b/tsc/testdata/baselines/reference/compiler/deeplyNestedIntersectionWithUnion.types @@ -0,0 +1,177 @@ +//// [tests/cases/compiler/deeplyNestedIntersectionWithUnion.ts] //// + +=== deeplyNestedIntersectionWithUnion.ts === +// Reduced from yargs as used by mikro-orm. Comparing Argv structurally +// builds Argv again and again. With a union for T, each +// intersection distributes over the union or flattens a copy of it, and is +// still another level of nesting. + +type BuilderCallback = ((args: Argv) => PromiseLike>) | ((args: Argv) => Argv) | ((args: Argv) => void); +>BuilderCallback : BuilderCallback +>args : Argv +>args : Argv +>args : Argv + +interface Argv { + alias(shortName: K1, longName: K2 | readonly K2[]): Argv; +>alias : { (shortName: K1, longName: K2 | readonly K2[]): Argv; (shortName: K2_1, longName: K1_1 | readonly K1_1[]): Argv; } +>shortName : K1 +>longName : K2 | readonly K2[] + + alias(shortName: K2, longName: K1 | readonly K1[]): Argv; +>alias : { (shortName: K1_1, longName: K2_1 | readonly K2_1[]): Argv; (shortName: K2, longName: K1 | readonly K1[]): Argv; } +>shortName : K2 +>longName : K1 | readonly K1[] + + argv: { [key in keyof Arguments as key | CamelCaseKey]: Arguments[key] } | Promise<{ [key in keyof Arguments as key | CamelCaseKey]: Arguments[key] }>; +>argv : Promise<{ [key in keyof Arguments as key | CamelCaseKey]: Arguments[key]; }> | { [key in keyof Arguments as key | CamelCaseKey]: Arguments[key]; } + + array(key: K | readonly K[]): Argv; +>array : (key: K | readonly K[]) => Argv +>key : K | readonly K[] + + command(builder?: BuilderCallback, handler?: (args: ArgumentsCamelCase) => void, middlewares?: Array>): Argv; +>command : { (builder?: BuilderCallback, handler?: (args: ArgumentsCamelCase) => void, middlewares?: Array>): Argv; (showInHelp: false, builder?: O, handler?: (args: ArgumentsCamelCase>) => void): Argv; (module: CommandModule): Argv; (module: CommandModule): Argv; } +>builder : BuilderCallback | undefined +>handler : ((args: ArgumentsCamelCase) => void) | undefined +>args : ArgumentsCamelCase +>middlewares : MiddlewareFunction[] | undefined + + command(showInHelp: false, builder?: O, handler?: (args: ArgumentsCamelCase>) => void): Argv; +>command : { (builder?: BuilderCallback, handler?: (args: ArgumentsCamelCase) => void, middlewares?: Array>): Argv; (showInHelp: false, builder?: O, handler?: (args: ArgumentsCamelCase>) => void): Argv; (module: CommandModule): Argv; (module: CommandModule): Argv; } +>key : string +>showInHelp : false +>false : false +>builder : O | undefined +>handler : ((args: ArgumentsCamelCase>) => void) | undefined +>args : ArgumentsCamelCase> + + command(module: CommandModule): Argv; +>command : { (builder?: BuilderCallback, handler?: (args: ArgumentsCamelCase) => void, middlewares?: Array>): Argv; (showInHelp: false, builder?: O, handler?: (args: ArgumentsCamelCase>) => void): Argv; (module: CommandModule): Argv; (module: CommandModule): Argv; } +>module : CommandModule + + command(module: CommandModule): Argv; +>command : { (builder?: BuilderCallback, handler?: (args: ArgumentsCamelCase) => void, middlewares?: Array>): Argv; (showInHelp: false, builder?: O, handler?: (args: ArgumentsCamelCase>) => void): Argv; (module: CommandModule): Argv; (module: CommandModule): Argv; } +>module : CommandModule + + demandOption(key: K | readonly K[]): Argv; +>demandOption : (key: K | readonly K[]) => Argv +>key : K | readonly K[] + + parse(parseCallback?: ParseCallback): { [key in keyof Arguments as key | CamelCaseKey]: Arguments[key] } | Promise<{ [key in keyof Arguments as key | CamelCaseKey]: Arguments[key] }>; +>parse : (parseCallback?: ParseCallback) => { [key in keyof Arguments as key | CamelCaseKey]: Arguments[key]; } | Promise<{ [key in keyof Arguments as key | CamelCaseKey]: Arguments[key]; }> +>parseCallback : ParseCallback | undefined + + parseSync(parseCallback?: ParseCallback): { [key in keyof Arguments as key | CamelCaseKey]: Arguments[key] }; +>parseSync : (parseCallback?: ParseCallback) => { [key in keyof Arguments as key | CamelCaseKey]: Arguments[key]; } +>parseCallback : ParseCallback | undefined + + parseAsync(parseCallback?: ParseCallback): Promise<{ [key in keyof Arguments as key | CamelCaseKey]: Arguments[key] }>; +>parseAsync : (parseCallback?: ParseCallback) => Promise<{ [key in keyof Arguments as key | CamelCaseKey]: Arguments[key]; }> +>parseCallback : ParseCallback | undefined + + positional(opt: O): Argv & { [key in K]: InferredOptionType }>; +>positional : { (opt: O): Argv & { [key in K]: InferredOptionType; }>; (key: K_1, opt: O_1): Argv; }>; } +>opt : O + + positional(key: K, opt: O): Argv }>; +>positional : { (opt: O_1): Argv & { [key in K_1]: InferredOptionType; }>; (key: K, opt: O): Argv; }>; } +>key : K +>opt : O + + usage(builder?: (args: Argv) => Argv, handler?: (args: ArgumentsCamelCase) => void): Argv; +>usage : { (builder?: (args: Argv) => Argv, handler?: (args: ArgumentsCamelCase) => void): Argv; (builder?: (args: Argv) => Argv, handler?: (args: ArgumentsCamelCase) => void): Argv; (builder?: O, handler?: (args: ArgumentsCamelCase>) => void): Argv; (builder?: O, handler?: (args: ArgumentsCamelCase>) => void): Argv; } +>builder : ((args: Argv) => Argv) | undefined +>args : Argv +>handler : ((args: ArgumentsCamelCase) => void) | undefined +>args : ArgumentsCamelCase + + usage(builder?: (args: Argv) => Argv, handler?: (args: ArgumentsCamelCase) => void): Argv; +>usage : { (builder?: (args: Argv) => Argv, handler?: (args: ArgumentsCamelCase) => void): Argv; (builder?: (args: Argv) => Argv, handler?: (args: ArgumentsCamelCase) => void): Argv; (builder?: O, handler?: (args: ArgumentsCamelCase>) => void): Argv; (builder?: O, handler?: (args: ArgumentsCamelCase>) => void): Argv; } +>builder : ((args: Argv) => Argv) | undefined +>args : Argv +>handler : ((args: ArgumentsCamelCase) => void) | undefined +>args : ArgumentsCamelCase + + usage(builder?: O, handler?: (args: ArgumentsCamelCase>) => void): Argv; +>usage : { (builder?: (args: Argv) => Argv, handler?: (args: ArgumentsCamelCase) => void): Argv; (builder?: (args: Argv) => Argv, handler?: (args: ArgumentsCamelCase) => void): Argv; (builder?: O, handler?: (args: ArgumentsCamelCase>) => void): Argv; (builder?: O_1, handler?: (args: ArgumentsCamelCase>) => void): Argv; } +>key : string +>builder : O | undefined +>handler : ((args: ArgumentsCamelCase>) => void) | undefined +>args : ArgumentsCamelCase> + + usage(builder?: O, handler?: (args: ArgumentsCamelCase>) => void): Argv; +>usage : { (builder?: (args: Argv) => Argv, handler?: (args: ArgumentsCamelCase) => void): Argv; (builder?: (args: Argv) => Argv, handler?: (args: ArgumentsCamelCase) => void): Argv; (builder?: O_1, handler?: (args: ArgumentsCamelCase>) => void): Argv; (builder?: O, handler?: (args: ArgumentsCamelCase>) => void): Argv; } +>key : string +>builder : O | undefined +>handler : ((args: ArgumentsCamelCase>) => void) | undefined +>args : ArgumentsCamelCase> + + version(version: string): Argv; +>version : (version: string) => Argv +>version : string +} +type Arguments = T & { _: string[] }; +>Arguments : Arguments +>_ : string[] + +type ArgumentsCamelCase = { [key in keyof T as key | CamelCaseKey]: T[key] }; +>ArgumentsCamelCase : ArgumentsCamelCase + +interface Options {} +type PositionalOptions = Options; +>PositionalOptions : Options + +type CamelCaseKey = K extends string ? Exclude : K; +>CamelCaseKey : CamelCaseKey + +type InferredOptionType = +>InferredOptionType : InferredOptionType + + O extends { coerce: (arg: any) => infer T } ? T +>coerce : (arg: any) => infer T +>arg : any + + : unknown; +type InferredOptionTypes = { [key in keyof O]: InferredOptionType }; +>InferredOptionTypes : InferredOptionTypes +>key : string + +interface CommandModule { + builder?: CommandBuilder; +>builder : CommandBuilder | undefined +} +type ParseCallback = () => T; +>ParseCallback : ParseCallback + +type CommandBuilder = (args: Argv) => Argv; +>CommandBuilder : CommandBuilder +>args : Argv + +type MiddlewareFunction = (args: ArgumentsCamelCase) => void; +>MiddlewareFunction : MiddlewareFunction +>args : ArgumentsCamelCase + +declare const argv: Argv<{ config: string[] | undefined; contextName: string; quiet: boolean }>; +>argv : Argv<{ config: string[] | undefined; contextName: string; quiet: boolean; }> +>config : string[] | undefined +>contextName : string +>quiet : boolean + +type BaseArgs = Awaited; +>BaseArgs : BaseArgs +>argv : Argv<{ config: string[] | undefined; contextName: string; quiet: boolean; }> + +declare function builder(args: Argv): Argv; +>builder : (args: Argv) => Argv +>args : Argv +>class : string + +argv.command({ builder }); +>argv.command({ builder }) : Argv<{ config: string[] | undefined; contextName: string; quiet: boolean; }> +>argv.command : { (builder?: BuilderCallback<{ config: string[] | undefined; contextName: string; quiet: boolean; }, U> | undefined, handler?: ((args: ArgumentsCamelCase) => void) | undefined, middlewares?: MiddlewareFunction[] | undefined): Argv<{ config: string[] | undefined; contextName: string; quiet: boolean; }>; (showInHelp: false, builder?: O | undefined, handler?: ((args: ArgumentsCamelCase>) => void) | undefined): Argv<{ config: string[] | undefined; contextName: string; quiet: boolean; }>; (module: CommandModule<{ config: string[] | undefined; contextName: string; quiet: boolean; }, U>): Argv<{ config: string[] | undefined; contextName: string; quiet: boolean; }>; (module: CommandModule<{ config: string[] | undefined; contextName: string; quiet: boolean; }, U>): Argv<{ config: string[] | undefined; contextName: string; quiet: boolean; }>; } +>argv : Argv<{ config: string[] | undefined; contextName: string; quiet: boolean; }> +>command : { (builder?: BuilderCallback<{ config: string[] | undefined; contextName: string; quiet: boolean; }, U> | undefined, handler?: ((args: ArgumentsCamelCase) => void) | undefined, middlewares?: MiddlewareFunction[] | undefined): Argv<{ config: string[] | undefined; contextName: string; quiet: boolean; }>; (showInHelp: false, builder?: O | undefined, handler?: ((args: ArgumentsCamelCase>) => void) | undefined): Argv<{ config: string[] | undefined; contextName: string; quiet: boolean; }>; (module: CommandModule<{ config: string[] | undefined; contextName: string; quiet: boolean; }, U>): Argv<{ config: string[] | undefined; contextName: string; quiet: boolean; }>; (module: CommandModule<{ config: string[] | undefined; contextName: string; quiet: boolean; }, U>): Argv<{ config: string[] | undefined; contextName: string; quiet: boolean; }>; } +>{ builder } : { builder: (args: Argv) => Argv; } +>builder : (args: Argv) => Argv + diff --git a/tsc/testdata/baselines/reference/compiler/typeReferenceRecursionIdentityCheckOrder(checkorder=default).errors.txt b/tsc/testdata/baselines/reference/compiler/typeReferenceRecursionIdentityCheckOrder(checkorder=default).errors.txt index 51fd83b016a0e..6e024512e0b5b 100644 --- a/tsc/testdata/baselines/reference/compiler/typeReferenceRecursionIdentityCheckOrder(checkorder=default).errors.txt +++ b/tsc/testdata/baselines/reference/compiler/typeReferenceRecursionIdentityCheckOrder(checkorder=default).errors.txt @@ -12,7 +12,7 @@ typeReferenceRecursionIdentityCheckOrder.ts(12,7): error TS2322: Type 'never[]' Type '{ (predicate: (value: never, index: number, array: never[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): boolean; }' is not assignable to type '(predicate: (value: 0) => value is S) => this is A'. Type predicate 'this is any[]' is not assignable to 'this is A'. Type 'any[]' is not assignable to type 'A'. - The types returned by 'flatMap(...)' are incompatible between these types. + The types returned by 'slice(...).flatMap(...)' are incompatible between these types. Type '(U | A)[]' is not assignable to type 'U[]'. Type 'U | A' is not assignable to type 'U'. 'U' could be instantiated with an arbitrary type which could be unrelated to 'U | A'. @@ -47,7 +47,7 @@ typeReferenceRecursionIdentityCheckOrder.ts(12,7): error TS2322: Type 'never[]' !!! error TS2322: Type '{ (predicate: (value: never, index: number, array: never[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: never, index: number, array: never[]) => unknown, thisArg?: any): boolean; }' is not assignable to type '(predicate: (value: 0) => value is S) => this is A'. !!! error TS2322: Type predicate 'this is any[]' is not assignable to 'this is A'. !!! error TS2322: Type 'any[]' is not assignable to type 'A'. -!!! error TS2322: The types returned by 'flatMap(...)' are incompatible between these types. +!!! error TS2322: The types returned by 'slice(...).flatMap(...)' are incompatible between these types. !!! error TS2322: Type '(U | A)[]' is not assignable to type 'U[]'. !!! error TS2322: Type 'U | A' is not assignable to type 'U'. !!! error TS2322: 'U' could be instantiated with an arbitrary type which could be unrelated to 'U | A'. diff --git a/tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-creates-types-in-a-stable-order.js b/tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-creates-types-in-a-stable-order.js index 47bbd94acc597..b060ba531cdcd 100644 --- a/tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-creates-types-in-a-stable-order.js +++ b/tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-creates-types-in-a-stable-order.js @@ -531,28 +531,28 @@ export declare const widget: import("./gadget").Gadget; {"id":150,"recursionId":140,"flags":["TypeParameter"]}, {"id":151,"recursionId":141,"isTuple":true,"instantiatedType":151,"typeArguments":[139,140,141,142,143,144,145,146,147,148,149,150],"flags":["Object"]}, {"id":152,"recursionId":142,"flags":["TypeParameter"]}, -{"id":153,"recursionId":143,"instantiatedType":151,"typeArguments":[123,124,125,126,127,128,129,130,131,132,133,134],"flags":["Object"]}, +{"id":153,"recursionId":141,"instantiatedType":151,"typeArguments":[123,124,125,126,127,128,129,130,131,132,133,134],"flags":["Object"]}, {"id":154,"recursionId":141,"instantiatedType":151,"typeArguments":[95,97,99,101,103,105,107,109,111,113,115,117],"flags":["Object"]}, -{"id":155,"recursionId":144,"instantiatedType":151,"typeArguments":[95,97,99,101,103,105,107,109,111,113,115,117],"flags":["Object"]}, -{"id":156,"recursionId":145,"unionTypes":[139,140,141,142,143,144,145,146,147,148,149,150],"flags":["Union"],"display":"? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ?"}, +{"id":155,"recursionId":143,"instantiatedType":151,"typeArguments":[95,97,99,101,103,105,107,109,111,113,115,117],"flags":["Object"]}, +{"id":156,"recursionId":144,"unionTypes":[139,140,141,142,143,144,145,146,147,148,149,150],"flags":["Union"],"display":"? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ?"}, {"id":157,"symbolName":"Array","recursionId":64,"instantiatedType":65,"typeArguments":[156],"firstDeclaration":{"path":"/home/src/tslibs/ts/lib/lib.es2026.full.d.ts","start":{"line":11,"character":1},"end":{"line":11,"character":55}},"flags":["Object"]}, -{"id":158,"recursionId":146,"unionTypes":[95,97,99,101,103,105,107,109,111,113,115,117],"flags":["Union"],"display":"1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12"}, +{"id":158,"recursionId":145,"unionTypes":[95,97,99,101,103,105,107,109,111,113,115,117],"flags":["Union"],"display":"1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12"}, {"id":159,"symbolName":"Array","recursionId":64,"instantiatedType":65,"typeArguments":[158],"firstDeclaration":{"path":"/home/src/tslibs/ts/lib/lib.es2026.full.d.ts","start":{"line":11,"character":1},"end":{"line":11,"character":55}},"flags":["Object"]}, {"id":160,"symbolName":"Array","recursionId":64,"instantiatedType":65,"typeArguments":[158,154],"firstDeclaration":{"path":"/home/src/tslibs/ts/lib/lib.es2026.full.d.ts","start":{"line":11,"character":1},"end":{"line":11,"character":55}},"flags":["Object"]}, {"id":161,"symbolName":"Array","recursionId":64,"instantiatedType":65,"typeArguments":[158,155],"firstDeclaration":{"path":"/home/src/tslibs/ts/lib/lib.es2026.full.d.ts","start":{"line":11,"character":1},"end":{"line":11,"character":55}},"flags":["Object"]}, -{"id":162,"symbolName":"makeWidget","recursionId":147,"firstDeclaration":{"path":"/home/src/workspaces/project/widget.d.ts","start":{"line":2,"character":1},"end":{"line":2,"character":46}},"flags":["Object"],"display":"() => Gadget"}, -{"id":163,"symbolName":"Gadget","recursionId":148,"firstDeclaration":{"path":"/home/src/workspaces/project/gadget.d.ts","start":{"line":1,"character":1},"end":{"line":3,"character":2}},"flags":["Object"]}, -{"id":164,"symbolName":"__type","recursionId":149,"firstDeclaration":{"path":"/home/src/workspaces/project/locales/ar.d.ts","start":{"line":1,"character":25},"end":{"line":1,"character":47}},"flags":["Object"],"display":"() => { locale: \"ar\"; }"}, -{"id":165,"symbolName":"__type","recursionId":150,"firstDeclaration":{"path":"/home/src/workspaces/project/locales/de.d.ts","start":{"line":1,"character":25},"end":{"line":1,"character":47}},"flags":["Object"],"display":"() => { locale: \"de\"; }"}, -{"id":166,"symbolName":"__type","recursionId":151,"firstDeclaration":{"path":"/home/src/workspaces/project/locales/en.d.ts","start":{"line":1,"character":25},"end":{"line":1,"character":47}},"flags":["Object"],"display":"() => { locale: \"en\"; }"}, -{"id":167,"symbolName":"__type","recursionId":152,"firstDeclaration":{"path":"/home/src/workspaces/project/locales/es.d.ts","start":{"line":1,"character":25},"end":{"line":1,"character":47}},"flags":["Object"],"display":"() => { locale: \"es\"; }"}, -{"id":168,"symbolName":"__type","recursionId":153,"firstDeclaration":{"path":"/home/src/workspaces/project/locales/fr.d.ts","start":{"line":1,"character":25},"end":{"line":1,"character":47}},"flags":["Object"],"display":"() => { locale: \"fr\"; }"}, -{"id":169,"symbolName":"__type","recursionId":154,"firstDeclaration":{"path":"/home/src/workspaces/project/locales/he.d.ts","start":{"line":1,"character":25},"end":{"line":1,"character":47}},"flags":["Object"],"display":"() => { locale: \"he\"; }"}, -{"id":170,"symbolName":"__type","recursionId":155,"firstDeclaration":{"path":"/home/src/workspaces/project/locales/it.d.ts","start":{"line":1,"character":25},"end":{"line":1,"character":47}},"flags":["Object"],"display":"() => { locale: \"it\"; }"}, -{"id":171,"symbolName":"__type","recursionId":156,"firstDeclaration":{"path":"/home/src/workspaces/project/locales/ja.d.ts","start":{"line":1,"character":25},"end":{"line":1,"character":47}},"flags":["Object"],"display":"() => { locale: \"ja\"; }"}, -{"id":172,"symbolName":"__type","recursionId":157,"firstDeclaration":{"path":"/home/src/workspaces/project/locales/ko.d.ts","start":{"line":1,"character":25},"end":{"line":1,"character":47}},"flags":["Object"],"display":"() => { locale: \"ko\"; }"}, -{"id":173,"symbolName":"__type","recursionId":158,"firstDeclaration":{"path":"/home/src/workspaces/project/locales/nl.d.ts","start":{"line":1,"character":25},"end":{"line":1,"character":47}},"flags":["Object"],"display":"() => { locale: \"nl\"; }"}, -{"id":174,"symbolName":"__type","recursionId":159,"firstDeclaration":{"path":"/home/src/workspaces/project/locales/pl.d.ts","start":{"line":1,"character":25},"end":{"line":1,"character":47}},"flags":["Object"],"display":"() => { locale: \"pl\"; }"}, -{"id":175,"symbolName":"__type","recursionId":160,"firstDeclaration":{"path":"/home/src/workspaces/project/locales/pt.d.ts","start":{"line":1,"character":25},"end":{"line":1,"character":47}},"flags":["Object"],"display":"() => { locale: \"pt\"; }"}] +{"id":162,"symbolName":"makeWidget","recursionId":146,"firstDeclaration":{"path":"/home/src/workspaces/project/widget.d.ts","start":{"line":2,"character":1},"end":{"line":2,"character":46}},"flags":["Object"],"display":"() => Gadget"}, +{"id":163,"symbolName":"Gadget","recursionId":147,"firstDeclaration":{"path":"/home/src/workspaces/project/gadget.d.ts","start":{"line":1,"character":1},"end":{"line":3,"character":2}},"flags":["Object"]}, +{"id":164,"symbolName":"__type","recursionId":148,"firstDeclaration":{"path":"/home/src/workspaces/project/locales/ar.d.ts","start":{"line":1,"character":25},"end":{"line":1,"character":47}},"flags":["Object"],"display":"() => { locale: \"ar\"; }"}, +{"id":165,"symbolName":"__type","recursionId":149,"firstDeclaration":{"path":"/home/src/workspaces/project/locales/de.d.ts","start":{"line":1,"character":25},"end":{"line":1,"character":47}},"flags":["Object"],"display":"() => { locale: \"de\"; }"}, +{"id":166,"symbolName":"__type","recursionId":150,"firstDeclaration":{"path":"/home/src/workspaces/project/locales/en.d.ts","start":{"line":1,"character":25},"end":{"line":1,"character":47}},"flags":["Object"],"display":"() => { locale: \"en\"; }"}, +{"id":167,"symbolName":"__type","recursionId":151,"firstDeclaration":{"path":"/home/src/workspaces/project/locales/es.d.ts","start":{"line":1,"character":25},"end":{"line":1,"character":47}},"flags":["Object"],"display":"() => { locale: \"es\"; }"}, +{"id":168,"symbolName":"__type","recursionId":152,"firstDeclaration":{"path":"/home/src/workspaces/project/locales/fr.d.ts","start":{"line":1,"character":25},"end":{"line":1,"character":47}},"flags":["Object"],"display":"() => { locale: \"fr\"; }"}, +{"id":169,"symbolName":"__type","recursionId":153,"firstDeclaration":{"path":"/home/src/workspaces/project/locales/he.d.ts","start":{"line":1,"character":25},"end":{"line":1,"character":47}},"flags":["Object"],"display":"() => { locale: \"he\"; }"}, +{"id":170,"symbolName":"__type","recursionId":154,"firstDeclaration":{"path":"/home/src/workspaces/project/locales/it.d.ts","start":{"line":1,"character":25},"end":{"line":1,"character":47}},"flags":["Object"],"display":"() => { locale: \"it\"; }"}, +{"id":171,"symbolName":"__type","recursionId":155,"firstDeclaration":{"path":"/home/src/workspaces/project/locales/ja.d.ts","start":{"line":1,"character":25},"end":{"line":1,"character":47}},"flags":["Object"],"display":"() => { locale: \"ja\"; }"}, +{"id":172,"symbolName":"__type","recursionId":156,"firstDeclaration":{"path":"/home/src/workspaces/project/locales/ko.d.ts","start":{"line":1,"character":25},"end":{"line":1,"character":47}},"flags":["Object"],"display":"() => { locale: \"ko\"; }"}, +{"id":173,"symbolName":"__type","recursionId":157,"firstDeclaration":{"path":"/home/src/workspaces/project/locales/nl.d.ts","start":{"line":1,"character":25},"end":{"line":1,"character":47}},"flags":["Object"],"display":"() => { locale: \"nl\"; }"}, +{"id":174,"symbolName":"__type","recursionId":158,"firstDeclaration":{"path":"/home/src/workspaces/project/locales/pl.d.ts","start":{"line":1,"character":25},"end":{"line":1,"character":47}},"flags":["Object"],"display":"() => { locale: \"pl\"; }"}, +{"id":175,"symbolName":"__type","recursionId":159,"firstDeclaration":{"path":"/home/src/workspaces/project/locales/pt.d.ts","start":{"line":1,"character":25},"end":{"line":1,"character":47}},"flags":["Object"],"display":"() => { locale: \"pt\"; }"}] diff --git a/tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-with-multiple-files-and-complex-types.js b/tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-with-multiple-files-and-complex-types.js index e9c62457f637f..60a2615f002a6 100644 --- a/tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-with-multiple-files-and-complex-types.js +++ b/tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-with-multiple-files-and-complex-types.js @@ -203,31 +203,31 @@ declare const console: { log(msg: any): void; }; {"id":93,"symbolName":"Container","recursionId":83,"instantiatedType":91,"typeArguments":[90,92],"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":1,"character":1},"end":{"line":4,"character":2}},"flags":["Object"]}, {"id":94,"symbolName":"U","recursionId":84,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":9},"end":{"line":3,"character":10}},"flags":["TypeParameter"]}, {"id":95,"symbolName":"__type","recursionId":85,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":16},"end":{"line":3,"character":27}},"flags":["Object"],"display":"(x: T) => U"}, -{"id":96,"symbolName":"Container","recursionId":86,"instantiatedType":91,"typeArguments":[94],"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":1,"character":1},"end":{"line":4,"character":2}},"flags":["Object"]}, -{"id":97,"symbolName":"T","recursionId":87,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":5,"character":22},"end":{"line":5,"character":23}},"flags":["TypeParameter"]}, -{"id":98,"symbolName":"Nullable","recursionId":88,"unionTypes":[10,13,97],"aliasTypeArguments":[97],"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":5,"character":1},"end":{"line":5,"character":48}},"flags":["Union"],"display":"Nullable"}, -{"id":99,"symbolName":"Container","recursionId":89,"instantiatedType":91,"typeArguments":[15],"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":1,"character":1},"end":{"line":4,"character":2}},"flags":["Object"]}, -{"id":100,"recursionId":90,"flags":["NumberLiteral"],"display":"42"}, -{"id":101,"recursionId":91,"flags":["NumberLiteral"],"display":"42"}, -{"id":102,"symbolName":"map","recursionId":92,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":5},"end":{"line":3,"character":43}},"flags":["Object"],"display":"(fn: (x: T) => U) => Container"}, -{"id":103,"symbolName":"map","recursionId":92,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":5},"end":{"line":3,"character":43}},"flags":["Object"],"display":"(fn: (x: number) => U) => Container"}, +{"id":96,"symbolName":"Container","recursionId":83,"instantiatedType":91,"typeArguments":[94],"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":1,"character":1},"end":{"line":4,"character":2}},"flags":["Object"]}, +{"id":97,"symbolName":"T","recursionId":86,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":5,"character":22},"end":{"line":5,"character":23}},"flags":["TypeParameter"]}, +{"id":98,"symbolName":"Nullable","recursionId":87,"unionTypes":[10,13,97],"aliasTypeArguments":[97],"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":5,"character":1},"end":{"line":5,"character":48}},"flags":["Union"],"display":"Nullable"}, +{"id":99,"symbolName":"Container","recursionId":83,"instantiatedType":91,"typeArguments":[15],"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":1,"character":1},"end":{"line":4,"character":2}},"flags":["Object"]}, +{"id":100,"recursionId":88,"flags":["NumberLiteral"],"display":"42"}, +{"id":101,"recursionId":89,"flags":["NumberLiteral"],"display":"42"}, +{"id":102,"symbolName":"map","recursionId":90,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":5},"end":{"line":3,"character":43}},"flags":["Object"],"display":"(fn: (x: T) => U) => Container"}, +{"id":103,"symbolName":"map","recursionId":90,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":5},"end":{"line":3,"character":43}},"flags":["Object"],"display":"(fn: (x: number) => U) => Container"}, {"id":104,"symbolName":"U","recursionId":84,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":9},"end":{"line":3,"character":10}},"flags":["TypeParameter"]}, {"id":105,"symbolName":"__type","recursionId":85,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":16},"end":{"line":3,"character":27}},"flags":["Object"],"display":"(x: number) => U"}, {"id":106,"symbolName":"Container","recursionId":83,"instantiatedType":91,"typeArguments":[104],"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":1,"character":1},"end":{"line":4,"character":2}},"flags":["Object"]}, -{"id":107,"symbolName":"map","recursionId":92,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":5},"end":{"line":3,"character":43}},"flags":["Object"],"display":"(fn: (x: U) => U) => Container"}, -{"id":108,"symbolName":"__object","recursionId":93,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":2,"character":57},"end":{"line":2,"character":86}},"flags":["Object"],"display":"{ value: U; map: (fn: (x: number) => U) => Container; }"}, -{"id":109,"symbolName":"__object","recursionId":94,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":2,"character":57},"end":{"line":2,"character":86}},"flags":["Object"],"display":"{ value: U; map: (fn: (x: number) => U) => Container; }"}, -{"id":110,"symbolName":"__function","recursionId":95,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":2,"character":48},"end":{"line":2,"character":87}},"flags":["Object"],"display":"(fn: (x: number) => U) => { value: U; map: (fn: (x: number) => U) => Container; }"}, -{"id":111,"symbolName":"__object","recursionId":96,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":2,"character":30},"end":{"line":2,"character":89}},"flags":["Object"],"display":"{ value: number; map: (fn: (x: number) => U) => { value: U; map: (fn: (x: number) => U) => Container; }; }"}, +{"id":107,"symbolName":"map","recursionId":90,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":5},"end":{"line":3,"character":43}},"flags":["Object"],"display":"(fn: (x: U) => U) => Container"}, +{"id":108,"symbolName":"__object","recursionId":91,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":2,"character":57},"end":{"line":2,"character":86}},"flags":["Object"],"display":"{ value: U; map: (fn: (x: number) => U) => Container; }"}, +{"id":109,"symbolName":"__object","recursionId":92,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":2,"character":57},"end":{"line":2,"character":86}},"flags":["Object"],"display":"{ value: U; map: (fn: (x: number) => U) => Container; }"}, +{"id":110,"symbolName":"__function","recursionId":93,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":2,"character":48},"end":{"line":2,"character":87}},"flags":["Object"],"display":"(fn: (x: number) => U) => { value: U; map: (fn: (x: number) => U) => Container; }"}, +{"id":111,"symbolName":"__object","recursionId":94,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":2,"character":30},"end":{"line":2,"character":89}},"flags":["Object"],"display":"{ value: number; map: (fn: (x: number) => U) => { value: U; map: (fn: (x: number) => U) => Container; }; }"}, {"id":112,"symbolName":"U","recursionId":84,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":9},"end":{"line":3,"character":10}},"flags":["TypeParameter"]}, {"id":113,"symbolName":"__type","recursionId":85,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":16},"end":{"line":3,"character":27}},"flags":["Object"],"display":"(x: number) => any"}, {"id":114,"symbolName":"__type","recursionId":85,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":16},"end":{"line":3,"character":27}},"flags":["Object"],"display":"(x: U) => U"}, {"id":115,"symbolName":"__type","recursionId":85,"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":3,"character":16},"end":{"line":3,"character":27}},"flags":["Object"],"display":"(x: U) => any"}, -{"id":116,"recursionId":97,"flags":["StringLiteral"],"display":"\"value\""}, -{"id":117,"recursionId":98,"flags":["StringLiteral"],"display":"\"map\""}, +{"id":116,"recursionId":95,"flags":["StringLiteral"],"display":"\"value\""}, +{"id":117,"recursionId":96,"flags":["StringLiteral"],"display":"\"map\""}, {"id":118,"symbolName":"Container","recursionId":83,"instantiatedType":91,"typeArguments":[112],"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":1,"character":1},"end":{"line":4,"character":2}},"flags":["Object"]}, -{"id":119,"symbolName":"Nullable","recursionId":99,"unionTypes":[10,13,14],"aliasTypeArguments":[14],"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":5,"character":1},"end":{"line":5,"character":48}},"flags":["Union"],"display":"Nullable"}, -{"id":120,"recursionId":100,"flags":["StringLiteral"],"display":"\"hello\""}, -{"id":121,"recursionId":101,"flags":["StringLiteral"],"display":"\"hello\""}] +{"id":119,"symbolName":"Nullable","recursionId":97,"unionTypes":[10,13,14],"aliasTypeArguments":[14],"firstDeclaration":{"path":"/home/src/workspaces/project/types.ts","start":{"line":5,"character":1},"end":{"line":5,"character":48}},"flags":["Union"],"display":"Nullable"}, +{"id":120,"recursionId":98,"flags":["StringLiteral"],"display":"\"hello\""}, +{"id":121,"recursionId":99,"flags":["StringLiteral"],"display":"\"hello\""}] diff --git a/tsc/testdata/tests/cases/compiler/deeplyNestedIntersectionWithUnion.ts b/tsc/testdata/tests/cases/compiler/deeplyNestedIntersectionWithUnion.ts new file mode 100644 index 0000000000000..12b69db25e76f --- /dev/null +++ b/tsc/testdata/tests/cases/compiler/deeplyNestedIntersectionWithUnion.ts @@ -0,0 +1,50 @@ +// @strict: true +// @target: es2023 +// @noEmit: true + +// Reduced from yargs as used by mikro-orm. Comparing Argv structurally +// builds Argv again and again. With a union for T, each +// intersection distributes over the union or flattens a copy of it, and is +// still another level of nesting. + +type BuilderCallback = ((args: Argv) => PromiseLike>) | ((args: Argv) => Argv) | ((args: Argv) => void); +interface Argv { + alias(shortName: K1, longName: K2 | readonly K2[]): Argv; + alias(shortName: K2, longName: K1 | readonly K1[]): Argv; + argv: { [key in keyof Arguments as key | CamelCaseKey]: Arguments[key] } | Promise<{ [key in keyof Arguments as key | CamelCaseKey]: Arguments[key] }>; + array(key: K | readonly K[]): Argv; + command(builder?: BuilderCallback, handler?: (args: ArgumentsCamelCase) => void, middlewares?: Array>): Argv; + command(showInHelp: false, builder?: O, handler?: (args: ArgumentsCamelCase>) => void): Argv; + command(module: CommandModule): Argv; + command(module: CommandModule): Argv; + demandOption(key: K | readonly K[]): Argv; + parse(parseCallback?: ParseCallback): { [key in keyof Arguments as key | CamelCaseKey]: Arguments[key] } | Promise<{ [key in keyof Arguments as key | CamelCaseKey]: Arguments[key] }>; + parseSync(parseCallback?: ParseCallback): { [key in keyof Arguments as key | CamelCaseKey]: Arguments[key] }; + parseAsync(parseCallback?: ParseCallback): Promise<{ [key in keyof Arguments as key | CamelCaseKey]: Arguments[key] }>; + positional(opt: O): Argv & { [key in K]: InferredOptionType }>; + positional(key: K, opt: O): Argv }>; + usage(builder?: (args: Argv) => Argv, handler?: (args: ArgumentsCamelCase) => void): Argv; + usage(builder?: (args: Argv) => Argv, handler?: (args: ArgumentsCamelCase) => void): Argv; + usage(builder?: O, handler?: (args: ArgumentsCamelCase>) => void): Argv; + usage(builder?: O, handler?: (args: ArgumentsCamelCase>) => void): Argv; + version(version: string): Argv; +} +type Arguments = T & { _: string[] }; +type ArgumentsCamelCase = { [key in keyof T as key | CamelCaseKey]: T[key] }; +interface Options {} +type PositionalOptions = Options; +type CamelCaseKey = K extends string ? Exclude : K; +type InferredOptionType = + O extends { coerce: (arg: any) => infer T } ? T + : unknown; +type InferredOptionTypes = { [key in keyof O]: InferredOptionType }; +interface CommandModule { + builder?: CommandBuilder; +} +type ParseCallback = () => T; +type CommandBuilder = (args: Argv) => Argv; +type MiddlewareFunction = (args: ArgumentsCamelCase) => void; +declare const argv: Argv<{ config: string[] | undefined; contextName: string; quiet: boolean }>; +type BaseArgs = Awaited; +declare function builder(args: Argv): Argv; +argv.command({ builder }); From 8028270853f10d7dbc02d7174bf461234b7fbb73 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 16 Nov 2026 23:17:54 -0800 Subject: [PATCH 29/29] Compare without reporting errors before reporting them Reporting the errors of a comparison builds their messages as it goes, printing the types involved, also for nested comparisons whose errors are discarded once the comparison falls back to one that succeeds, as comparing type arguments by variance does before comparing types structurally. With noErrorTruncation, printing large types that way can take minutes and gigabytes even when no error is reported at all, and the instantiations it makes can report excessive depth (TS2589) where checking alone does not. A comparison that reports errors first compares without reporting them, and compares again, reporting them, only if that fails. One elaboration changes, as the comparison that reports errors finds a different failing member first, and traces list types in a different order. --- tsc/internal/checker/relater.go | 14 +- .../complexRecursiveCollections.errors.txt | 16 +- ...ationErrorsNotPrintedWhenDiscarded.symbols | 679 ++++++++++++++++++ ...elationErrorsNotPrintedWhenDiscarded.types | 335 +++++++++ ...gnature-sibling-types-in-a-stable-order.js | 101 ++- ...gnature-sibling-types-in-a-stable-order.js | 99 ++- .../relationErrorsNotPrintedWhenDiscarded.ts | 179 +++++ 7 files changed, 1312 insertions(+), 111 deletions(-) create mode 100644 tsc/testdata/baselines/reference/compiler/relationErrorsNotPrintedWhenDiscarded.symbols create mode 100644 tsc/testdata/baselines/reference/compiler/relationErrorsNotPrintedWhenDiscarded.types create mode 100644 tsc/testdata/tests/cases/compiler/relationErrorsNotPrintedWhenDiscarded.ts diff --git a/tsc/internal/checker/relater.go b/tsc/internal/checker/relater.go index d0de1bd5c7453..e7ec3bd0409fa 100644 --- a/tsc/internal/checker/relater.go +++ b/tsc/internal/checker/relater.go @@ -373,10 +373,20 @@ func (c *Checker) checkTypeRelatedToEx( ) bool { r := c.getRelater() r.relation = relation - r.errorNode = errorNode r.relationCount = (16_000_000 - relation.size()) / 8 saveAssumesResolvingReturnType := c.reliabilityFlags & RelationComparisonResultAssumesResolvingReturnType - result := r.isRelatedToEx(source, target, RecursionFlagsBoth, errorNode != nil /*reportErrors*/, headMessage, IntersectionStateNone) + // Comparing first without reporting errors keeps the comparison from + // building error messages, which print the types involved, for nested + // comparisons that fail on the way to a comparison that succeeds. + result := r.isRelatedToEx(source, target, RecursionFlagsBoth, false /*reportErrors*/, headMessage, IntersectionStateNone) + if errorNode != nil && result == TernaryFalse && !r.overflow { + c.putRelater(r) + r = c.getRelater() + r.relation = relation + r.errorNode = errorNode + r.relationCount = (16_000_000 - relation.size()) / 8 + result = r.isRelatedToEx(source, target, RecursionFlagsBoth, true /*reportErrors*/, headMessage, IntersectionStateNone) + } c.reliabilityFlags = c.reliabilityFlags&^RelationComparisonResultAssumesResolvingReturnType | saveAssumesResolvingReturnType if r.overflow { // Record this relation as having failed such that we don't attempt the overflowing operation again. diff --git a/tsc/testdata/baselines/reference/compiler/complexRecursiveCollections.errors.txt b/tsc/testdata/baselines/reference/compiler/complexRecursiveCollections.errors.txt index 2a4fb0967ee33..f69b90291c099 100644 --- a/tsc/testdata/baselines/reference/compiler/complexRecursiveCollections.errors.txt +++ b/tsc/testdata/baselines/reference/compiler/complexRecursiveCollections.errors.txt @@ -6,9 +6,11 @@ immutable.ts(289,22): error TS2320: Interface 'Indexed' cannot simultaneously immutable.ts(305,22): error TS2320: Interface 'Set' cannot simultaneously extend types 'Seq' and 'Set'. Named property 'size' of types 'Seq' and 'Set' are not identical. immutable.ts(323,20): error TS2430: Interface 'Seq' incorrectly extends interface 'Collection'. - The types returned by 'map(...).size' are incompatible between these types. - Type 'number | undefined' is not assignable to type 'number'. - Type 'undefined' is not assignable to type 'number'. + The types returned by 'map(...).filter' are incompatible between these types. + Type '{ (predicate: (value: M, key: K, iter: Seq) => value is F, context?: any): Seq; (predicate: (value: M, key: K, iter: Seq) => any, context?: any): Seq; }' is not assignable to type '{ (predicate: (value: M, key: K, iter: Collection) => value is F, context?: any): Collection; (predicate: (value: M, key: K, iter: Collection) => any, context?: any): Collection; }'. + Types of parameters 'predicate' and 'predicate' are incompatible. + Type '(value: M, key: K, iter: Collection) => any' is not assignable to type '(value: M, key: K, iter: Seq) => value is any'. + Signature '(value: M, key: K, iter: Collection): any' must be a type predicate. immutable.ts(341,22): error TS2430: Interface 'Keyed' incorrectly extends interface 'Collection'. The types returned by 'toSeq()' are incompatible between these types. Type 'Keyed' is not assignable to type 'this'. @@ -382,9 +384,11 @@ immutable.ts(391,22): error TS2430: Interface 'Set' incorrectly extends inter export interface Seq extends Collection { ~~~ !!! error TS2430: Interface 'Seq' incorrectly extends interface 'Collection'. -!!! error TS2430: The types returned by 'map(...).size' are incompatible between these types. -!!! error TS2430: Type 'number | undefined' is not assignable to type 'number'. -!!! error TS2430: Type 'undefined' is not assignable to type 'number'. +!!! error TS2430: The types returned by 'map(...).filter' are incompatible between these types. +!!! error TS2430: Type '{ (predicate: (value: M, key: K, iter: Seq) => value is F, context?: any): Seq; (predicate: (value: M, key: K, iter: Seq) => any, context?: any): Seq; }' is not assignable to type '{ (predicate: (value: M, key: K, iter: Collection) => value is F, context?: any): Collection; (predicate: (value: M, key: K, iter: Collection) => any, context?: any): Collection; }'. +!!! error TS2430: Types of parameters 'predicate' and 'predicate' are incompatible. +!!! error TS2430: Type '(value: M, key: K, iter: Collection) => any' is not assignable to type '(value: M, key: K, iter: Seq) => value is any'. +!!! error TS2430: Signature '(value: M, key: K, iter: Collection): any' must be a type predicate. readonly size: number | undefined; // Force evaluation cacheResult(): this; diff --git a/tsc/testdata/baselines/reference/compiler/relationErrorsNotPrintedWhenDiscarded.symbols b/tsc/testdata/baselines/reference/compiler/relationErrorsNotPrintedWhenDiscarded.symbols new file mode 100644 index 0000000000000..0d21528a8626a --- /dev/null +++ b/tsc/testdata/baselines/reference/compiler/relationErrorsNotPrintedWhenDiscarded.symbols @@ -0,0 +1,679 @@ +//// [tests/cases/compiler/relationErrorsNotPrintedWhenDiscarded.ts] //// + +=== arraySlice.d.ts === +export type {ArraySlice}; +>ArraySlice : Symbol(ArraySlice, Decl(arraySlice.d.ts, 0, 13)) + +declare const tag: unique symbol; +>tag : Symbol(tag, Decl(arraySlice.d.ts, 1, 13)) + +type IsNever = [T] extends [never] ? true : false; +>IsNever : Symbol(IsNever, Decl(arraySlice.d.ts, 1, 33)) +>T : Symbol(T, Decl(arraySlice.d.ts, 2, 13)) +>T : Symbol(T, Decl(arraySlice.d.ts, 2, 13)) + +type IsEqual = +>IsEqual : Symbol(IsEqual, Decl(arraySlice.d.ts, 2, 53)) +>A : Symbol(A, Decl(arraySlice.d.ts, 3, 13)) +>B : Symbol(B, Decl(arraySlice.d.ts, 3, 15)) + + [A] extends [B] +>A : Symbol(A, Decl(arraySlice.d.ts, 3, 13)) +>B : Symbol(B, Decl(arraySlice.d.ts, 3, 15)) + + ? [B] extends [A] +>B : Symbol(B, Decl(arraySlice.d.ts, 3, 15)) +>A : Symbol(A, Decl(arraySlice.d.ts, 3, 13)) + + ? _IsEqual +>_IsEqual : Symbol(_IsEqual, Decl(arraySlice.d.ts, 8, 10)) +>A : Symbol(A, Decl(arraySlice.d.ts, 3, 13)) +>B : Symbol(B, Decl(arraySlice.d.ts, 3, 15)) + + : false + : false; +type _IsEqual = never; +>_IsEqual : Symbol(_IsEqual, Decl(arraySlice.d.ts, 8, 10)) +>A : Symbol(A, Decl(arraySlice.d.ts, 9, 14)) +>B : Symbol(B, Decl(arraySlice.d.ts, 9, 16)) + +type Primitive = +>Primitive : Symbol(Primitive, Decl(arraySlice.d.ts, 9, 28)) + + | null + | undefined + | string + | number + | boolean + | symbol + | bigint; +type UnknownArray = any; +>UnknownArray : Symbol(UnknownArray, Decl(arraySlice.d.ts, 17, 10)) + +type IfNotAnyOrNever = +>IfNotAnyOrNever : Symbol(IfNotAnyOrNever, Decl(arraySlice.d.ts, 18, 24)) +>T : Symbol(T, Decl(arraySlice.d.ts, 19, 21)) +>Cases : Symbol(Cases, Decl(arraySlice.d.ts, 19, 23)) +>ifNot : Symbol(ifNot, Decl(arraySlice.d.ts, 19, 39)) +>ifAny : Symbol(ifAny, Decl(arraySlice.d.ts, 19, 54)) +>ifNever : Symbol(ifNever, Decl(arraySlice.d.ts, 19, 71)) + + IsNever extends true +>IsNever : Symbol(IsNever, Decl(arraySlice.d.ts, 1, 33)) +>T : Symbol(T, Decl(arraySlice.d.ts, 19, 21)) + + ? 'ifNever' extends keyof Cases +>Cases : Symbol(Cases, Decl(arraySlice.d.ts, 19, 23)) + + ? Cases['ifNever'] +>Cases : Symbol(Cases, Decl(arraySlice.d.ts, 19, 23)) + + : never + : Cases['ifNot']; +>Cases : Symbol(Cases, Decl(arraySlice.d.ts, 19, 23)) + +type And = B; +>And : Symbol(And, Decl(arraySlice.d.ts, 24, 20)) +>A : Symbol(A, Decl(arraySlice.d.ts, 25, 9)) +>B : Symbol(B, Decl(arraySlice.d.ts, 25, 27)) +>B : Symbol(B, Decl(arraySlice.d.ts, 25, 27)) + +type Not = any; +>Not : Symbol(Not, Decl(arraySlice.d.ts, 25, 51)) +>A : Symbol(A, Decl(arraySlice.d.ts, 26, 9)) + +type MaxLength = never; +>MaxLength : Symbol(MaxLength, Decl(arraySlice.d.ts, 26, 34)) +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 27, 15)) +>UnknownArray : Symbol(UnknownArray, Decl(arraySlice.d.ts, 17, 10)) + +type HasNoStaticElements = unknown; +>HasNoStaticElements : Symbol(HasNoStaticElements, Decl(arraySlice.d.ts, 27, 52)) +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 28, 25)) +>UnknownArray : Symbol(UnknownArray, Decl(arraySlice.d.ts, 17, 10)) + +type CollapseLiterals = Union extends Primitive +>CollapseLiterals : Symbol(CollapseLiterals, Decl(arraySlice.d.ts, 28, 64)) +>Union : Symbol(Union, Decl(arraySlice.d.ts, 29, 22)) +>Union : Symbol(Union, Decl(arraySlice.d.ts, 29, 22)) +>Primitive : Symbol(Primitive, Decl(arraySlice.d.ts, 9, 28)) + + ? Union extends infer Collapsed & {} +>Union : Symbol(Union, Decl(arraySlice.d.ts, 29, 22)) +>Collapsed : Symbol(Collapsed, Decl(arraySlice.d.ts, 30, 22)) + + ? Collapsed +>Collapsed : Symbol(Collapsed, Decl(arraySlice.d.ts, 30, 22)) + + : Union +>Union : Symbol(Union, Decl(arraySlice.d.ts, 29, 22)) + + : Union; +>Union : Symbol(Union, Decl(arraySlice.d.ts, 29, 22)) + +type PositiveNumericStringGt = A; +>PositiveNumericStringGt : Symbol(PositiveNumericStringGt, Decl(arraySlice.d.ts, 33, 9)) +>A : Symbol(A, Decl(arraySlice.d.ts, 34, 29)) +>B : Symbol(B, Decl(arraySlice.d.ts, 34, 46)) +>A : Symbol(A, Decl(arraySlice.d.ts, 34, 29)) + +type Absolute = _Absolute : N>; +>Absolute : Symbol(Absolute, Decl(arraySlice.d.ts, 34, 69)) +>N : Symbol(N, Decl(arraySlice.d.ts, 35, 14)) +>_Absolute : Symbol(_Absolute, Decl(arraySlice.d.ts, 35, 92)) +>N : Symbol(N, Decl(arraySlice.d.ts, 35, 14)) +>UnwrapBrand : Symbol(UnwrapBrand, Decl(arraySlice.d.ts, 95, 11)) +>N : Symbol(N, Decl(arraySlice.d.ts, 35, 14)) +>N : Symbol(N, Decl(arraySlice.d.ts, 35, 14)) + +type _Absolute = N extends bigint +>_Absolute : Symbol(_Absolute, Decl(arraySlice.d.ts, 35, 92)) +>N : Symbol(N, Decl(arraySlice.d.ts, 36, 15)) +>N : Symbol(N, Decl(arraySlice.d.ts, 36, 15)) + + ? `${N}` extends `-${infer Magnitude extends bigint}` +>N : Symbol(N, Decl(arraySlice.d.ts, 36, 15)) +>Magnitude : Symbol(Magnitude, Decl(arraySlice.d.ts, 37, 27)) + + ? Magnitude +>Magnitude : Symbol(Magnitude, Decl(arraySlice.d.ts, 37, 27)) + + : N +>N : Symbol(N, Decl(arraySlice.d.ts, 36, 15)) + + : `${N}` extends `-${infer Magnitude extends number}` +>N : Symbol(N, Decl(arraySlice.d.ts, 36, 15)) +>Magnitude : Symbol(Magnitude, Decl(arraySlice.d.ts, 40, 27)) + + ? Magnitude +>Magnitude : Symbol(Magnitude, Decl(arraySlice.d.ts, 40, 27)) + + : `${N}` extends '-Infinity' +>N : Symbol(N, Decl(arraySlice.d.ts, 36, 15)) + + ? PositiveInfinity +>PositiveInfinity : Symbol(PositiveInfinity, Decl(arraySlice.d.ts, 100, 32)) + + : `${number}` extends `${N}` ? number : N; +>N : Symbol(N, Decl(arraySlice.d.ts, 36, 15)) +>N : Symbol(N, Decl(arraySlice.d.ts, 36, 15)) + +type GreaterThan = +>GreaterThan : Symbol(GreaterThan, Decl(arraySlice.d.ts, 44, 45)) +>A : Symbol(A, Decl(arraySlice.d.ts, 45, 17)) +>_Numeric : Symbol(_Numeric, Decl(arraySlice.d.ts, 99, 5)) +>B : Symbol(B, Decl(arraySlice.d.ts, 45, 36)) +>_Numeric : Symbol(_Numeric, Decl(arraySlice.d.ts, 99, 5)) + + _GreaterThan : A, B extends object ? UnwrapBrand : B>; +>_GreaterThan : Symbol(_GreaterThan, Decl(arraySlice.d.ts, 46, 92)) +>A : Symbol(A, Decl(arraySlice.d.ts, 45, 17)) +>UnwrapBrand : Symbol(UnwrapBrand, Decl(arraySlice.d.ts, 95, 11)) +>A : Symbol(A, Decl(arraySlice.d.ts, 45, 17)) +>A : Symbol(A, Decl(arraySlice.d.ts, 45, 17)) +>B : Symbol(B, Decl(arraySlice.d.ts, 45, 36)) +>UnwrapBrand : Symbol(UnwrapBrand, Decl(arraySlice.d.ts, 95, 11)) +>B : Symbol(B, Decl(arraySlice.d.ts, 45, 36)) +>B : Symbol(B, Decl(arraySlice.d.ts, 45, 36)) + +type _GreaterThan = +>_GreaterThan : Symbol(_GreaterThan, Decl(arraySlice.d.ts, 46, 92)) +>A : Symbol(A, Decl(arraySlice.d.ts, 47, 18)) +>_Numeric : Symbol(_Numeric, Decl(arraySlice.d.ts, 99, 5)) +>B : Symbol(B, Decl(arraySlice.d.ts, 47, 37)) +>_Numeric : Symbol(_Numeric, Decl(arraySlice.d.ts, 99, 5)) + + A extends _Numeric +>A : Symbol(A, Decl(arraySlice.d.ts, 47, 18)) +>_Numeric : Symbol(_Numeric, Decl(arraySlice.d.ts, 99, 5)) + + ? B extends _Numeric +>B : Symbol(B, Decl(arraySlice.d.ts, 47, 37)) +>_Numeric : Symbol(_Numeric, Decl(arraySlice.d.ts, 99, 5)) + + ? `${number}` extends `${A | B}` +>A : Symbol(A, Decl(arraySlice.d.ts, 47, 18)) +>B : Symbol(B, Decl(arraySlice.d.ts, 47, 37)) + + ? boolean + : bigint extends A | B +>A : Symbol(A, Decl(arraySlice.d.ts, 47, 18)) +>B : Symbol(B, Decl(arraySlice.d.ts, 47, 37)) + + ? boolean + : A extends PositiveInfinity +>A : Symbol(A, Decl(arraySlice.d.ts, 47, 18)) +>PositiveInfinity : Symbol(PositiveInfinity, Decl(arraySlice.d.ts, 100, 32)) + + ? B extends PositiveInfinity ? false : true +>B : Symbol(B, Decl(arraySlice.d.ts, 47, 37)) +>PositiveInfinity : Symbol(PositiveInfinity, Decl(arraySlice.d.ts, 100, 32)) + + : B extends NegativeInfinity +>B : Symbol(B, Decl(arraySlice.d.ts, 47, 37)) +>NegativeInfinity : Symbol(NegativeInfinity, Decl(arraySlice.d.ts, 101, 32)) + + ? A extends NegativeInfinity ? false : true +>A : Symbol(A, Decl(arraySlice.d.ts, 47, 18)) +>NegativeInfinity : Symbol(NegativeInfinity, Decl(arraySlice.d.ts, 101, 32)) + + : A extends NegativeInfinity +>A : Symbol(A, Decl(arraySlice.d.ts, 47, 18)) +>NegativeInfinity : Symbol(NegativeInfinity, Decl(arraySlice.d.ts, 101, 32)) + + ? false + : B extends PositiveInfinity +>B : Symbol(B, Decl(arraySlice.d.ts, 47, 37)) +>PositiveInfinity : Symbol(PositiveInfinity, Decl(arraySlice.d.ts, 100, 32)) + + ? false + : [IsNegative, IsNegative] extends infer Signs extends [boolean, boolean] +>IsNegative : Symbol(IsNegative, Decl(arraySlice.d.ts, 102, 30)) +>A : Symbol(A, Decl(arraySlice.d.ts, 47, 18)) +>IsNegative : Symbol(IsNegative, Decl(arraySlice.d.ts, 102, 30)) +>B : Symbol(B, Decl(arraySlice.d.ts, 47, 37)) +>Signs : Symbol(Signs, Decl(arraySlice.d.ts, 62, 56)) + + ? [true, false] extends Signs +>Signs : Symbol(Signs, Decl(arraySlice.d.ts, 62, 56)) + + ? false + : [false, true] extends Signs +>Signs : Symbol(Signs, Decl(arraySlice.d.ts, 62, 56)) + + ? true + : [false, false] extends Signs +>Signs : Symbol(Signs, Decl(arraySlice.d.ts, 62, 56)) + + ? PositiveNumericStringGt<`${A}`, `${B}`> +>PositiveNumericStringGt : Symbol(PositiveNumericStringGt, Decl(arraySlice.d.ts, 33, 9)) +>A : Symbol(A, Decl(arraySlice.d.ts, 47, 18)) +>B : Symbol(B, Decl(arraySlice.d.ts, 47, 37)) + + : PositiveNumericStringGt<`${Absolute}`, `${Absolute}`> +>PositiveNumericStringGt : Symbol(PositiveNumericStringGt, Decl(arraySlice.d.ts, 33, 9)) +>Absolute : Symbol(Absolute, Decl(arraySlice.d.ts, 34, 69)) +>B : Symbol(B, Decl(arraySlice.d.ts, 47, 37)) +>Absolute : Symbol(Absolute, Decl(arraySlice.d.ts, 34, 69)) +>A : Symbol(A, Decl(arraySlice.d.ts, 47, 18)) + + : never + : never + : never; +type IsReadonlyArray = never; +>IsReadonlyArray : Symbol(IsReadonlyArray, Decl(arraySlice.d.ts, 72, 10)) +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 73, 21)) +>UnknownArray : Symbol(UnknownArray, Decl(arraySlice.d.ts, 17, 10)) + +type UnionMember = +>UnionMember : Symbol(UnionMember, Decl(arraySlice.d.ts, 73, 58)) +>T : Symbol(T, Decl(arraySlice.d.ts, 74, 17)) + + IsNever extends true +>IsNever : Symbol(IsNever, Decl(arraySlice.d.ts, 1, 33)) +>T : Symbol(T, Decl(arraySlice.d.ts, 74, 17)) + + ? never + : (T extends any ? () => T : never) extends () => (infer R) +>T : Symbol(T, Decl(arraySlice.d.ts, 74, 17)) +>T : Symbol(T, Decl(arraySlice.d.ts, 74, 17)) +>R : Symbol(R, Decl(arraySlice.d.ts, 77, 58)) + + ? R +>R : Symbol(R, Decl(arraySlice.d.ts, 77, 58)) + + : never; +type TagContainer = { +>TagContainer : Symbol(TagContainer, Decl(arraySlice.d.ts, 79, 11)) +>Token : Symbol(Token, Decl(arraySlice.d.ts, 80, 18)) + + readonly [tag]: Token; +>[tag] : Symbol([tag], Decl(arraySlice.d.ts, 80, 28)) +>tag : Symbol(tag, Decl(arraySlice.d.ts, 1, 13)) +>Token : Symbol(Token, Decl(arraySlice.d.ts, 80, 18)) + +}; +type Tag = unknown; +>Tag : Symbol(Tag, Decl(arraySlice.d.ts, 82, 2)) +>TagName : Symbol(TagName, Decl(arraySlice.d.ts, 83, 9)) +>PropertyKey : Symbol(PropertyKey, Decl(lib.es5.d.ts, --, --)) +>TagMetadata : Symbol(TagMetadata, Decl(arraySlice.d.ts, 83, 37)) + +type RemoveAllTags = T extends TagContainer +>RemoveAllTags : Symbol(RemoveAllTags, Decl(arraySlice.d.ts, 83, 61)) +>T : Symbol(T, Decl(arraySlice.d.ts, 84, 19)) +>T : Symbol(T, Decl(arraySlice.d.ts, 84, 19)) +>TagContainer : Symbol(TagContainer, Decl(arraySlice.d.ts, 79, 11)) + + ? RemoveAllTags>> +>RemoveAllTags : Symbol(RemoveAllTags, Decl(arraySlice.d.ts, 83, 61)) +>UnionMember : Symbol(UnionMember, Decl(arraySlice.d.ts, 73, 58)) +>RemoveTag : Symbol(RemoveTag, Decl(arraySlice.d.ts, 86, 5)) +>T : Symbol(T, Decl(arraySlice.d.ts, 84, 19)) + + : T; +>T : Symbol(T, Decl(arraySlice.d.ts, 84, 19)) + +type RemoveTag> = +>RemoveTag : Symbol(RemoveTag, Decl(arraySlice.d.ts, 86, 5)) +>T : Symbol(T, Decl(arraySlice.d.ts, 87, 15)) +>TagContainer : Symbol(TagContainer, Decl(arraySlice.d.ts, 79, 11)) + + | { + [ThisTag in keyof T[typeof tag]]: T extends infer Underlying & Tag +>ThisTag : Symbol(ThisTag, Decl(arraySlice.d.ts, 89, 3)) +>T : Symbol(T, Decl(arraySlice.d.ts, 87, 15)) +>tag : Symbol(tag, Decl(arraySlice.d.ts, 1, 13)) +>T : Symbol(T, Decl(arraySlice.d.ts, 87, 15)) +>Underlying : Symbol(Underlying, Decl(arraySlice.d.ts, 89, 51)) +>Tag : Symbol(Tag, Decl(arraySlice.d.ts, 82, 2)) +>ThisTag : Symbol(ThisTag, Decl(arraySlice.d.ts, 89, 3)) +>T : Symbol(T, Decl(arraySlice.d.ts, 87, 15)) +>tag : Symbol(tag, Decl(arraySlice.d.ts, 1, 13)) +>ThisTag : Symbol(ThisTag, Decl(arraySlice.d.ts, 89, 3)) + + ? [Underlying] extends [T] ? never : Underlying +>Underlying : Symbol(Underlying, Decl(arraySlice.d.ts, 89, 51)) +>T : Symbol(T, Decl(arraySlice.d.ts, 87, 15)) +>Underlying : Symbol(Underlying, Decl(arraySlice.d.ts, 89, 51)) + + : never + }[keyof T[typeof tag]] +>T : Symbol(T, Decl(arraySlice.d.ts, 87, 15)) +>tag : Symbol(tag, Decl(arraySlice.d.ts, 1, 13)) + + | (T extends infer Underlying & TagContainer +>T : Symbol(T, Decl(arraySlice.d.ts, 87, 15)) +>Underlying : Symbol(Underlying, Decl(arraySlice.d.ts, 93, 19)) +>TagContainer : Symbol(TagContainer, Decl(arraySlice.d.ts, 79, 11)) +>T : Symbol(T, Decl(arraySlice.d.ts, 87, 15)) +>tag : Symbol(tag, Decl(arraySlice.d.ts, 1, 13)) + + ? [Underlying] extends [T] ? never : Underlying +>Underlying : Symbol(Underlying, Decl(arraySlice.d.ts, 93, 19)) +>T : Symbol(T, Decl(arraySlice.d.ts, 87, 15)) +>Underlying : Symbol(Underlying, Decl(arraySlice.d.ts, 93, 19)) + + : never); +type UnwrapBrand = IfNotAnyOrNever}>; +>UnwrapBrand : Symbol(UnwrapBrand, Decl(arraySlice.d.ts, 95, 11)) +>T : Symbol(T, Decl(arraySlice.d.ts, 96, 17)) +>IfNotAnyOrNever : Symbol(IfNotAnyOrNever, Decl(arraySlice.d.ts, 18, 24)) +>T : Symbol(T, Decl(arraySlice.d.ts, 96, 17)) +>ifNot : Symbol(ifNot, Decl(arraySlice.d.ts, 96, 42)) +>_UnwrapBrand : Symbol(_UnwrapBrand, Decl(arraySlice.d.ts, 96, 78)) +>T : Symbol(T, Decl(arraySlice.d.ts, 96, 17)) +>Primitive : Symbol(Primitive, Decl(arraySlice.d.ts, 9, 28)) + +type _UnwrapBrand = T extends Primitive +>_UnwrapBrand : Symbol(_UnwrapBrand, Decl(arraySlice.d.ts, 96, 78)) +>T : Symbol(T, Decl(arraySlice.d.ts, 97, 18)) +>Base : Symbol(Base, Decl(arraySlice.d.ts, 97, 20)) +>T : Symbol(T, Decl(arraySlice.d.ts, 97, 18)) +>Primitive : Symbol(Primitive, Decl(arraySlice.d.ts, 9, 28)) + + ? CollapseLiterals ? RemoveAllTags : T> +>CollapseLiterals : Symbol(CollapseLiterals, Decl(arraySlice.d.ts, 28, 64)) +>T : Symbol(T, Decl(arraySlice.d.ts, 97, 18)) +>TagContainer : Symbol(TagContainer, Decl(arraySlice.d.ts, 79, 11)) +>RemoveAllTags : Symbol(RemoveAllTags, Decl(arraySlice.d.ts, 83, 61)) +>T : Symbol(T, Decl(arraySlice.d.ts, 97, 18)) +>T : Symbol(T, Decl(arraySlice.d.ts, 97, 18)) + + : T; +>T : Symbol(T, Decl(arraySlice.d.ts, 97, 18)) + +type _Numeric = number | bigint; +>_Numeric : Symbol(_Numeric, Decl(arraySlice.d.ts, 99, 5)) + +type PositiveInfinity = unknown; +>PositiveInfinity : Symbol(PositiveInfinity, Decl(arraySlice.d.ts, 100, 32)) + +type NegativeInfinity = never; +>NegativeInfinity : Symbol(NegativeInfinity, Decl(arraySlice.d.ts, 101, 32)) + +type IsNegative = never; +>IsNegative : Symbol(IsNegative, Decl(arraySlice.d.ts, 102, 30)) +>T : Symbol(T, Decl(arraySlice.d.ts, 103, 16)) +>_Numeric : Symbol(_Numeric, Decl(arraySlice.d.ts, 99, 5)) + +type Sum = any; +>Sum : Symbol(Sum, Decl(arraySlice.d.ts, 103, 44)) +>A : Symbol(A, Decl(arraySlice.d.ts, 104, 9)) +>B : Symbol(B, Decl(arraySlice.d.ts, 104, 26)) + +type LessThanOrEqual = unknown; +>LessThanOrEqual : Symbol(LessThanOrEqual, Decl(arraySlice.d.ts, 104, 51)) +>A : Symbol(A, Decl(arraySlice.d.ts, 105, 21)) +>_Numeric : Symbol(_Numeric, Decl(arraySlice.d.ts, 99, 5)) +>B : Symbol(B, Decl(arraySlice.d.ts, 105, 40)) +>_Numeric : Symbol(_Numeric, Decl(arraySlice.d.ts, 99, 5)) + +type ArraySlice< +>ArraySlice : Symbol(ArraySlice, Decl(arraySlice.d.ts, 105, 71)) + + Array_ extends readonly unknown[], +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 106, 16)) + + Start extends number = never, +>Start : Symbol(Start, Decl(arraySlice.d.ts, 107, 35)) + + End extends number = never, +>End : Symbol(End, Decl(arraySlice.d.ts, 108, 30)) + +> = ArraySliceImplementation : Start, End>; +>ArraySliceImplementation : Symbol(ArraySliceImplementation, Decl(arraySlice.d.ts, 110, 93)) +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 106, 16)) +>Start : Symbol(Start, Decl(arraySlice.d.ts, 107, 35)) +>UnwrapBrand : Symbol(UnwrapBrand, Decl(arraySlice.d.ts, 95, 11)) +>Start : Symbol(Start, Decl(arraySlice.d.ts, 107, 35)) +>Start : Symbol(Start, Decl(arraySlice.d.ts, 107, 35)) +>End : Symbol(End, Decl(arraySlice.d.ts, 108, 30)) + +type ArraySliceImplementation< +>ArraySliceImplementation : Symbol(ArraySliceImplementation, Decl(arraySlice.d.ts, 110, 93)) + + Array_ extends readonly unknown[], +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 111, 30)) + + Start extends number, +>Start : Symbol(Start, Decl(arraySlice.d.ts, 112, 35)) + + End extends number, +>End : Symbol(End, Decl(arraySlice.d.ts, 113, 22)) + +> = Array_ extends unknown ? _ArraySlice : never; +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 111, 30)) +>_ArraySlice : Symbol(_ArraySlice, Decl(arraySlice.d.ts, 115, 69)) +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 111, 30)) +>Start : Symbol(Start, Decl(arraySlice.d.ts, 112, 35)) +>End : Symbol(End, Decl(arraySlice.d.ts, 113, 22)) + +type _ArraySlice< +>_ArraySlice : Symbol(_ArraySlice, Decl(arraySlice.d.ts, 115, 69)) + + Array_ extends readonly unknown[], +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 116, 17)) + + Start extends number = 0, +>Start : Symbol(Start, Decl(arraySlice.d.ts, 117, 35)) + + End extends number = Array_['length'], +>End : Symbol(End, Decl(arraySlice.d.ts, 118, 26)) +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 116, 17)) + +> = And, IsEqual> extends true +>And : Symbol(And, Decl(arraySlice.d.ts, 24, 20)) +>IsEqual : Symbol(IsEqual, Decl(arraySlice.d.ts, 2, 53)) +>Start : Symbol(Start, Decl(arraySlice.d.ts, 117, 35)) +>IsEqual : Symbol(IsEqual, Decl(arraySlice.d.ts, 2, 53)) +>End : Symbol(End, Decl(arraySlice.d.ts, 118, 26)) + + ? Array_ +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 116, 17)) + + : number extends Array_['length'] +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 116, 17)) + + ? VariableLengthArraySliceHelper extends true ? 0 : Start, End extends PositiveInfinity ? never : End> +>VariableLengthArraySliceHelper : Symbol(VariableLengthArraySliceHelper, Decl(arraySlice.d.ts, 128, 66)) +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 116, 17)) +>IsNever : Symbol(IsNever, Decl(arraySlice.d.ts, 1, 33)) +>Start : Symbol(Start, Decl(arraySlice.d.ts, 117, 35)) +>Start : Symbol(Start, Decl(arraySlice.d.ts, 117, 35)) +>End : Symbol(End, Decl(arraySlice.d.ts, 118, 26)) +>PositiveInfinity : Symbol(PositiveInfinity, Decl(arraySlice.d.ts, 100, 32)) +>End : Symbol(End, Decl(arraySlice.d.ts, 118, 26)) + + : `${number}` extends `${Start | End}` +>Start : Symbol(Start, Decl(arraySlice.d.ts, 117, 35)) +>End : Symbol(End, Decl(arraySlice.d.ts, 118, 26)) + + ? UnknownLengthArraySlice +>UnknownLengthArraySlice : Symbol(UnknownLengthArraySlice, Decl(arraySlice.d.ts, 145, 37)) +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 116, 17)) + + : ArraySliceResult extends true ? 0 : Start, IsEqual extends true ? MaxLength : End>>; +>ArraySliceResult : Symbol(ArraySliceResult, Decl(arraySlice.d.ts, 126, 164)) +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 116, 17)) +>ArraySliceHelper : Symbol(ArraySliceHelper, Decl(arraySlice.d.ts, 146, 70)) +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 116, 17)) +>IsEqual : Symbol(IsEqual, Decl(arraySlice.d.ts, 2, 53)) +>Start : Symbol(Start, Decl(arraySlice.d.ts, 117, 35)) +>Start : Symbol(Start, Decl(arraySlice.d.ts, 117, 35)) +>IsEqual : Symbol(IsEqual, Decl(arraySlice.d.ts, 2, 53)) +>End : Symbol(End, Decl(arraySlice.d.ts, 118, 26)) +>MaxLength : Symbol(MaxLength, Decl(arraySlice.d.ts, 26, 34)) +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 116, 17)) +>End : Symbol(End, Decl(arraySlice.d.ts, 118, 26)) + +type ArraySliceResult = +>ArraySliceResult : Symbol(ArraySliceResult, Decl(arraySlice.d.ts, 126, 164)) +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 127, 22)) +>Sliced : Symbol(Sliced, Decl(arraySlice.d.ts, 127, 56)) + + IsReadonlyArray extends true ? Readonly : Sliced; +>IsReadonlyArray : Symbol(IsReadonlyArray, Decl(arraySlice.d.ts, 72, 10)) +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 127, 22)) +>Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --)) +>Sliced : Symbol(Sliced, Decl(arraySlice.d.ts, 127, 56)) +>Sliced : Symbol(Sliced, Decl(arraySlice.d.ts, 127, 56)) + +type VariableLengthArraySliceHelper< +>VariableLengthArraySliceHelper : Symbol(VariableLengthArraySliceHelper, Decl(arraySlice.d.ts, 128, 66)) + + Array_ extends readonly unknown[], +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 129, 36)) + + Start extends number, +>Start : Symbol(Start, Decl(arraySlice.d.ts, 130, 35)) + + End extends number, +>End : Symbol(End, Decl(arraySlice.d.ts, 131, 22)) + +> = And< +>And : Symbol(And, Decl(arraySlice.d.ts, 24, 20)) + + And>, Not>>, +>And : Symbol(And, Decl(arraySlice.d.ts, 24, 20)) +>Not : Symbol(Not, Decl(arraySlice.d.ts, 25, 51)) +>IsNegative : Symbol(IsNegative, Decl(arraySlice.d.ts, 102, 30)) +>Start : Symbol(Start, Decl(arraySlice.d.ts, 130, 35)) +>Not : Symbol(Not, Decl(arraySlice.d.ts, 25, 51)) +>IsNegative : Symbol(IsNegative, Decl(arraySlice.d.ts, 102, 30)) +>End : Symbol(End, Decl(arraySlice.d.ts, 131, 22)) + + IsEqual, true> +>IsEqual : Symbol(IsEqual, Decl(arraySlice.d.ts, 2, 53)) +>LessThanOrEqual : Symbol(LessThanOrEqual, Decl(arraySlice.d.ts, 104, 51)) +>End : Symbol(End, Decl(arraySlice.d.ts, 131, 22)) +>Start : Symbol(Start, Decl(arraySlice.d.ts, 130, 35)) + +> extends true + ? [] + : And< +>And : Symbol(And, Decl(arraySlice.d.ts, 24, 20)) + + And>, Not>>, +>And : Symbol(And, Decl(arraySlice.d.ts, 24, 20)) +>Not : Symbol(Not, Decl(arraySlice.d.ts, 25, 51)) +>IsNegative : Symbol(IsNegative, Decl(arraySlice.d.ts, 102, 30)) +>Start : Symbol(Start, Decl(arraySlice.d.ts, 130, 35)) +>Not : Symbol(Not, Decl(arraySlice.d.ts, 25, 51)) +>IsNegative : Symbol(IsNegative, Decl(arraySlice.d.ts, 102, 30)) +>End : Symbol(End, Decl(arraySlice.d.ts, 131, 22)) + + IsEqual, true> +>IsEqual : Symbol(IsEqual, Decl(arraySlice.d.ts, 2, 53)) +>GreaterThan : Symbol(GreaterThan, Decl(arraySlice.d.ts, 44, 45)) +>End : Symbol(End, Decl(arraySlice.d.ts, 131, 22)) +>Start : Symbol(Start, Decl(arraySlice.d.ts, 130, 35)) + + > extends true + ? HasNoStaticElements extends true +>HasNoStaticElements : Symbol(HasNoStaticElements, Decl(arraySlice.d.ts, 27, 52)) +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 129, 36)) + + ? UnknownLengthArraySlice +>UnknownLengthArraySlice : Symbol(UnknownLengthArraySlice, Decl(arraySlice.d.ts, 145, 37)) +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 129, 36)) + + : ArraySliceResult> +>ArraySliceResult : Symbol(ArraySliceResult, Decl(arraySlice.d.ts, 126, 164)) +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 129, 36)) +>ArraySliceByPositiveIndex : Symbol(ArraySliceByPositiveIndex, Decl(arraySlice.d.ts, 152, 10)) +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 129, 36)) +>Start : Symbol(Start, Decl(arraySlice.d.ts, 130, 35)) +>End : Symbol(End, Decl(arraySlice.d.ts, 131, 22)) + + : UnknownLengthArraySlice; +>UnknownLengthArraySlice : Symbol(UnknownLengthArraySlice, Decl(arraySlice.d.ts, 145, 37)) +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 129, 36)) + +type UnknownLengthArraySlice = any; +>UnknownLengthArraySlice : Symbol(UnknownLengthArraySlice, Decl(arraySlice.d.ts, 145, 37)) +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 146, 29)) + +type ArraySliceHelper< +>ArraySliceHelper : Symbol(ArraySliceHelper, Decl(arraySlice.d.ts, 146, 70)) + + Array_ extends readonly unknown[], +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 147, 22)) + + Start extends number = 0, +>Start : Symbol(Start, Decl(arraySlice.d.ts, 148, 35)) + + End extends number = MaxLength, +>End : Symbol(End, Decl(arraySlice.d.ts, 149, 26)) +>MaxLength : Symbol(MaxLength, Decl(arraySlice.d.ts, 26, 34)) +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 147, 22)) + + ArrayLength extends number = MaxLength, +>ArrayLength : Symbol(ArrayLength, Decl(arraySlice.d.ts, 150, 40)) +>MaxLength : Symbol(MaxLength, Decl(arraySlice.d.ts, 26, 34)) +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 147, 22)) + +> = never; +type ArraySliceByPositiveIndex< +>ArraySliceByPositiveIndex : Symbol(ArraySliceByPositiveIndex, Decl(arraySlice.d.ts, 152, 10)) + + Array_ extends readonly unknown[], +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 153, 31)) + + Start extends number, +>Start : Symbol(Start, Decl(arraySlice.d.ts, 154, 35)) + + End extends number, +>End : Symbol(End, Decl(arraySlice.d.ts, 155, 22)) + + Result extends Array = [], +>Result : Symbol(Result, Decl(arraySlice.d.ts, 156, 20)) +>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 4 more) +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 153, 31)) + +> = Start extends End +>Start : Symbol(Start, Decl(arraySlice.d.ts, 154, 35)) +>End : Symbol(End, Decl(arraySlice.d.ts, 155, 22)) + + ? Result +>Result : Symbol(Result, Decl(arraySlice.d.ts, 156, 20)) + + : ArraySliceByPositiveIndex, End, [...Result, Array_[Start]]>; +>ArraySliceByPositiveIndex : Symbol(ArraySliceByPositiveIndex, Decl(arraySlice.d.ts, 152, 10)) +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 153, 31)) +>Sum : Symbol(Sum, Decl(arraySlice.d.ts, 103, 44)) +>Start : Symbol(Start, Decl(arraySlice.d.ts, 154, 35)) +>End : Symbol(End, Decl(arraySlice.d.ts, 155, 22)) +>Result : Symbol(Result, Decl(arraySlice.d.ts, 156, 20)) +>Array_ : Symbol(Array_, Decl(arraySlice.d.ts, 153, 31)) +>Start : Symbol(Start, Decl(arraySlice.d.ts, 154, 35)) + +=== main.ts === +// Reduced from type-fest's ArraySlice. Checking the declarations compares +// types whose elaborations print very large types when error messages are +// not truncated, many times over for comparisons that fail on the way to +// comparisons that succeed, which report no error. Printing them also +// instantiated enough types to report excessive depth in the declarations. +import type {ArraySlice} from './arraySlice.d.ts'; +>ArraySlice : Symbol(ArraySlice, Decl(main.ts, 5, 13)) + +declare function f(values: ArraySlice): void; +>f : Symbol(f, Decl(main.ts, 5, 50)) +>Value : Symbol(Value, Decl(main.ts, 6, 19)) +>values : Symbol(values, Decl(main.ts, 6, 26)) +>ArraySlice : Symbol(ArraySlice, Decl(main.ts, 5, 13)) +>Value : Symbol(Value, Decl(main.ts, 6, 19)) +>Value : Symbol(Value, Decl(main.ts, 6, 19)) +>Value : Symbol(Value, Decl(main.ts, 6, 19)) + +declare const x: ArraySlice; +>x : Symbol(x, Decl(main.ts, 7, 13)) +>ArraySlice : Symbol(ArraySlice, Decl(main.ts, 5, 13)) +>id : Symbol(id, Decl(main.ts, 7, 42)) +>id : Symbol(id, Decl(main.ts, 7, 70)) +>id : Symbol(id, Decl(main.ts, 7, 83)) + +f(x); +>f : Symbol(f, Decl(main.ts, 5, 50)) +>x : Symbol(x, Decl(main.ts, 7, 13)) + diff --git a/tsc/testdata/baselines/reference/compiler/relationErrorsNotPrintedWhenDiscarded.types b/tsc/testdata/baselines/reference/compiler/relationErrorsNotPrintedWhenDiscarded.types new file mode 100644 index 0000000000000..dd2f92991509c --- /dev/null +++ b/tsc/testdata/baselines/reference/compiler/relationErrorsNotPrintedWhenDiscarded.types @@ -0,0 +1,335 @@ +//// [tests/cases/compiler/relationErrorsNotPrintedWhenDiscarded.ts] //// + +=== arraySlice.d.ts === +export type {ArraySlice}; +>ArraySlice : ArraySlice + +declare const tag: unique symbol; +>tag : unique symbol + +type IsNever = [T] extends [never] ? true : false; +>IsNever : IsNever +>true : true +>false : false + +type IsEqual = +>IsEqual : IsEqual + + [A] extends [B] + ? [B] extends [A] + ? _IsEqual + : false +>false : false + + : false; +>false : false + +type _IsEqual = never; +>_IsEqual : never + +type Primitive = +>Primitive : Primitive + + | null + | undefined + | string + | number + | boolean + | symbol + | bigint; +type UnknownArray = any; +>UnknownArray : any + +type IfNotAnyOrNever = +>IfNotAnyOrNever : IfNotAnyOrNever +>ifNot : unknown +>ifAny : unknown +>ifNever : unknown + + IsNever extends true +>true : true + + ? 'ifNever' extends keyof Cases + ? Cases['ifNever'] + : never + : Cases['ifNot']; +type And = B; +>And : B + +type Not = any; +>Not : any + +type MaxLength = never; +>MaxLength : never + +type HasNoStaticElements = unknown; +>HasNoStaticElements : unknown + +type CollapseLiterals = Union extends Primitive +>CollapseLiterals : CollapseLiterals + + ? Union extends infer Collapsed & {} + ? Collapsed + : Union + : Union; +type PositiveNumericStringGt = A; +>PositiveNumericStringGt : A + +type Absolute = _Absolute : N>; +>Absolute : Absolute + +type _Absolute = N extends bigint +>_Absolute : _Absolute + + ? `${N}` extends `-${infer Magnitude extends bigint}` + ? Magnitude + : N + : `${N}` extends `-${infer Magnitude extends number}` + ? Magnitude + : `${N}` extends '-Infinity' + ? PositiveInfinity + : `${number}` extends `${N}` ? number : N; +type GreaterThan = +>GreaterThan : GreaterThan + + _GreaterThan : A, B extends object ? UnwrapBrand : B>; +type _GreaterThan = +>_GreaterThan : _GreaterThan + + A extends _Numeric + ? B extends _Numeric + ? `${number}` extends `${A | B}` + ? boolean + : bigint extends A | B + ? boolean + : A extends PositiveInfinity + ? B extends PositiveInfinity ? false : true +>false : false +>true : true + + : B extends NegativeInfinity + ? A extends NegativeInfinity ? false : true +>false : false +>true : true + + : A extends NegativeInfinity + ? false +>false : false + + : B extends PositiveInfinity + ? false +>false : false + + : [IsNegative, IsNegative] extends infer Signs extends [boolean, boolean] + ? [true, false] extends Signs +>true : true +>false : false + + ? false +>false : false + + : [false, true] extends Signs +>false : false +>true : true + + ? true +>true : true + + : [false, false] extends Signs +>false : false +>false : false + + ? PositiveNumericStringGt<`${A}`, `${B}`> + : PositiveNumericStringGt<`${Absolute}`, `${Absolute}`> + : never + : never + : never; +type IsReadonlyArray = never; +>IsReadonlyArray : never + +type UnionMember = +>UnionMember : UnionMember + + IsNever extends true +>true : true + + ? never + : (T extends any ? () => T : never) extends () => (infer R) + ? R + : never; +type TagContainer = { +>TagContainer : TagContainer + + readonly [tag]: Token; +>[tag] : Token +>tag : unique symbol + +}; +type Tag = unknown; +>Tag : unknown + +type RemoveAllTags = T extends TagContainer +>RemoveAllTags : RemoveAllTags + + ? RemoveAllTags>> + : T; +type RemoveTag> = +>RemoveTag : RemoveTag + + | { + [ThisTag in keyof T[typeof tag]]: T extends infer Underlying & Tag +>tag : unique symbol +>tag : unique symbol + + ? [Underlying] extends [T] ? never : Underlying + : never + }[keyof T[typeof tag]] +>tag : unique symbol + + | (T extends infer Underlying & TagContainer +>tag : unique symbol + + ? [Underlying] extends [T] ? never : Underlying + : never); +type UnwrapBrand = IfNotAnyOrNever}>; +>UnwrapBrand : UnwrapBrand +>ifNot : _UnwrapBrand + +type _UnwrapBrand = T extends Primitive +>_UnwrapBrand : _UnwrapBrand + + ? CollapseLiterals ? RemoveAllTags : T> + : T; +type _Numeric = number | bigint; +>_Numeric : _Numeric + +type PositiveInfinity = unknown; +>PositiveInfinity : unknown + +type NegativeInfinity = never; +>NegativeInfinity : never + +type IsNegative = never; +>IsNegative : never + +type Sum = any; +>Sum : any + +type LessThanOrEqual = unknown; +>LessThanOrEqual : unknown + +type ArraySlice< +>ArraySlice : ArraySlice + + Array_ extends readonly unknown[], + Start extends number = never, + End extends number = never, +> = ArraySliceImplementation : Start, End>; +type ArraySliceImplementation< +>ArraySliceImplementation : ArraySliceImplementation + + Array_ extends readonly unknown[], + Start extends number, + End extends number, +> = Array_ extends unknown ? _ArraySlice : never; +type _ArraySlice< +>_ArraySlice : _ArraySlice + + Array_ extends readonly unknown[], + Start extends number = 0, + End extends number = Array_['length'], +> = And, IsEqual> extends true +>true : true + + ? Array_ + : number extends Array_['length'] + ? VariableLengthArraySliceHelper extends true ? 0 : Start, End extends PositiveInfinity ? never : End> +>true : true + + : `${number}` extends `${Start | End}` + ? UnknownLengthArraySlice + : ArraySliceResult extends true ? 0 : Start, IsEqual extends true ? MaxLength : End>>; +>true : true +>true : true + +type ArraySliceResult = +>ArraySliceResult : Readonly + + IsReadonlyArray extends true ? Readonly : Sliced; +>true : true + +type VariableLengthArraySliceHelper< +>VariableLengthArraySliceHelper : IsEqual<_GreaterThan; }> : End, Start extends object ? IfNotAnyOrNever; }> : Start>, true> extends true ? Readonly> : any + + Array_ extends readonly unknown[], + Start extends number, + End extends number, +> = And< + And>, Not>>, + IsEqual, true> +>true : true + +> extends true +>true : true + + ? [] + : And< + And>, Not>>, + IsEqual, true> +>true : true + + > extends true +>true : true + + ? HasNoStaticElements extends true +>true : true + + ? UnknownLengthArraySlice + : ArraySliceResult> + : UnknownLengthArraySlice; +type UnknownLengthArraySlice = any; +>UnknownLengthArraySlice : any + +type ArraySliceHelper< +>ArraySliceHelper : never + + Array_ extends readonly unknown[], + Start extends number = 0, + End extends number = MaxLength, + ArrayLength extends number = MaxLength, +> = never; +type ArraySliceByPositiveIndex< +>ArraySliceByPositiveIndex : ArraySliceByPositiveIndex + + Array_ extends readonly unknown[], + Start extends number, + End extends number, + Result extends Array = [], +> = Start extends End + ? Result + : ArraySliceByPositiveIndex, End, [...Result, Array_[Start]]>; + +=== main.ts === +// Reduced from type-fest's ArraySlice. Checking the declarations compares +// types whose elaborations print very large types when error messages are +// not truncated, many times over for comparisons that fail on the way to +// comparisons that succeed, which report no error. Printing them also +// instantiated enough types to report excessive depth in the declarations. +import type {ArraySlice} from './arraySlice.d.ts'; +>ArraySlice : ArraySlice + +declare function f(values: ArraySlice): void; +>f : (values: ArraySlice) => void +>values : ArraySlice + +declare const x: ArraySlice; +>x : ArraySlice +>id : "row" +>id : "row" +>id : "row" + +f(x); +>f(x) : void +>f : (values: ArraySlice) => void +>x : ArraySlice + diff --git a/tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-creates-index-signature-sibling-types-in-a-stable-order.js b/tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-creates-index-signature-sibling-types-in-a-stable-order.js index c2fc8d7b618c1..06ac846c797f7 100644 --- a/tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-creates-index-signature-sibling-types-in-a-stable-order.js +++ b/tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-creates-index-signature-sibling-types-in-a-stable-order.js @@ -250,57 +250,54 @@ export declare const w: { {"id":84,"recursionId":78,"keyofType":82,"flags":["Index"]}, {"id":85,"symbolName":"__type","recursionId":79,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":1,"character":31},"end":{"line":1,"character":55}},"flags":["Object"]}, {"id":86,"recursionId":76,"indexedAccessObjectType":82,"indexedAccessIndexType":83,"flags":["IndexedAccess"]}, -{"id":87,"symbolName":"Symbol","recursionId":80,"firstDeclaration":{"path":"/home/src/tslibs/ts/lib/lib.es2026.full.d.ts","start":{"line":18,"character":13},"end":{"line":18,"character":38}},"flags":["Object"]}, -{"id":88,"symbolName":"SymbolConstructor","recursionId":81,"firstDeclaration":{"path":"/home/src/tslibs/ts/lib/lib.es2026.full.d.ts","start":{"line":13,"character":1},"end":{"line":17,"character":2}},"flags":["Object"]}, -{"id":89,"symbolName":"toStringTag","recursionId":82,"firstDeclaration":{"path":"/home/src/tslibs/ts/lib/lib.es2026.full.d.ts","start":{"line":16,"character":5},"end":{"line":16,"character":34}},"flags":["UniqueESSymbol"]}, -{"id":90,"symbolName":"expand","recursionId":83,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":1,"character":1},"end":{"line":1,"character":56}},"flags":["Object"],"display":"() => { [K in keyof X]: X[K]; }"}, -{"id":91,"symbolName":"C","recursionId":84,"instantiatedType":91,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":2,"character":1},"end":{"line":14,"character":2}},"flags":["Object"]}, -{"id":92,"symbolName":"C","recursionId":84,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":2,"character":1},"end":{"line":14,"character":2}},"flags":["TypeParameter"]}, -{"id":93,"symbolName":"__type","recursionId":84,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":1,"character":31},"end":{"line":1,"character":55}},"flags":["Object"]}, -{"id":94,"symbolName":"K","recursionId":77,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":1,"character":34},"end":{"line":1,"character":46}},"flags":["TypeParameter"]}, -{"id":95,"recursionId":85,"keyofType":91,"flags":["Index"]}, -{"id":96,"symbolName":"__type","recursionId":86,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":3,"character":11},"end":{"line":3,"character":19}},"flags":["Object"],"display":"{ a: 1; }"}, -{"id":97,"symbolName":"__type","recursionId":87,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":4,"character":9},"end":{"line":4,"character":18}},"flags":["Object"],"display":"{ p1: 1; }"}, -{"id":98,"symbolName":"__type","recursionId":88,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":5,"character":9},"end":{"line":5,"character":18}},"flags":["Object"],"display":"{ p2: 2; }"}, -{"id":99,"symbolName":"__type","recursionId":89,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":6,"character":9},"end":{"line":6,"character":18}},"flags":["Object"],"display":"{ p3: 3; }"}, -{"id":100,"symbolName":"__type","recursionId":90,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":7,"character":9},"end":{"line":7,"character":18}},"flags":["Object"],"display":"{ p4: 4; }"}, -{"id":101,"symbolName":"__type","recursionId":91,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":8,"character":9},"end":{"line":8,"character":18}},"flags":["Object"],"display":"{ p5: 5; }"}, -{"id":102,"symbolName":"__type","recursionId":92,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":9,"character":9},"end":{"line":9,"character":18}},"flags":["Object"],"display":"{ p6: 6; }"}, -{"id":103,"symbolName":"__type","recursionId":93,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":10,"character":9},"end":{"line":10,"character":18}},"flags":["Object"],"display":"{ p7: 7; }"}, -{"id":104,"symbolName":"__type","recursionId":94,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":11,"character":9},"end":{"line":11,"character":18}},"flags":["Object"],"display":"{ p8: 8; }"}, -{"id":105,"symbolName":"__type","recursionId":95,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":12,"character":9},"end":{"line":12,"character":18}},"flags":["Object"],"display":"{ p9: 9; }"}, -{"id":106,"symbolName":"__type","recursionId":96,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":13,"character":10},"end":{"line":13,"character":21}},"flags":["Object"],"display":"{ p10: 10; }"}, -{"id":107,"recursionId":97,"flags":["NumberLiteral"],"display":"10"}, -{"id":108,"recursionId":98,"flags":["NumberLiteral"],"display":"10"}, -{"id":109,"recursionId":99,"flags":["NumberLiteral"],"display":"9"}, -{"id":110,"recursionId":100,"flags":["NumberLiteral"],"display":"9"}, -{"id":111,"recursionId":101,"flags":["NumberLiteral"],"display":"8"}, -{"id":112,"recursionId":102,"flags":["NumberLiteral"],"display":"8"}, -{"id":113,"recursionId":103,"flags":["NumberLiteral"],"display":"7"}, -{"id":114,"recursionId":104,"flags":["NumberLiteral"],"display":"7"}, -{"id":115,"recursionId":105,"flags":["NumberLiteral"],"display":"6"}, -{"id":116,"recursionId":106,"flags":["NumberLiteral"],"display":"6"}, -{"id":117,"recursionId":107,"flags":["NumberLiteral"],"display":"5"}, -{"id":118,"recursionId":108,"flags":["NumberLiteral"],"display":"5"}, -{"id":119,"recursionId":109,"flags":["NumberLiteral"],"display":"4"}, -{"id":120,"recursionId":110,"flags":["NumberLiteral"],"display":"4"}, -{"id":121,"recursionId":111,"flags":["NumberLiteral"],"display":"3"}, -{"id":122,"recursionId":112,"flags":["NumberLiteral"],"display":"3"}, -{"id":123,"recursionId":113,"flags":["NumberLiteral"],"display":"2"}, -{"id":124,"recursionId":114,"flags":["NumberLiteral"],"display":"2"}, -{"id":125,"recursionId":115,"flags":["NumberLiteral"],"display":"1"}, -{"id":126,"recursionId":116,"flags":["NumberLiteral"],"display":"1"}, -{"id":127,"recursionId":117,"unionTypes":[96,97,98,99,100,101,102,103,104,105,106],"flags":["Union"],"display":"{ a: 1; } | { p1: 1; } | { p2: 2; } | { p3: 3; } | { p4: 4; } | { p5: 5; } | { p6: 6; } | { p7: 7; } | { p8: 8; } | { p9: 9; } | { p10: 10; }"}, -{"id":128,"recursionId":118,"flags":["StringLiteral"],"display":"\"m1\""}, -{"id":129,"recursionId":119,"flags":["StringLiteral"],"display":"\"m2\""}, -{"id":130,"recursionId":120,"flags":["StringLiteral"],"display":"\"m3\""}, -{"id":131,"recursionId":121,"flags":["StringLiteral"],"display":"\"m4\""}, -{"id":132,"recursionId":122,"flags":["StringLiteral"],"display":"\"m5\""}, -{"id":133,"recursionId":123,"flags":["StringLiteral"],"display":"\"m6\""}, -{"id":134,"recursionId":124,"flags":["StringLiteral"],"display":"\"m7\""}, -{"id":135,"recursionId":125,"flags":["StringLiteral"],"display":"\"m8\""}, -{"id":136,"recursionId":126,"flags":["StringLiteral"],"display":"\"m9\""}, -{"id":137,"recursionId":127,"flags":["StringLiteral"],"display":"\"m10\""}, -{"id":138,"recursionId":128,"unionTypes":[14,15],"flags":["Union"],"display":"keyof C"}] +{"id":87,"symbolName":"expand","recursionId":80,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":1,"character":1},"end":{"line":1,"character":56}},"flags":["Object"],"display":"() => { [K in keyof X]: X[K]; }"}, +{"id":88,"symbolName":"C","recursionId":81,"instantiatedType":88,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":2,"character":1},"end":{"line":14,"character":2}},"flags":["Object"]}, +{"id":89,"symbolName":"C","recursionId":81,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":2,"character":1},"end":{"line":14,"character":2}},"flags":["TypeParameter"]}, +{"id":90,"symbolName":"__type","recursionId":81,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":1,"character":31},"end":{"line":1,"character":55}},"flags":["Object"]}, +{"id":91,"symbolName":"K","recursionId":77,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":1,"character":34},"end":{"line":1,"character":46}},"flags":["TypeParameter"]}, +{"id":92,"recursionId":82,"keyofType":88,"flags":["Index"]}, +{"id":93,"symbolName":"__type","recursionId":83,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":3,"character":11},"end":{"line":3,"character":19}},"flags":["Object"],"display":"{ a: 1; }"}, +{"id":94,"symbolName":"__type","recursionId":84,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":4,"character":9},"end":{"line":4,"character":18}},"flags":["Object"],"display":"{ p1: 1; }"}, +{"id":95,"symbolName":"__type","recursionId":85,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":5,"character":9},"end":{"line":5,"character":18}},"flags":["Object"],"display":"{ p2: 2; }"}, +{"id":96,"symbolName":"__type","recursionId":86,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":6,"character":9},"end":{"line":6,"character":18}},"flags":["Object"],"display":"{ p3: 3; }"}, +{"id":97,"symbolName":"__type","recursionId":87,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":7,"character":9},"end":{"line":7,"character":18}},"flags":["Object"],"display":"{ p4: 4; }"}, +{"id":98,"symbolName":"__type","recursionId":88,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":8,"character":9},"end":{"line":8,"character":18}},"flags":["Object"],"display":"{ p5: 5; }"}, +{"id":99,"symbolName":"__type","recursionId":89,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":9,"character":9},"end":{"line":9,"character":18}},"flags":["Object"],"display":"{ p6: 6; }"}, +{"id":100,"symbolName":"__type","recursionId":90,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":10,"character":9},"end":{"line":10,"character":18}},"flags":["Object"],"display":"{ p7: 7; }"}, +{"id":101,"symbolName":"__type","recursionId":91,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":11,"character":9},"end":{"line":11,"character":18}},"flags":["Object"],"display":"{ p8: 8; }"}, +{"id":102,"symbolName":"__type","recursionId":92,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":12,"character":9},"end":{"line":12,"character":18}},"flags":["Object"],"display":"{ p9: 9; }"}, +{"id":103,"symbolName":"__type","recursionId":93,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":13,"character":10},"end":{"line":13,"character":21}},"flags":["Object"],"display":"{ p10: 10; }"}, +{"id":104,"recursionId":94,"flags":["NumberLiteral"],"display":"10"}, +{"id":105,"recursionId":95,"flags":["NumberLiteral"],"display":"10"}, +{"id":106,"recursionId":96,"flags":["NumberLiteral"],"display":"9"}, +{"id":107,"recursionId":97,"flags":["NumberLiteral"],"display":"9"}, +{"id":108,"recursionId":98,"flags":["NumberLiteral"],"display":"8"}, +{"id":109,"recursionId":99,"flags":["NumberLiteral"],"display":"8"}, +{"id":110,"recursionId":100,"flags":["NumberLiteral"],"display":"7"}, +{"id":111,"recursionId":101,"flags":["NumberLiteral"],"display":"7"}, +{"id":112,"recursionId":102,"flags":["NumberLiteral"],"display":"6"}, +{"id":113,"recursionId":103,"flags":["NumberLiteral"],"display":"6"}, +{"id":114,"recursionId":104,"flags":["NumberLiteral"],"display":"5"}, +{"id":115,"recursionId":105,"flags":["NumberLiteral"],"display":"5"}, +{"id":116,"recursionId":106,"flags":["NumberLiteral"],"display":"4"}, +{"id":117,"recursionId":107,"flags":["NumberLiteral"],"display":"4"}, +{"id":118,"recursionId":108,"flags":["NumberLiteral"],"display":"3"}, +{"id":119,"recursionId":109,"flags":["NumberLiteral"],"display":"3"}, +{"id":120,"recursionId":110,"flags":["NumberLiteral"],"display":"2"}, +{"id":121,"recursionId":111,"flags":["NumberLiteral"],"display":"2"}, +{"id":122,"recursionId":112,"flags":["NumberLiteral"],"display":"1"}, +{"id":123,"recursionId":113,"flags":["NumberLiteral"],"display":"1"}, +{"id":124,"recursionId":114,"unionTypes":[93,94,95,96,97,98,99,100,101,102,103],"flags":["Union"],"display":"{ a: 1; } | { p1: 1; } | { p2: 2; } | { p3: 3; } | { p4: 4; } | { p5: 5; } | { p6: 6; } | { p7: 7; } | { p8: 8; } | { p9: 9; } | { p10: 10; }"}, +{"id":125,"recursionId":115,"flags":["StringLiteral"],"display":"\"m1\""}, +{"id":126,"recursionId":116,"flags":["StringLiteral"],"display":"\"m2\""}, +{"id":127,"recursionId":117,"flags":["StringLiteral"],"display":"\"m3\""}, +{"id":128,"recursionId":118,"flags":["StringLiteral"],"display":"\"m4\""}, +{"id":129,"recursionId":119,"flags":["StringLiteral"],"display":"\"m5\""}, +{"id":130,"recursionId":120,"flags":["StringLiteral"],"display":"\"m6\""}, +{"id":131,"recursionId":121,"flags":["StringLiteral"],"display":"\"m7\""}, +{"id":132,"recursionId":122,"flags":["StringLiteral"],"display":"\"m8\""}, +{"id":133,"recursionId":123,"flags":["StringLiteral"],"display":"\"m9\""}, +{"id":134,"recursionId":124,"flags":["StringLiteral"],"display":"\"m10\""}, +{"id":135,"recursionId":125,"unionTypes":[14,15],"flags":["Union"],"display":"keyof C"}] diff --git a/tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-creates-static-index-signature-sibling-types-in-a-stable-order.js b/tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-creates-static-index-signature-sibling-types-in-a-stable-order.js index 91ed1755c8ff3..f8f5a110532f2 100644 --- a/tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-creates-static-index-signature-sibling-types-in-a-stable-order.js +++ b/tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-creates-static-index-signature-sibling-types-in-a-stable-order.js @@ -229,56 +229,53 @@ export declare const w: { {"id":84,"recursionId":78,"keyofType":82,"flags":["Index"]}, {"id":85,"symbolName":"__type","recursionId":79,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":1,"character":31},"end":{"line":1,"character":55}},"flags":["Object"]}, {"id":86,"recursionId":76,"indexedAccessObjectType":82,"indexedAccessIndexType":83,"flags":["IndexedAccess"]}, -{"id":87,"symbolName":"Symbol","recursionId":80,"firstDeclaration":{"path":"/home/src/tslibs/ts/lib/lib.es2026.full.d.ts","start":{"line":18,"character":13},"end":{"line":18,"character":38}},"flags":["Object"]}, -{"id":88,"symbolName":"SymbolConstructor","recursionId":81,"firstDeclaration":{"path":"/home/src/tslibs/ts/lib/lib.es2026.full.d.ts","start":{"line":13,"character":1},"end":{"line":17,"character":2}},"flags":["Object"]}, -{"id":89,"symbolName":"toStringTag","recursionId":82,"firstDeclaration":{"path":"/home/src/tslibs/ts/lib/lib.es2026.full.d.ts","start":{"line":16,"character":5},"end":{"line":16,"character":34}},"flags":["UniqueESSymbol"]}, -{"id":90,"symbolName":"expand","recursionId":83,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":1,"character":1},"end":{"line":1,"character":56}},"flags":["Object"],"display":"() => { [K in keyof X]: X[K]; }"}, -{"id":91,"symbolName":"C","recursionId":84,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":2,"character":1},"end":{"line":14,"character":2}},"flags":["Object"],"display":"typeof C"}, -{"id":92,"symbolName":"C","recursionId":85,"instantiatedType":92,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":2,"character":1},"end":{"line":14,"character":2}},"flags":["Object"]}, -{"id":93,"symbolName":"C","recursionId":85,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":2,"character":1},"end":{"line":14,"character":2}},"flags":["TypeParameter"]}, -{"id":94,"symbolName":"__type","recursionId":84,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":1,"character":31},"end":{"line":1,"character":55}},"flags":["Object"]}, -{"id":95,"symbolName":"K","recursionId":77,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":1,"character":34},"end":{"line":1,"character":46}},"flags":["TypeParameter"]}, -{"id":96,"symbolName":"__type","recursionId":86,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":3,"character":18},"end":{"line":3,"character":26}},"flags":["Object"],"display":"{ a: 1; }"}, -{"id":97,"symbolName":"__type","recursionId":87,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":4,"character":16},"end":{"line":4,"character":25}},"flags":["Object"],"display":"{ p1: 1; }"}, -{"id":98,"symbolName":"__type","recursionId":88,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":5,"character":16},"end":{"line":5,"character":25}},"flags":["Object"],"display":"{ p2: 2; }"}, -{"id":99,"symbolName":"__type","recursionId":89,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":6,"character":16},"end":{"line":6,"character":25}},"flags":["Object"],"display":"{ p3: 3; }"}, -{"id":100,"symbolName":"__type","recursionId":90,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":7,"character":16},"end":{"line":7,"character":25}},"flags":["Object"],"display":"{ p4: 4; }"}, -{"id":101,"symbolName":"__type","recursionId":91,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":8,"character":16},"end":{"line":8,"character":25}},"flags":["Object"],"display":"{ p5: 5; }"}, -{"id":102,"symbolName":"__type","recursionId":92,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":9,"character":16},"end":{"line":9,"character":25}},"flags":["Object"],"display":"{ p6: 6; }"}, -{"id":103,"symbolName":"__type","recursionId":93,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":10,"character":16},"end":{"line":10,"character":25}},"flags":["Object"],"display":"{ p7: 7; }"}, -{"id":104,"symbolName":"__type","recursionId":94,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":11,"character":16},"end":{"line":11,"character":25}},"flags":["Object"],"display":"{ p8: 8; }"}, -{"id":105,"symbolName":"__type","recursionId":95,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":12,"character":16},"end":{"line":12,"character":25}},"flags":["Object"],"display":"{ p9: 9; }"}, -{"id":106,"symbolName":"__type","recursionId":96,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":13,"character":17},"end":{"line":13,"character":28}},"flags":["Object"],"display":"{ p10: 10; }"}, -{"id":107,"recursionId":97,"flags":["NumberLiteral"],"display":"10"}, -{"id":108,"recursionId":98,"flags":["NumberLiteral"],"display":"10"}, -{"id":109,"recursionId":99,"flags":["NumberLiteral"],"display":"9"}, -{"id":110,"recursionId":100,"flags":["NumberLiteral"],"display":"9"}, -{"id":111,"recursionId":101,"flags":["NumberLiteral"],"display":"8"}, -{"id":112,"recursionId":102,"flags":["NumberLiteral"],"display":"8"}, -{"id":113,"recursionId":103,"flags":["NumberLiteral"],"display":"7"}, -{"id":114,"recursionId":104,"flags":["NumberLiteral"],"display":"7"}, -{"id":115,"recursionId":105,"flags":["NumberLiteral"],"display":"6"}, -{"id":116,"recursionId":106,"flags":["NumberLiteral"],"display":"6"}, -{"id":117,"recursionId":107,"flags":["NumberLiteral"],"display":"5"}, -{"id":118,"recursionId":108,"flags":["NumberLiteral"],"display":"5"}, -{"id":119,"recursionId":109,"flags":["NumberLiteral"],"display":"4"}, -{"id":120,"recursionId":110,"flags":["NumberLiteral"],"display":"4"}, -{"id":121,"recursionId":111,"flags":["NumberLiteral"],"display":"3"}, -{"id":122,"recursionId":112,"flags":["NumberLiteral"],"display":"3"}, -{"id":123,"recursionId":113,"flags":["NumberLiteral"],"display":"2"}, -{"id":124,"recursionId":114,"flags":["NumberLiteral"],"display":"2"}, -{"id":125,"recursionId":115,"flags":["NumberLiteral"],"display":"1"}, -{"id":126,"recursionId":116,"flags":["NumberLiteral"],"display":"1"}, -{"id":127,"recursionId":117,"flags":["StringLiteral"],"display":"\"m1\""}, -{"id":128,"recursionId":118,"flags":["StringLiteral"],"display":"\"m2\""}, -{"id":129,"recursionId":119,"flags":["StringLiteral"],"display":"\"m3\""}, -{"id":130,"recursionId":120,"flags":["StringLiteral"],"display":"\"m4\""}, -{"id":131,"recursionId":121,"flags":["StringLiteral"],"display":"\"m5\""}, -{"id":132,"recursionId":122,"flags":["StringLiteral"],"display":"\"m6\""}, -{"id":133,"recursionId":123,"flags":["StringLiteral"],"display":"\"m7\""}, -{"id":134,"recursionId":124,"flags":["StringLiteral"],"display":"\"m8\""}, -{"id":135,"recursionId":125,"flags":["StringLiteral"],"display":"\"m9\""}, -{"id":136,"recursionId":126,"flags":["StringLiteral"],"display":"\"m10\""}, -{"id":137,"recursionId":127,"flags":["StringLiteral"],"display":"\"prototype\""}] +{"id":87,"symbolName":"expand","recursionId":80,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":1,"character":1},"end":{"line":1,"character":56}},"flags":["Object"],"display":"() => { [K in keyof X]: X[K]; }"}, +{"id":88,"symbolName":"C","recursionId":81,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":2,"character":1},"end":{"line":14,"character":2}},"flags":["Object"],"display":"typeof C"}, +{"id":89,"symbolName":"C","recursionId":82,"instantiatedType":89,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":2,"character":1},"end":{"line":14,"character":2}},"flags":["Object"]}, +{"id":90,"symbolName":"C","recursionId":82,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":2,"character":1},"end":{"line":14,"character":2}},"flags":["TypeParameter"]}, +{"id":91,"symbolName":"__type","recursionId":81,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":1,"character":31},"end":{"line":1,"character":55}},"flags":["Object"]}, +{"id":92,"symbolName":"K","recursionId":77,"firstDeclaration":{"path":"/home/src/workspaces/project/main.ts","start":{"line":1,"character":34},"end":{"line":1,"character":46}},"flags":["TypeParameter"]}, +{"id":93,"symbolName":"__type","recursionId":83,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":3,"character":18},"end":{"line":3,"character":26}},"flags":["Object"],"display":"{ a: 1; }"}, +{"id":94,"symbolName":"__type","recursionId":84,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":4,"character":16},"end":{"line":4,"character":25}},"flags":["Object"],"display":"{ p1: 1; }"}, +{"id":95,"symbolName":"__type","recursionId":85,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":5,"character":16},"end":{"line":5,"character":25}},"flags":["Object"],"display":"{ p2: 2; }"}, +{"id":96,"symbolName":"__type","recursionId":86,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":6,"character":16},"end":{"line":6,"character":25}},"flags":["Object"],"display":"{ p3: 3; }"}, +{"id":97,"symbolName":"__type","recursionId":87,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":7,"character":16},"end":{"line":7,"character":25}},"flags":["Object"],"display":"{ p4: 4; }"}, +{"id":98,"symbolName":"__type","recursionId":88,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":8,"character":16},"end":{"line":8,"character":25}},"flags":["Object"],"display":"{ p5: 5; }"}, +{"id":99,"symbolName":"__type","recursionId":89,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":9,"character":16},"end":{"line":9,"character":25}},"flags":["Object"],"display":"{ p6: 6; }"}, +{"id":100,"symbolName":"__type","recursionId":90,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":10,"character":16},"end":{"line":10,"character":25}},"flags":["Object"],"display":"{ p7: 7; }"}, +{"id":101,"symbolName":"__type","recursionId":91,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":11,"character":16},"end":{"line":11,"character":25}},"flags":["Object"],"display":"{ p8: 8; }"}, +{"id":102,"symbolName":"__type","recursionId":92,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":12,"character":16},"end":{"line":12,"character":25}},"flags":["Object"],"display":"{ p9: 9; }"}, +{"id":103,"symbolName":"__type","recursionId":93,"firstDeclaration":{"path":"/home/src/workspaces/project/ambient.d.ts","start":{"line":13,"character":17},"end":{"line":13,"character":28}},"flags":["Object"],"display":"{ p10: 10; }"}, +{"id":104,"recursionId":94,"flags":["NumberLiteral"],"display":"10"}, +{"id":105,"recursionId":95,"flags":["NumberLiteral"],"display":"10"}, +{"id":106,"recursionId":96,"flags":["NumberLiteral"],"display":"9"}, +{"id":107,"recursionId":97,"flags":["NumberLiteral"],"display":"9"}, +{"id":108,"recursionId":98,"flags":["NumberLiteral"],"display":"8"}, +{"id":109,"recursionId":99,"flags":["NumberLiteral"],"display":"8"}, +{"id":110,"recursionId":100,"flags":["NumberLiteral"],"display":"7"}, +{"id":111,"recursionId":101,"flags":["NumberLiteral"],"display":"7"}, +{"id":112,"recursionId":102,"flags":["NumberLiteral"],"display":"6"}, +{"id":113,"recursionId":103,"flags":["NumberLiteral"],"display":"6"}, +{"id":114,"recursionId":104,"flags":["NumberLiteral"],"display":"5"}, +{"id":115,"recursionId":105,"flags":["NumberLiteral"],"display":"5"}, +{"id":116,"recursionId":106,"flags":["NumberLiteral"],"display":"4"}, +{"id":117,"recursionId":107,"flags":["NumberLiteral"],"display":"4"}, +{"id":118,"recursionId":108,"flags":["NumberLiteral"],"display":"3"}, +{"id":119,"recursionId":109,"flags":["NumberLiteral"],"display":"3"}, +{"id":120,"recursionId":110,"flags":["NumberLiteral"],"display":"2"}, +{"id":121,"recursionId":111,"flags":["NumberLiteral"],"display":"2"}, +{"id":122,"recursionId":112,"flags":["NumberLiteral"],"display":"1"}, +{"id":123,"recursionId":113,"flags":["NumberLiteral"],"display":"1"}, +{"id":124,"recursionId":114,"flags":["StringLiteral"],"display":"\"m1\""}, +{"id":125,"recursionId":115,"flags":["StringLiteral"],"display":"\"m2\""}, +{"id":126,"recursionId":116,"flags":["StringLiteral"],"display":"\"m3\""}, +{"id":127,"recursionId":117,"flags":["StringLiteral"],"display":"\"m4\""}, +{"id":128,"recursionId":118,"flags":["StringLiteral"],"display":"\"m5\""}, +{"id":129,"recursionId":119,"flags":["StringLiteral"],"display":"\"m6\""}, +{"id":130,"recursionId":120,"flags":["StringLiteral"],"display":"\"m7\""}, +{"id":131,"recursionId":121,"flags":["StringLiteral"],"display":"\"m8\""}, +{"id":132,"recursionId":122,"flags":["StringLiteral"],"display":"\"m9\""}, +{"id":133,"recursionId":123,"flags":["StringLiteral"],"display":"\"m10\""}, +{"id":134,"recursionId":124,"flags":["StringLiteral"],"display":"\"prototype\""}] diff --git a/tsc/testdata/tests/cases/compiler/relationErrorsNotPrintedWhenDiscarded.ts b/tsc/testdata/tests/cases/compiler/relationErrorsNotPrintedWhenDiscarded.ts new file mode 100644 index 0000000000000..8ef916e11faba --- /dev/null +++ b/tsc/testdata/tests/cases/compiler/relationErrorsNotPrintedWhenDiscarded.ts @@ -0,0 +1,179 @@ +// @strict: true +// @exactOptionalPropertyTypes: true +// @module: nodenext +// @target: esnext +// @noEmit: true + +// @filename: arraySlice.d.ts +export type {ArraySlice}; +declare const tag: unique symbol; +type IsNever = [T] extends [never] ? true : false; +type IsEqual = + [A] extends [B] + ? [B] extends [A] + ? _IsEqual + : false + : false; +type _IsEqual = never; +type Primitive = + | null + | undefined + | string + | number + | boolean + | symbol + | bigint; +type UnknownArray = any; +type IfNotAnyOrNever = + IsNever extends true + ? 'ifNever' extends keyof Cases + ? Cases['ifNever'] + : never + : Cases['ifNot']; +type And = B; +type Not = any; +type MaxLength = never; +type HasNoStaticElements = unknown; +type CollapseLiterals = Union extends Primitive + ? Union extends infer Collapsed & {} + ? Collapsed + : Union + : Union; +type PositiveNumericStringGt = A; +type Absolute = _Absolute : N>; +type _Absolute = N extends bigint + ? `${N}` extends `-${infer Magnitude extends bigint}` + ? Magnitude + : N + : `${N}` extends `-${infer Magnitude extends number}` + ? Magnitude + : `${N}` extends '-Infinity' + ? PositiveInfinity + : `${number}` extends `${N}` ? number : N; +type GreaterThan = + _GreaterThan : A, B extends object ? UnwrapBrand : B>; +type _GreaterThan = + A extends _Numeric + ? B extends _Numeric + ? `${number}` extends `${A | B}` + ? boolean + : bigint extends A | B + ? boolean + : A extends PositiveInfinity + ? B extends PositiveInfinity ? false : true + : B extends NegativeInfinity + ? A extends NegativeInfinity ? false : true + : A extends NegativeInfinity + ? false + : B extends PositiveInfinity + ? false + : [IsNegative, IsNegative] extends infer Signs extends [boolean, boolean] + ? [true, false] extends Signs + ? false + : [false, true] extends Signs + ? true + : [false, false] extends Signs + ? PositiveNumericStringGt<`${A}`, `${B}`> + : PositiveNumericStringGt<`${Absolute}`, `${Absolute}`> + : never + : never + : never; +type IsReadonlyArray = never; +type UnionMember = + IsNever extends true + ? never + : (T extends any ? () => T : never) extends () => (infer R) + ? R + : never; +type TagContainer = { + readonly [tag]: Token; +}; +type Tag = unknown; +type RemoveAllTags = T extends TagContainer + ? RemoveAllTags>> + : T; +type RemoveTag> = + | { + [ThisTag in keyof T[typeof tag]]: T extends infer Underlying & Tag + ? [Underlying] extends [T] ? never : Underlying + : never + }[keyof T[typeof tag]] + | (T extends infer Underlying & TagContainer + ? [Underlying] extends [T] ? never : Underlying + : never); +type UnwrapBrand = IfNotAnyOrNever}>; +type _UnwrapBrand = T extends Primitive + ? CollapseLiterals ? RemoveAllTags : T> + : T; +type _Numeric = number | bigint; +type PositiveInfinity = unknown; +type NegativeInfinity = never; +type IsNegative = never; +type Sum = any; +type LessThanOrEqual = unknown; +type ArraySlice< + Array_ extends readonly unknown[], + Start extends number = never, + End extends number = never, +> = ArraySliceImplementation : Start, End>; +type ArraySliceImplementation< + Array_ extends readonly unknown[], + Start extends number, + End extends number, +> = Array_ extends unknown ? _ArraySlice : never; +type _ArraySlice< + Array_ extends readonly unknown[], + Start extends number = 0, + End extends number = Array_['length'], +> = And, IsEqual> extends true + ? Array_ + : number extends Array_['length'] + ? VariableLengthArraySliceHelper extends true ? 0 : Start, End extends PositiveInfinity ? never : End> + : `${number}` extends `${Start | End}` + ? UnknownLengthArraySlice + : ArraySliceResult extends true ? 0 : Start, IsEqual extends true ? MaxLength : End>>; +type ArraySliceResult = + IsReadonlyArray extends true ? Readonly : Sliced; +type VariableLengthArraySliceHelper< + Array_ extends readonly unknown[], + Start extends number, + End extends number, +> = And< + And>, Not>>, + IsEqual, true> +> extends true + ? [] + : And< + And>, Not>>, + IsEqual, true> + > extends true + ? HasNoStaticElements extends true + ? UnknownLengthArraySlice + : ArraySliceResult> + : UnknownLengthArraySlice; +type UnknownLengthArraySlice = any; +type ArraySliceHelper< + Array_ extends readonly unknown[], + Start extends number = 0, + End extends number = MaxLength, + ArrayLength extends number = MaxLength, +> = never; +type ArraySliceByPositiveIndex< + Array_ extends readonly unknown[], + Start extends number, + End extends number, + Result extends Array = [], +> = Start extends End + ? Result + : ArraySliceByPositiveIndex, End, [...Result, Array_[Start]]>; + +// @filename: main.ts +// Reduced from type-fest's ArraySlice. Checking the declarations compares +// types whose elaborations print very large types when error messages are +// not truncated, many times over for comparisons that fail on the way to +// comparisons that succeed, which report no error. Printing them also +// instantiated enough types to report excessive depth in the declarations. +import type {ArraySlice} from './arraySlice.d.ts'; +declare function f(values: ArraySlice): void; +declare const x: ArraySlice; +f(x);