From d4a4f9a3fd1f3fc6efe3e4455e85663f19ccddd3 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Tue, 23 Jun 2020 16:27:24 -0700 Subject: [PATCH 1/5] Handle keyof T where T is generic tuple type --- src/compiler/checker.ts | 56 ++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 61fa4d1c69e2f..88f3a55f3e91b 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10195,7 +10195,8 @@ namespace ts { return type; } if (type.flags & TypeFlags.Index) { - return getIndexType(getApparentType((type).type)); + const t = (type).type; + return isTupleType(t) ? getKnownKeysOfTupleType(t) : getIndexType(getApparentType(t)); } if (type.flags & TypeFlags.Conditional) { if ((type).root.isDistributive) { @@ -10520,9 +10521,6 @@ namespace ts { return indexedAccess; } } - if (isGenericTupleType(type.objectType)) { - return getIndexTypeOfType(type.objectType, IndexKind.Number); - } const objectConstraint = getSimplifiedTypeOrConstraint(type.objectType); if (objectConstraint && objectConstraint !== type.objectType) { return getIndexedAccessTypeOrUndefined(objectConstraint, type.indexType); @@ -10711,9 +10709,6 @@ namespace ts { return keyofConstraintType; } if (t.flags & TypeFlags.IndexedAccess) { - if (isGenericTupleType((t).objectType)) { - return getIndexTypeOfType((t).objectType, IndexKind.Number); - } const baseObjectType = getBaseConstraint((t).objectType); const baseIndexType = getBaseConstraint((t).indexType); const baseIndexedAccess = baseObjectType && baseIndexType && getIndexedAccessTypeOrUndefined(baseObjectType, baseIndexType); @@ -12647,6 +12642,11 @@ namespace ts { /*readonly*/ false, target.labeledElementDeclarations && target.labeledElementDeclarations.slice(index, endIndex)); } + function getKnownKeysOfTupleType(type: TupleTypeReference) { + return getUnionType(append(arrayOf(type.target.fixedLength, i => getLiteralType("" + i)), + getIndexType(type.target.readonly ? globalReadonlyArrayType : globalArrayType))); + } + function getTypeFromOptionalTypeNode(node: OptionalTypeNode): Type { const type = getTypeFromTypeNode(node.type); return strictNullChecks ? getOptionalType(type) : type; @@ -16831,11 +16831,11 @@ namespace ts { } } - // For a generic type T, [...T] is assignable to T, T is assignable to readonly [...T], and T is assignable - // to [...T] when T is constrained to a mutable array or tuple type. - if (isSingleElementGenericTupleType(source) && getTypeArguments(source)[0] === target && !source.target.readonly || - isSingleElementGenericTupleType(target) && getTypeArguments(target)[0] === source && (target.target.readonly || isMutableArrayOrTuple(getBaseConstraintOfType(source) || source))) { - return Ternary.True; + // For a generic type T and a type U that is assignable to T, [...U] is assignable to T, U is assignable to readonly [...T], + // and U is assignable to [...T] when U is constrained to a mutable array or tuple type. + if (isSingleElementGenericTupleType(source) && !source.target.readonly && (result = isRelatedTo(getTypeArguments(source)[0], target)) || + isSingleElementGenericTupleType(target) && (target.target.readonly || isMutableArrayOrTuple(getBaseConstraintOfType(source) || source)) && (result = isRelatedTo(source, getTypeArguments(target)[0]))) { + return result; } if (target.flags & TypeFlags.TypeParameter) { @@ -16851,22 +16851,32 @@ namespace ts { } } else if (target.flags & TypeFlags.Index) { + const targetType = (target as IndexType).type; // A keyof S is related to a keyof T if T is related to S. if (source.flags & TypeFlags.Index) { - if (result = isRelatedTo((target).type, (source).type, /*reportErrors*/ false)) { + if (result = isRelatedTo(targetType, (source).type, /*reportErrors*/ false)) { return result; } } - // A type S is assignable to keyof T if S is assignable to keyof C, where C is the - // simplified form of T or, if T doesn't simplify, the constraint of T. - const constraint = getSimplifiedTypeOrConstraint((target).type); - if (constraint) { - // We require Ternary.True here such that circular constraints don't cause - // false positives. For example, given 'T extends { [K in keyof T]: string }', - // 'keyof T' has itself as its constraint and produces a Ternary.Maybe when - // related to other types. - if (isRelatedTo(source, getIndexType(constraint, (target as IndexType).stringsOnly), reportErrors) === Ternary.True) { - return Ternary.True; + if (isTupleType(targetType)) { + // An index type can have a tuple type target when the tuple type contains variadic elements. + // Check if the source is related to the known keys of the tuple type. + if (result = isRelatedTo(source, getKnownKeysOfTupleType(targetType), reportErrors)) { + return result; + } + } + else { + // A type S is assignable to keyof T if S is assignable to keyof C, where C is the + // simplified form of T or, if T doesn't simplify, the constraint of T. + const constraint = getSimplifiedTypeOrConstraint(targetType); + if (constraint) { + // We require Ternary.True here such that circular constraints don't cause + // false positives. For example, given 'T extends { [K in keyof T]: string }', + // 'keyof T' has itself as its constraint and produces a Ternary.Maybe when + // related to other types. + if (isRelatedTo(source, getIndexType(constraint, (target as IndexType).stringsOnly), reportErrors) === Ternary.True) { + return Ternary.True; + } } } } From a290919c04ae729a7f068cb041414b5c7ac90857 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Tue, 23 Jun 2020 16:27:59 -0700 Subject: [PATCH 2/5] Add tests --- .../types/tuple/variadicTuples1.ts | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tests/cases/conformance/types/tuple/variadicTuples1.ts b/tests/cases/conformance/types/tuple/variadicTuples1.ts index ca9087af294b8..ebeab57186a4f 100644 --- a/tests/cases/conformance/types/tuple/variadicTuples1.ts +++ b/tests/cases/conformance/types/tuple/variadicTuples1.ts @@ -170,6 +170,36 @@ function f12(t: T, m: [...T], r: readonly [...T]) r = m; } +function f13(t0: T, t1: [...T], t2: [...U]) { + t0 = t1; + t0 = t2; + t1 = t0; + t1 = t2; + t2 = t0; // Error + t2 = t1; // Error +} + +function f14(t0: T, t1: [...T], t2: [...U]) { + t0 = t1; + t0 = t2; + t1 = t0; // Error + t1 = t2; + t2 = t0; // Error + t2 = t1; // Error +} + +function f15(k0: keyof T, k1: keyof [...T], k2: keyof [...U], k3: keyof [1, 2, ...T]) { + k0 = 'length'; + k1 = 'length'; + k2 = 'length'; + k0 = 'slice'; + k1 = 'slice'; + k2 = 'slice'; + k3 = '0'; + k3 = '1'; + k3 = '2'; // Error +} + // Inference between variadic tuple types type First = T[0]; From d6333231fc12bc5f74a9460e648ce42f7c0fda86 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Tue, 23 Jun 2020 16:28:06 -0700 Subject: [PATCH 3/5] Accept new baselines --- .../reference/variadicTuples1.errors.txt | 78 ++- tests/baselines/reference/variadicTuples1.js | 60 ++ .../reference/variadicTuples1.symbols | 618 +++++++++++------- .../baselines/reference/variadicTuples1.types | 127 ++++ 4 files changed, 630 insertions(+), 253 deletions(-) diff --git a/tests/baselines/reference/variadicTuples1.errors.txt b/tests/baselines/reference/variadicTuples1.errors.txt index 2cb9d46a207c1..fe862b8bd3954 100644 --- a/tests/baselines/reference/variadicTuples1.errors.txt +++ b/tests/baselines/reference/variadicTuples1.errors.txt @@ -20,10 +20,29 @@ tests/cases/conformance/types/tuple/variadicTuples1.ts(163,5): error TS2322: Typ tests/cases/conformance/types/tuple/variadicTuples1.ts(164,5): error TS2322: Type 'T' is not assignable to type '[...T]'. The type 'readonly unknown[]' is 'readonly' and cannot be assigned to the mutable type '[...T]'. tests/cases/conformance/types/tuple/variadicTuples1.ts(165,5): error TS4104: The type 'readonly [...T]' is 'readonly' and cannot be assigned to the mutable type '[...T]'. -tests/cases/conformance/types/tuple/variadicTuples1.ts(297,14): error TS7019: Rest parameter 'x' implicitly has an 'any[]' type. +tests/cases/conformance/types/tuple/variadicTuples1.ts(175,5): error TS2322: Type 'T' is not assignable to type '[...U]'. + Type 'string[]' is not assignable to type '[...U]'. + Target requires 1 element(s) but source may have fewer. +tests/cases/conformance/types/tuple/variadicTuples1.ts(176,5): error TS2322: Type '[...T]' is not assignable to type '[...U]'. + Type 'T' is not assignable to type 'U'. + 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'string[]'. + Type 'string[]' is not assignable to type 'U'. + 'U' could be instantiated with an arbitrary type which could be unrelated to 'string[]'. +tests/cases/conformance/types/tuple/variadicTuples1.ts(182,5): error TS2322: Type 'T' is not assignable to type '[...T]'. + The type 'readonly string[]' is 'readonly' and cannot be assigned to the mutable type '[...T]'. +tests/cases/conformance/types/tuple/variadicTuples1.ts(184,5): error TS2322: Type 'T' is not assignable to type '[...U]'. + The type 'readonly string[]' is 'readonly' and cannot be assigned to the mutable type '[...U]'. +tests/cases/conformance/types/tuple/variadicTuples1.ts(185,5): error TS2322: Type '[...T]' is not assignable to type '[...U]'. + Type 'T' is not assignable to type 'U'. + 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'readonly string[]'. + Type 'readonly string[]' is not assignable to type 'U'. + 'U' could be instantiated with an arbitrary type which could be unrelated to 'readonly string[]'. +tests/cases/conformance/types/tuple/variadicTuples1.ts(197,5): error TS2322: Type 'string' is not assignable to type 'keyof [1, 2, ...T]'. + Type '"2"' is not assignable to type 'number | "0" | "length" | "toString" | "toLocaleString" | "pop" | "push" | "concat" | "join" | "reverse" | "shift" | "slice" | "sort" | "splice" | "unshift" | "indexOf" | "lastIndexOf" | "every" | "some" | "forEach" | "map" | "filter" | "reduce" | "reduceRight" | "1"'. +tests/cases/conformance/types/tuple/variadicTuples1.ts(327,14): error TS7019: Rest parameter 'x' implicitly has an 'any[]' type. -==== tests/cases/conformance/types/tuple/variadicTuples1.ts (13 errors) ==== +==== tests/cases/conformance/types/tuple/variadicTuples1.ts (19 errors) ==== // Variadics in tuple types type TV0 = [string, ...T]; @@ -228,6 +247,61 @@ tests/cases/conformance/types/tuple/variadicTuples1.ts(297,14): error TS7019: Re r = m; } + function f13(t0: T, t1: [...T], t2: [...U]) { + t0 = t1; + t0 = t2; + t1 = t0; + t1 = t2; + t2 = t0; // Error + ~~ +!!! error TS2322: Type 'T' is not assignable to type '[...U]'. +!!! error TS2322: Type 'string[]' is not assignable to type '[...U]'. +!!! error TS2322: Target requires 1 element(s) but source may have fewer. + t2 = t1; // Error + ~~ +!!! error TS2322: Type '[...T]' is not assignable to type '[...U]'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. +!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'string[]'. +!!! error TS2322: Type 'string[]' is not assignable to type 'U'. +!!! error TS2322: 'U' could be instantiated with an arbitrary type which could be unrelated to 'string[]'. + } + + function f14(t0: T, t1: [...T], t2: [...U]) { + t0 = t1; + t0 = t2; + t1 = t0; // Error + ~~ +!!! error TS2322: Type 'T' is not assignable to type '[...T]'. +!!! error TS2322: The type 'readonly string[]' is 'readonly' and cannot be assigned to the mutable type '[...T]'. + t1 = t2; + t2 = t0; // Error + ~~ +!!! error TS2322: Type 'T' is not assignable to type '[...U]'. +!!! error TS2322: The type 'readonly string[]' is 'readonly' and cannot be assigned to the mutable type '[...U]'. + t2 = t1; // Error + ~~ +!!! error TS2322: Type '[...T]' is not assignable to type '[...U]'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. +!!! error TS2322: 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'readonly string[]'. +!!! error TS2322: Type 'readonly string[]' is not assignable to type 'U'. +!!! error TS2322: 'U' could be instantiated with an arbitrary type which could be unrelated to 'readonly string[]'. + } + + function f15(k0: keyof T, k1: keyof [...T], k2: keyof [...U], k3: keyof [1, 2, ...T]) { + k0 = 'length'; + k1 = 'length'; + k2 = 'length'; + k0 = 'slice'; + k1 = 'slice'; + k2 = 'slice'; + k3 = '0'; + k3 = '1'; + k3 = '2'; // Error + ~~ +!!! error TS2322: Type 'string' is not assignable to type 'keyof [1, 2, ...T]'. +!!! error TS2322: Type '"2"' is not assignable to type 'number | "0" | "length" | "toString" | "toLocaleString" | "pop" | "push" | "concat" | "join" | "reverse" | "shift" | "slice" | "sort" | "splice" | "unshift" | "indexOf" | "lastIndexOf" | "every" | "some" | "forEach" | "map" | "filter" | "reduce" | "reduceRight" | "1"'. + } + // Inference between variadic tuple types type First = T[0]; diff --git a/tests/baselines/reference/variadicTuples1.js b/tests/baselines/reference/variadicTuples1.js index e35f25830b5a0..e57cb7891c6ec 100644 --- a/tests/baselines/reference/variadicTuples1.js +++ b/tests/baselines/reference/variadicTuples1.js @@ -168,6 +168,36 @@ function f12(t: T, m: [...T], r: readonly [...T]) r = m; } +function f13(t0: T, t1: [...T], t2: [...U]) { + t0 = t1; + t0 = t2; + t1 = t0; + t1 = t2; + t2 = t0; // Error + t2 = t1; // Error +} + +function f14(t0: T, t1: [...T], t2: [...U]) { + t0 = t1; + t0 = t2; + t1 = t0; // Error + t1 = t2; + t2 = t0; // Error + t2 = t1; // Error +} + +function f15(k0: keyof T, k1: keyof [...T], k2: keyof [...U], k3: keyof [1, 2, ...T]) { + k0 = 'length'; + k1 = 'length'; + k2 = 'length'; + k0 = 'slice'; + k1 = 'slice'; + k2 = 'slice'; + k3 = '0'; + k3 = '1'; + k3 = '2'; // Error +} + // Inference between variadic tuple types type First = T[0]; @@ -404,6 +434,33 @@ function f12(t, m, r) { r = t; r = m; } +function f13(t0, t1, t2) { + t0 = t1; + t0 = t2; + t1 = t0; + t1 = t2; + t2 = t0; // Error + t2 = t1; // Error +} +function f14(t0, t1, t2) { + t0 = t1; + t0 = t2; + t1 = t0; // Error + t1 = t2; + t2 = t0; // Error + t2 = t1; // Error +} +function f15(k0, k1, k2, k3) { + k0 = 'length'; + k1 = 'length'; + k2 = 'length'; + k0 = 'slice'; + k1 = 'slice'; + k2 = 'slice'; + k3 = '0'; + k3 = '1'; + k3 = '2'; // Error +} // Inference to [...T, ...U] with implied arity for T function curry(f) { var a = []; @@ -510,6 +567,9 @@ declare function gx2(u: U, v: declare function f10(x: [string, ...unknown[]], y: [string, ...T], z: [string, ...U]): void; declare function f11(t: T, m: [...T], r: readonly [...T]): void; declare function f12(t: T, m: [...T], r: readonly [...T]): void; +declare function f13(t0: T, t1: [...T], t2: [...U]): void; +declare function f14(t0: T, t1: [...T], t2: [...U]): void; +declare function f15(k0: keyof T, k1: keyof [...T], k2: keyof [...U], k3: keyof [1, 2, ...T]): void; declare type First = T[0]; declare type DropFirst = T extends readonly [any, ...infer U] ? U : [...T]; declare type Last = T extends readonly [...infer _, infer U] ? U : undefined; diff --git a/tests/baselines/reference/variadicTuples1.symbols b/tests/baselines/reference/variadicTuples1.symbols index 4701211779bf4..e751950415beb 100644 --- a/tests/baselines/reference/variadicTuples1.symbols +++ b/tests/baselines/reference/variadicTuples1.symbols @@ -555,455 +555,571 @@ function f12(t: T, m: [...T], r: readonly [...T]) >m : Symbol(m, Decl(variadicTuples1.ts, 160, 48)) } +function f13(t0: T, t1: [...T], t2: [...U]) { +>f13 : Symbol(f13, Decl(variadicTuples1.ts, 167, 1)) +>T : Symbol(T, Decl(variadicTuples1.ts, 169, 13)) +>U : Symbol(U, Decl(variadicTuples1.ts, 169, 32)) +>T : Symbol(T, Decl(variadicTuples1.ts, 169, 13)) +>t0 : Symbol(t0, Decl(variadicTuples1.ts, 169, 46)) +>T : Symbol(T, Decl(variadicTuples1.ts, 169, 13)) +>t1 : Symbol(t1, Decl(variadicTuples1.ts, 169, 52)) +>T : Symbol(T, Decl(variadicTuples1.ts, 169, 13)) +>t2 : Symbol(t2, Decl(variadicTuples1.ts, 169, 64)) +>U : Symbol(U, Decl(variadicTuples1.ts, 169, 32)) + + t0 = t1; +>t0 : Symbol(t0, Decl(variadicTuples1.ts, 169, 46)) +>t1 : Symbol(t1, Decl(variadicTuples1.ts, 169, 52)) + + t0 = t2; +>t0 : Symbol(t0, Decl(variadicTuples1.ts, 169, 46)) +>t2 : Symbol(t2, Decl(variadicTuples1.ts, 169, 64)) + + t1 = t0; +>t1 : Symbol(t1, Decl(variadicTuples1.ts, 169, 52)) +>t0 : Symbol(t0, Decl(variadicTuples1.ts, 169, 46)) + + t1 = t2; +>t1 : Symbol(t1, Decl(variadicTuples1.ts, 169, 52)) +>t2 : Symbol(t2, Decl(variadicTuples1.ts, 169, 64)) + + t2 = t0; // Error +>t2 : Symbol(t2, Decl(variadicTuples1.ts, 169, 64)) +>t0 : Symbol(t0, Decl(variadicTuples1.ts, 169, 46)) + + t2 = t1; // Error +>t2 : Symbol(t2, Decl(variadicTuples1.ts, 169, 64)) +>t1 : Symbol(t1, Decl(variadicTuples1.ts, 169, 52)) +} + +function f14(t0: T, t1: [...T], t2: [...U]) { +>f14 : Symbol(f14, Decl(variadicTuples1.ts, 176, 1)) +>T : Symbol(T, Decl(variadicTuples1.ts, 178, 13)) +>U : Symbol(U, Decl(variadicTuples1.ts, 178, 41)) +>T : Symbol(T, Decl(variadicTuples1.ts, 178, 13)) +>t0 : Symbol(t0, Decl(variadicTuples1.ts, 178, 55)) +>T : Symbol(T, Decl(variadicTuples1.ts, 178, 13)) +>t1 : Symbol(t1, Decl(variadicTuples1.ts, 178, 61)) +>T : Symbol(T, Decl(variadicTuples1.ts, 178, 13)) +>t2 : Symbol(t2, Decl(variadicTuples1.ts, 178, 73)) +>U : Symbol(U, Decl(variadicTuples1.ts, 178, 41)) + + t0 = t1; +>t0 : Symbol(t0, Decl(variadicTuples1.ts, 178, 55)) +>t1 : Symbol(t1, Decl(variadicTuples1.ts, 178, 61)) + + t0 = t2; +>t0 : Symbol(t0, Decl(variadicTuples1.ts, 178, 55)) +>t2 : Symbol(t2, Decl(variadicTuples1.ts, 178, 73)) + + t1 = t0; // Error +>t1 : Symbol(t1, Decl(variadicTuples1.ts, 178, 61)) +>t0 : Symbol(t0, Decl(variadicTuples1.ts, 178, 55)) + + t1 = t2; +>t1 : Symbol(t1, Decl(variadicTuples1.ts, 178, 61)) +>t2 : Symbol(t2, Decl(variadicTuples1.ts, 178, 73)) + + t2 = t0; // Error +>t2 : Symbol(t2, Decl(variadicTuples1.ts, 178, 73)) +>t0 : Symbol(t0, Decl(variadicTuples1.ts, 178, 55)) + + t2 = t1; // Error +>t2 : Symbol(t2, Decl(variadicTuples1.ts, 178, 73)) +>t1 : Symbol(t1, Decl(variadicTuples1.ts, 178, 61)) +} + +function f15(k0: keyof T, k1: keyof [...T], k2: keyof [...U], k3: keyof [1, 2, ...T]) { +>f15 : Symbol(f15, Decl(variadicTuples1.ts, 185, 1)) +>T : Symbol(T, Decl(variadicTuples1.ts, 187, 13)) +>U : Symbol(U, Decl(variadicTuples1.ts, 187, 32)) +>T : Symbol(T, Decl(variadicTuples1.ts, 187, 13)) +>k0 : Symbol(k0, Decl(variadicTuples1.ts, 187, 46)) +>T : Symbol(T, Decl(variadicTuples1.ts, 187, 13)) +>k1 : Symbol(k1, Decl(variadicTuples1.ts, 187, 58)) +>T : Symbol(T, Decl(variadicTuples1.ts, 187, 13)) +>k2 : Symbol(k2, Decl(variadicTuples1.ts, 187, 76)) +>U : Symbol(U, Decl(variadicTuples1.ts, 187, 32)) +>k3 : Symbol(k3, Decl(variadicTuples1.ts, 187, 94)) +>T : Symbol(T, Decl(variadicTuples1.ts, 187, 13)) + + k0 = 'length'; +>k0 : Symbol(k0, Decl(variadicTuples1.ts, 187, 46)) + + k1 = 'length'; +>k1 : Symbol(k1, Decl(variadicTuples1.ts, 187, 58)) + + k2 = 'length'; +>k2 : Symbol(k2, Decl(variadicTuples1.ts, 187, 76)) + + k0 = 'slice'; +>k0 : Symbol(k0, Decl(variadicTuples1.ts, 187, 46)) + + k1 = 'slice'; +>k1 : Symbol(k1, Decl(variadicTuples1.ts, 187, 58)) + + k2 = 'slice'; +>k2 : Symbol(k2, Decl(variadicTuples1.ts, 187, 76)) + + k3 = '0'; +>k3 : Symbol(k3, Decl(variadicTuples1.ts, 187, 94)) + + k3 = '1'; +>k3 : Symbol(k3, Decl(variadicTuples1.ts, 187, 94)) + + k3 = '2'; // Error +>k3 : Symbol(k3, Decl(variadicTuples1.ts, 187, 94)) +} + // Inference between variadic tuple types type First = T[0]; ->First : Symbol(First, Decl(variadicTuples1.ts, 167, 1)) ->T : Symbol(T, Decl(variadicTuples1.ts, 171, 11)) ->T : Symbol(T, Decl(variadicTuples1.ts, 171, 11)) +>First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) +>T : Symbol(T, Decl(variadicTuples1.ts, 201, 11)) +>T : Symbol(T, Decl(variadicTuples1.ts, 201, 11)) type DropFirst = T extends readonly [any, ...infer U] ? U : [...T]; ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 171, 48)) ->T : Symbol(T, Decl(variadicTuples1.ts, 172, 15)) ->T : Symbol(T, Decl(variadicTuples1.ts, 172, 15)) ->U : Symbol(U, Decl(variadicTuples1.ts, 172, 80)) ->U : Symbol(U, Decl(variadicTuples1.ts, 172, 80)) ->T : Symbol(T, Decl(variadicTuples1.ts, 172, 15)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) +>T : Symbol(T, Decl(variadicTuples1.ts, 202, 15)) +>T : Symbol(T, Decl(variadicTuples1.ts, 202, 15)) +>U : Symbol(U, Decl(variadicTuples1.ts, 202, 80)) +>U : Symbol(U, Decl(variadicTuples1.ts, 202, 80)) +>T : Symbol(T, Decl(variadicTuples1.ts, 202, 15)) type Last = T extends readonly [...infer _, infer U] ? U : undefined; ->Last : Symbol(Last, Decl(variadicTuples1.ts, 172, 97)) ->T : Symbol(T, Decl(variadicTuples1.ts, 174, 10)) ->T : Symbol(T, Decl(variadicTuples1.ts, 174, 10)) ->_ : Symbol(_, Decl(variadicTuples1.ts, 174, 70)) ->U : Symbol(U, Decl(variadicTuples1.ts, 174, 79)) ->U : Symbol(U, Decl(variadicTuples1.ts, 174, 79)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) +>T : Symbol(T, Decl(variadicTuples1.ts, 204, 10)) +>T : Symbol(T, Decl(variadicTuples1.ts, 204, 10)) +>_ : Symbol(_, Decl(variadicTuples1.ts, 204, 70)) +>U : Symbol(U, Decl(variadicTuples1.ts, 204, 79)) +>U : Symbol(U, Decl(variadicTuples1.ts, 204, 79)) type DropLast = T extends readonly [...infer U, any] ? U : [...T]; ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 174, 99)) ->T : Symbol(T, Decl(variadicTuples1.ts, 175, 14)) ->T : Symbol(T, Decl(variadicTuples1.ts, 175, 14)) ->U : Symbol(U, Decl(variadicTuples1.ts, 175, 74)) ->U : Symbol(U, Decl(variadicTuples1.ts, 175, 74)) ->T : Symbol(T, Decl(variadicTuples1.ts, 175, 14)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) +>T : Symbol(T, Decl(variadicTuples1.ts, 205, 14)) +>T : Symbol(T, Decl(variadicTuples1.ts, 205, 14)) +>U : Symbol(U, Decl(variadicTuples1.ts, 205, 74)) +>U : Symbol(U, Decl(variadicTuples1.ts, 205, 74)) +>T : Symbol(T, Decl(variadicTuples1.ts, 205, 14)) type T00 = First<[number, symbol, string]>; ->T00 : Symbol(T00, Decl(variadicTuples1.ts, 175, 96)) ->First : Symbol(First, Decl(variadicTuples1.ts, 167, 1)) +>T00 : Symbol(T00, Decl(variadicTuples1.ts, 205, 96)) +>First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) type T01 = First<[symbol, string]>; ->T01 : Symbol(T01, Decl(variadicTuples1.ts, 177, 43)) ->First : Symbol(First, Decl(variadicTuples1.ts, 167, 1)) +>T01 : Symbol(T01, Decl(variadicTuples1.ts, 207, 43)) +>First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) type T02 = First<[string]>; ->T02 : Symbol(T02, Decl(variadicTuples1.ts, 178, 35)) ->First : Symbol(First, Decl(variadicTuples1.ts, 167, 1)) +>T02 : Symbol(T02, Decl(variadicTuples1.ts, 208, 35)) +>First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) type T03 = First<[number, symbol, ...string[]]>; ->T03 : Symbol(T03, Decl(variadicTuples1.ts, 179, 27)) ->First : Symbol(First, Decl(variadicTuples1.ts, 167, 1)) +>T03 : Symbol(T03, Decl(variadicTuples1.ts, 209, 27)) +>First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) type T04 = First<[symbol, ...string[]]>; ->T04 : Symbol(T04, Decl(variadicTuples1.ts, 180, 48)) ->First : Symbol(First, Decl(variadicTuples1.ts, 167, 1)) +>T04 : Symbol(T04, Decl(variadicTuples1.ts, 210, 48)) +>First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) type T05 = First; ->T05 : Symbol(T05, Decl(variadicTuples1.ts, 181, 40)) ->First : Symbol(First, Decl(variadicTuples1.ts, 167, 1)) +>T05 : Symbol(T05, Decl(variadicTuples1.ts, 211, 40)) +>First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) type T06 = First<[]>; ->T06 : Symbol(T06, Decl(variadicTuples1.ts, 182, 27)) ->First : Symbol(First, Decl(variadicTuples1.ts, 167, 1)) +>T06 : Symbol(T06, Decl(variadicTuples1.ts, 212, 27)) +>First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) type T07 = First; ->T07 : Symbol(T07, Decl(variadicTuples1.ts, 183, 21)) ->First : Symbol(First, Decl(variadicTuples1.ts, 167, 1)) +>T07 : Symbol(T07, Decl(variadicTuples1.ts, 213, 21)) +>First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) type T08 = First; ->T08 : Symbol(T08, Decl(variadicTuples1.ts, 184, 22)) ->First : Symbol(First, Decl(variadicTuples1.ts, 167, 1)) +>T08 : Symbol(T08, Decl(variadicTuples1.ts, 214, 22)) +>First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) type T10 = DropFirst<[number, symbol, string]>; ->T10 : Symbol(T10, Decl(variadicTuples1.ts, 185, 24)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 171, 48)) +>T10 : Symbol(T10, Decl(variadicTuples1.ts, 215, 24)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) type T11 = DropFirst<[symbol, string]>; ->T11 : Symbol(T11, Decl(variadicTuples1.ts, 187, 47)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 171, 48)) +>T11 : Symbol(T11, Decl(variadicTuples1.ts, 217, 47)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) type T12 = DropFirst<[string]>; ->T12 : Symbol(T12, Decl(variadicTuples1.ts, 188, 39)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 171, 48)) +>T12 : Symbol(T12, Decl(variadicTuples1.ts, 218, 39)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) type T13 = DropFirst<[number, symbol, ...string[]]>; ->T13 : Symbol(T13, Decl(variadicTuples1.ts, 189, 31)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 171, 48)) +>T13 : Symbol(T13, Decl(variadicTuples1.ts, 219, 31)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) type T14 = DropFirst<[symbol, ...string[]]>; ->T14 : Symbol(T14, Decl(variadicTuples1.ts, 190, 52)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 171, 48)) +>T14 : Symbol(T14, Decl(variadicTuples1.ts, 220, 52)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) type T15 = DropFirst; ->T15 : Symbol(T15, Decl(variadicTuples1.ts, 191, 44)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 171, 48)) +>T15 : Symbol(T15, Decl(variadicTuples1.ts, 221, 44)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) type T16 = DropFirst<[]>; ->T16 : Symbol(T16, Decl(variadicTuples1.ts, 192, 31)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 171, 48)) +>T16 : Symbol(T16, Decl(variadicTuples1.ts, 222, 31)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) type T17 = DropFirst; ->T17 : Symbol(T17, Decl(variadicTuples1.ts, 193, 25)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 171, 48)) +>T17 : Symbol(T17, Decl(variadicTuples1.ts, 223, 25)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) type T18 = DropFirst; ->T18 : Symbol(T18, Decl(variadicTuples1.ts, 194, 26)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 171, 48)) +>T18 : Symbol(T18, Decl(variadicTuples1.ts, 224, 26)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) type T20 = Last<[number, symbol, string]>; ->T20 : Symbol(T20, Decl(variadicTuples1.ts, 195, 28)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 172, 97)) +>T20 : Symbol(T20, Decl(variadicTuples1.ts, 225, 28)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) type T21 = Last<[symbol, string]>; ->T21 : Symbol(T21, Decl(variadicTuples1.ts, 197, 42)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 172, 97)) +>T21 : Symbol(T21, Decl(variadicTuples1.ts, 227, 42)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) type T22 = Last<[string]>; ->T22 : Symbol(T22, Decl(variadicTuples1.ts, 198, 34)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 172, 97)) +>T22 : Symbol(T22, Decl(variadicTuples1.ts, 228, 34)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) type T23 = Last<[number, symbol, ...string[]]>; ->T23 : Symbol(T23, Decl(variadicTuples1.ts, 199, 26)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 172, 97)) +>T23 : Symbol(T23, Decl(variadicTuples1.ts, 229, 26)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) type T24 = Last<[symbol, ...string[]]>; ->T24 : Symbol(T24, Decl(variadicTuples1.ts, 200, 47)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 172, 97)) +>T24 : Symbol(T24, Decl(variadicTuples1.ts, 230, 47)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) type T25 = Last; ->T25 : Symbol(T25, Decl(variadicTuples1.ts, 201, 39)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 172, 97)) +>T25 : Symbol(T25, Decl(variadicTuples1.ts, 231, 39)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) type T26 = Last<[]>; // unknown[], maybe should be [] ->T26 : Symbol(T26, Decl(variadicTuples1.ts, 202, 26)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 172, 97)) +>T26 : Symbol(T26, Decl(variadicTuples1.ts, 232, 26)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) type T27 = Last; // unknown, maybe should be any ->T27 : Symbol(T27, Decl(variadicTuples1.ts, 203, 20)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 172, 97)) +>T27 : Symbol(T27, Decl(variadicTuples1.ts, 233, 20)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) type T28 = Last; ->T28 : Symbol(T28, Decl(variadicTuples1.ts, 204, 21)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 172, 97)) +>T28 : Symbol(T28, Decl(variadicTuples1.ts, 234, 21)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) type T30 = DropLast<[number, symbol, string]>; ->T30 : Symbol(T30, Decl(variadicTuples1.ts, 205, 23)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 174, 99)) +>T30 : Symbol(T30, Decl(variadicTuples1.ts, 235, 23)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) type T31 = DropLast<[symbol, string]>; ->T31 : Symbol(T31, Decl(variadicTuples1.ts, 207, 46)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 174, 99)) +>T31 : Symbol(T31, Decl(variadicTuples1.ts, 237, 46)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) type T32 = DropLast<[string]>; ->T32 : Symbol(T32, Decl(variadicTuples1.ts, 208, 38)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 174, 99)) +>T32 : Symbol(T32, Decl(variadicTuples1.ts, 238, 38)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) type T33 = DropLast<[number, symbol, ...string[]]>; ->T33 : Symbol(T33, Decl(variadicTuples1.ts, 209, 30)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 174, 99)) +>T33 : Symbol(T33, Decl(variadicTuples1.ts, 239, 30)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) type T34 = DropLast<[symbol, ...string[]]>; ->T34 : Symbol(T34, Decl(variadicTuples1.ts, 210, 51)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 174, 99)) +>T34 : Symbol(T34, Decl(variadicTuples1.ts, 240, 51)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) type T35 = DropLast; ->T35 : Symbol(T35, Decl(variadicTuples1.ts, 211, 43)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 174, 99)) +>T35 : Symbol(T35, Decl(variadicTuples1.ts, 241, 43)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) type T36 = DropLast<[]>; // unknown[], maybe should be [] ->T36 : Symbol(T36, Decl(variadicTuples1.ts, 212, 30)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 174, 99)) +>T36 : Symbol(T36, Decl(variadicTuples1.ts, 242, 30)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) type T37 = DropLast; ->T37 : Symbol(T37, Decl(variadicTuples1.ts, 213, 24)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 174, 99)) +>T37 : Symbol(T37, Decl(variadicTuples1.ts, 243, 24)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) type T38 = DropLast; ->T38 : Symbol(T38, Decl(variadicTuples1.ts, 214, 25)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 174, 99)) +>T38 : Symbol(T38, Decl(variadicTuples1.ts, 244, 25)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) type R00 = First; ->R00 : Symbol(R00, Decl(variadicTuples1.ts, 215, 27)) ->First : Symbol(First, Decl(variadicTuples1.ts, 167, 1)) +>R00 : Symbol(R00, Decl(variadicTuples1.ts, 245, 27)) +>First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) type R01 = First; ->R01 : Symbol(R01, Decl(variadicTuples1.ts, 217, 52)) ->First : Symbol(First, Decl(variadicTuples1.ts, 167, 1)) +>R01 : Symbol(R01, Decl(variadicTuples1.ts, 247, 52)) +>First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) type R02 = First; ->R02 : Symbol(R02, Decl(variadicTuples1.ts, 218, 44)) ->First : Symbol(First, Decl(variadicTuples1.ts, 167, 1)) +>R02 : Symbol(R02, Decl(variadicTuples1.ts, 248, 44)) +>First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) type R03 = First; ->R03 : Symbol(R03, Decl(variadicTuples1.ts, 219, 36)) ->First : Symbol(First, Decl(variadicTuples1.ts, 167, 1)) +>R03 : Symbol(R03, Decl(variadicTuples1.ts, 249, 36)) +>First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) type R04 = First; ->R04 : Symbol(R04, Decl(variadicTuples1.ts, 220, 57)) ->First : Symbol(First, Decl(variadicTuples1.ts, 167, 1)) +>R04 : Symbol(R04, Decl(variadicTuples1.ts, 250, 57)) +>First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) type R05 = First; ->R05 : Symbol(R05, Decl(variadicTuples1.ts, 221, 49)) ->First : Symbol(First, Decl(variadicTuples1.ts, 167, 1)) +>R05 : Symbol(R05, Decl(variadicTuples1.ts, 251, 49)) +>First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) type R06 = First; ->R06 : Symbol(R06, Decl(variadicTuples1.ts, 222, 36)) ->First : Symbol(First, Decl(variadicTuples1.ts, 167, 1)) +>R06 : Symbol(R06, Decl(variadicTuples1.ts, 252, 36)) +>First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) type R10 = DropFirst; ->R10 : Symbol(R10, Decl(variadicTuples1.ts, 223, 30)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 171, 48)) +>R10 : Symbol(R10, Decl(variadicTuples1.ts, 253, 30)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) type R11 = DropFirst; ->R11 : Symbol(R11, Decl(variadicTuples1.ts, 225, 56)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 171, 48)) +>R11 : Symbol(R11, Decl(variadicTuples1.ts, 255, 56)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) type R12 = DropFirst; ->R12 : Symbol(R12, Decl(variadicTuples1.ts, 226, 48)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 171, 48)) +>R12 : Symbol(R12, Decl(variadicTuples1.ts, 256, 48)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) type R13 = DropFirst; ->R13 : Symbol(R13, Decl(variadicTuples1.ts, 227, 40)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 171, 48)) +>R13 : Symbol(R13, Decl(variadicTuples1.ts, 257, 40)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) type R14 = DropFirst; ->R14 : Symbol(R14, Decl(variadicTuples1.ts, 228, 61)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 171, 48)) +>R14 : Symbol(R14, Decl(variadicTuples1.ts, 258, 61)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) type R15 = DropFirst; ->R15 : Symbol(R15, Decl(variadicTuples1.ts, 229, 53)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 171, 48)) +>R15 : Symbol(R15, Decl(variadicTuples1.ts, 259, 53)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) type R16 = DropFirst; ->R16 : Symbol(R16, Decl(variadicTuples1.ts, 230, 40)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 171, 48)) +>R16 : Symbol(R16, Decl(variadicTuples1.ts, 260, 40)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) type R20 = Last; ->R20 : Symbol(R20, Decl(variadicTuples1.ts, 231, 34)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 172, 97)) +>R20 : Symbol(R20, Decl(variadicTuples1.ts, 261, 34)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) type R21 = Last; ->R21 : Symbol(R21, Decl(variadicTuples1.ts, 233, 51)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 172, 97)) +>R21 : Symbol(R21, Decl(variadicTuples1.ts, 263, 51)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) type R22 = Last; ->R22 : Symbol(R22, Decl(variadicTuples1.ts, 234, 43)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 172, 97)) +>R22 : Symbol(R22, Decl(variadicTuples1.ts, 264, 43)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) type R23 = Last; ->R23 : Symbol(R23, Decl(variadicTuples1.ts, 235, 35)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 172, 97)) +>R23 : Symbol(R23, Decl(variadicTuples1.ts, 265, 35)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) type R24 = Last; ->R24 : Symbol(R24, Decl(variadicTuples1.ts, 236, 56)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 172, 97)) +>R24 : Symbol(R24, Decl(variadicTuples1.ts, 266, 56)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) type R25 = Last; ->R25 : Symbol(R25, Decl(variadicTuples1.ts, 237, 48)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 172, 97)) +>R25 : Symbol(R25, Decl(variadicTuples1.ts, 267, 48)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) type R26 = Last; ->R26 : Symbol(R26, Decl(variadicTuples1.ts, 238, 35)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 172, 97)) +>R26 : Symbol(R26, Decl(variadicTuples1.ts, 268, 35)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) type R30 = DropLast; ->R30 : Symbol(R30, Decl(variadicTuples1.ts, 239, 29)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 174, 99)) +>R30 : Symbol(R30, Decl(variadicTuples1.ts, 269, 29)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) type R31 = DropLast; ->R31 : Symbol(R31, Decl(variadicTuples1.ts, 241, 55)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 174, 99)) +>R31 : Symbol(R31, Decl(variadicTuples1.ts, 271, 55)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) type R32 = DropLast; ->R32 : Symbol(R32, Decl(variadicTuples1.ts, 242, 47)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 174, 99)) +>R32 : Symbol(R32, Decl(variadicTuples1.ts, 272, 47)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) type R33 = DropLast; ->R33 : Symbol(R33, Decl(variadicTuples1.ts, 243, 39)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 174, 99)) +>R33 : Symbol(R33, Decl(variadicTuples1.ts, 273, 39)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) type R34 = DropLast; ->R34 : Symbol(R34, Decl(variadicTuples1.ts, 244, 60)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 174, 99)) +>R34 : Symbol(R34, Decl(variadicTuples1.ts, 274, 60)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) type R35 = DropLast; ->R35 : Symbol(R35, Decl(variadicTuples1.ts, 245, 52)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 174, 99)) +>R35 : Symbol(R35, Decl(variadicTuples1.ts, 275, 52)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) type R36 = DropLast; ->R36 : Symbol(R36, Decl(variadicTuples1.ts, 246, 39)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 174, 99)) +>R36 : Symbol(R36, Decl(variadicTuples1.ts, 276, 39)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) // Inference to [...T, ...U] with implied arity for T function curry(f: (...args: [...T, ...U]) => R, ...a: T) { ->curry : Symbol(curry, Decl(variadicTuples1.ts, 247, 33)) ->T : Symbol(T, Decl(variadicTuples1.ts, 251, 15)) ->U : Symbol(U, Decl(variadicTuples1.ts, 251, 35)) ->R : Symbol(R, Decl(variadicTuples1.ts, 251, 56)) ->f : Symbol(f, Decl(variadicTuples1.ts, 251, 60)) ->args : Symbol(args, Decl(variadicTuples1.ts, 251, 64)) ->T : Symbol(T, Decl(variadicTuples1.ts, 251, 15)) ->U : Symbol(U, Decl(variadicTuples1.ts, 251, 35)) ->R : Symbol(R, Decl(variadicTuples1.ts, 251, 56)) ->a : Symbol(a, Decl(variadicTuples1.ts, 251, 92)) ->T : Symbol(T, Decl(variadicTuples1.ts, 251, 15)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) +>T : Symbol(T, Decl(variadicTuples1.ts, 281, 15)) +>U : Symbol(U, Decl(variadicTuples1.ts, 281, 35)) +>R : Symbol(R, Decl(variadicTuples1.ts, 281, 56)) +>f : Symbol(f, Decl(variadicTuples1.ts, 281, 60)) +>args : Symbol(args, Decl(variadicTuples1.ts, 281, 64)) +>T : Symbol(T, Decl(variadicTuples1.ts, 281, 15)) +>U : Symbol(U, Decl(variadicTuples1.ts, 281, 35)) +>R : Symbol(R, Decl(variadicTuples1.ts, 281, 56)) +>a : Symbol(a, Decl(variadicTuples1.ts, 281, 92)) +>T : Symbol(T, Decl(variadicTuples1.ts, 281, 15)) return (...b: U) => f(...a, ...b); ->b : Symbol(b, Decl(variadicTuples1.ts, 252, 12)) ->U : Symbol(U, Decl(variadicTuples1.ts, 251, 35)) ->f : Symbol(f, Decl(variadicTuples1.ts, 251, 60)) ->a : Symbol(a, Decl(variadicTuples1.ts, 251, 92)) ->b : Symbol(b, Decl(variadicTuples1.ts, 252, 12)) +>b : Symbol(b, Decl(variadicTuples1.ts, 282, 12)) +>U : Symbol(U, Decl(variadicTuples1.ts, 281, 35)) +>f : Symbol(f, Decl(variadicTuples1.ts, 281, 60)) +>a : Symbol(a, Decl(variadicTuples1.ts, 281, 92)) +>b : Symbol(b, Decl(variadicTuples1.ts, 282, 12)) } const fn1 = (a: number, b: string, c: boolean, d: string[]) => 0; ->fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 255, 5)) ->a : Symbol(a, Decl(variadicTuples1.ts, 255, 13)) ->b : Symbol(b, Decl(variadicTuples1.ts, 255, 23)) ->c : Symbol(c, Decl(variadicTuples1.ts, 255, 34)) ->d : Symbol(d, Decl(variadicTuples1.ts, 255, 46)) +>fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 285, 5)) +>a : Symbol(a, Decl(variadicTuples1.ts, 285, 13)) +>b : Symbol(b, Decl(variadicTuples1.ts, 285, 23)) +>c : Symbol(c, Decl(variadicTuples1.ts, 285, 34)) +>d : Symbol(d, Decl(variadicTuples1.ts, 285, 46)) const c0 = curry(fn1); // (a: number, b: string, c: boolean, d: string[]) => number ->c0 : Symbol(c0, Decl(variadicTuples1.ts, 257, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 247, 33)) ->fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 255, 5)) +>c0 : Symbol(c0, Decl(variadicTuples1.ts, 287, 5)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) +>fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 285, 5)) const c1 = curry(fn1, 1); // (b: string, c: boolean, d: string[]) => number ->c1 : Symbol(c1, Decl(variadicTuples1.ts, 258, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 247, 33)) ->fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 255, 5)) +>c1 : Symbol(c1, Decl(variadicTuples1.ts, 288, 5)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) +>fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 285, 5)) const c2 = curry(fn1, 1, 'abc'); // (c: boolean, d: string[]) => number ->c2 : Symbol(c2, Decl(variadicTuples1.ts, 259, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 247, 33)) ->fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 255, 5)) +>c2 : Symbol(c2, Decl(variadicTuples1.ts, 289, 5)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) +>fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 285, 5)) const c3 = curry(fn1, 1, 'abc', true); // (d: string[]) => number ->c3 : Symbol(c3, Decl(variadicTuples1.ts, 260, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 247, 33)) ->fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 255, 5)) +>c3 : Symbol(c3, Decl(variadicTuples1.ts, 290, 5)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) +>fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 285, 5)) const c4 = curry(fn1, 1, 'abc', true, ['x', 'y']); // () => number ->c4 : Symbol(c4, Decl(variadicTuples1.ts, 261, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 247, 33)) ->fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 255, 5)) +>c4 : Symbol(c4, Decl(variadicTuples1.ts, 291, 5)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) +>fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 285, 5)) const fn2 = (x: number, b: boolean, ...args: string[]) => 0; ->fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 263, 5)) ->x : Symbol(x, Decl(variadicTuples1.ts, 263, 13)) ->b : Symbol(b, Decl(variadicTuples1.ts, 263, 23)) ->args : Symbol(args, Decl(variadicTuples1.ts, 263, 35)) +>fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 293, 5)) +>x : Symbol(x, Decl(variadicTuples1.ts, 293, 13)) +>b : Symbol(b, Decl(variadicTuples1.ts, 293, 23)) +>args : Symbol(args, Decl(variadicTuples1.ts, 293, 35)) const c10 = curry(fn2); // (x: number, b: boolean, ...args: string[]) => number ->c10 : Symbol(c10, Decl(variadicTuples1.ts, 265, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 247, 33)) ->fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 263, 5)) +>c10 : Symbol(c10, Decl(variadicTuples1.ts, 295, 5)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) +>fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 293, 5)) const c11 = curry(fn2, 1); // (b: boolean, ...args: string[]) => number ->c11 : Symbol(c11, Decl(variadicTuples1.ts, 266, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 247, 33)) ->fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 263, 5)) +>c11 : Symbol(c11, Decl(variadicTuples1.ts, 296, 5)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) +>fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 293, 5)) const c12 = curry(fn2, 1, true); // (...args: string[]) => number ->c12 : Symbol(c12, Decl(variadicTuples1.ts, 267, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 247, 33)) ->fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 263, 5)) +>c12 : Symbol(c12, Decl(variadicTuples1.ts, 297, 5)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) +>fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 293, 5)) const c13 = curry(fn2, 1, true, 'abc', 'def'); // (...args: string[]) => number ->c13 : Symbol(c13, Decl(variadicTuples1.ts, 268, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 247, 33)) ->fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 263, 5)) +>c13 : Symbol(c13, Decl(variadicTuples1.ts, 298, 5)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) +>fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 293, 5)) const fn3 = (...args: string[]) => 0; ->fn3 : Symbol(fn3, Decl(variadicTuples1.ts, 270, 5)) ->args : Symbol(args, Decl(variadicTuples1.ts, 270, 13)) +>fn3 : Symbol(fn3, Decl(variadicTuples1.ts, 300, 5)) +>args : Symbol(args, Decl(variadicTuples1.ts, 300, 13)) const c20 = curry(fn3); // (...args: string[]) => number ->c20 : Symbol(c20, Decl(variadicTuples1.ts, 272, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 247, 33)) ->fn3 : Symbol(fn3, Decl(variadicTuples1.ts, 270, 5)) +>c20 : Symbol(c20, Decl(variadicTuples1.ts, 302, 5)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) +>fn3 : Symbol(fn3, Decl(variadicTuples1.ts, 300, 5)) const c21 = curry(fn3, 'abc', 'def'); // (...args: string[]) => number ->c21 : Symbol(c21, Decl(variadicTuples1.ts, 273, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 247, 33)) ->fn3 : Symbol(fn3, Decl(variadicTuples1.ts, 270, 5)) +>c21 : Symbol(c21, Decl(variadicTuples1.ts, 303, 5)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) +>fn3 : Symbol(fn3, Decl(variadicTuples1.ts, 300, 5)) const c22 = curry(fn3, ...sa); // (...args: string[]) => number ->c22 : Symbol(c22, Decl(variadicTuples1.ts, 274, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 247, 33)) ->fn3 : Symbol(fn3, Decl(variadicTuples1.ts, 270, 5)) +>c22 : Symbol(c22, Decl(variadicTuples1.ts, 304, 5)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) +>fn3 : Symbol(fn3, Decl(variadicTuples1.ts, 300, 5)) >sa : Symbol(sa, Decl(variadicTuples1.ts, 29, 13)) // No inference to [...T, ...U] when there is no implied arity function curry2(f: (...args: [...T, ...U]) => R, t: [...T], u: [...U]) { ->curry2 : Symbol(curry2, Decl(variadicTuples1.ts, 274, 30)) ->T : Symbol(T, Decl(variadicTuples1.ts, 278, 16)) ->U : Symbol(U, Decl(variadicTuples1.ts, 278, 36)) ->R : Symbol(R, Decl(variadicTuples1.ts, 278, 57)) ->f : Symbol(f, Decl(variadicTuples1.ts, 278, 61)) ->args : Symbol(args, Decl(variadicTuples1.ts, 278, 65)) ->T : Symbol(T, Decl(variadicTuples1.ts, 278, 16)) ->U : Symbol(U, Decl(variadicTuples1.ts, 278, 36)) ->R : Symbol(R, Decl(variadicTuples1.ts, 278, 57)) ->t : Symbol(t, Decl(variadicTuples1.ts, 278, 93)) ->T : Symbol(T, Decl(variadicTuples1.ts, 278, 16)) ->u : Symbol(u, Decl(variadicTuples1.ts, 278, 104)) ->U : Symbol(U, Decl(variadicTuples1.ts, 278, 36)) +>curry2 : Symbol(curry2, Decl(variadicTuples1.ts, 304, 30)) +>T : Symbol(T, Decl(variadicTuples1.ts, 308, 16)) +>U : Symbol(U, Decl(variadicTuples1.ts, 308, 36)) +>R : Symbol(R, Decl(variadicTuples1.ts, 308, 57)) +>f : Symbol(f, Decl(variadicTuples1.ts, 308, 61)) +>args : Symbol(args, Decl(variadicTuples1.ts, 308, 65)) +>T : Symbol(T, Decl(variadicTuples1.ts, 308, 16)) +>U : Symbol(U, Decl(variadicTuples1.ts, 308, 36)) +>R : Symbol(R, Decl(variadicTuples1.ts, 308, 57)) +>t : Symbol(t, Decl(variadicTuples1.ts, 308, 93)) +>T : Symbol(T, Decl(variadicTuples1.ts, 308, 16)) +>u : Symbol(u, Decl(variadicTuples1.ts, 308, 104)) +>U : Symbol(U, Decl(variadicTuples1.ts, 308, 36)) return f(...t, ...u); ->f : Symbol(f, Decl(variadicTuples1.ts, 278, 61)) ->t : Symbol(t, Decl(variadicTuples1.ts, 278, 93)) ->u : Symbol(u, Decl(variadicTuples1.ts, 278, 104)) +>f : Symbol(f, Decl(variadicTuples1.ts, 308, 61)) +>t : Symbol(t, Decl(variadicTuples1.ts, 308, 93)) +>u : Symbol(u, Decl(variadicTuples1.ts, 308, 104)) } declare function fn10(a: string, b: number, c: boolean): string[]; ->fn10 : Symbol(fn10, Decl(variadicTuples1.ts, 280, 1)) ->a : Symbol(a, Decl(variadicTuples1.ts, 282, 22)) ->b : Symbol(b, Decl(variadicTuples1.ts, 282, 32)) ->c : Symbol(c, Decl(variadicTuples1.ts, 282, 43)) +>fn10 : Symbol(fn10, Decl(variadicTuples1.ts, 310, 1)) +>a : Symbol(a, Decl(variadicTuples1.ts, 312, 22)) +>b : Symbol(b, Decl(variadicTuples1.ts, 312, 32)) +>c : Symbol(c, Decl(variadicTuples1.ts, 312, 43)) curry2(fn10, ['hello', 42], [true]); ->curry2 : Symbol(curry2, Decl(variadicTuples1.ts, 274, 30)) ->fn10 : Symbol(fn10, Decl(variadicTuples1.ts, 280, 1)) +>curry2 : Symbol(curry2, Decl(variadicTuples1.ts, 304, 30)) +>fn10 : Symbol(fn10, Decl(variadicTuples1.ts, 310, 1)) curry2(fn10, ['hello'], [42, true]); ->curry2 : Symbol(curry2, Decl(variadicTuples1.ts, 274, 30)) ->fn10 : Symbol(fn10, Decl(variadicTuples1.ts, 280, 1)) +>curry2 : Symbol(curry2, Decl(variadicTuples1.ts, 304, 30)) +>fn10 : Symbol(fn10, Decl(variadicTuples1.ts, 310, 1)) // Last argument is contextually typed declare function call(...args: [...T, (...args: T) => R]): [T, R]; ->call : Symbol(call, Decl(variadicTuples1.ts, 285, 36)) ->T : Symbol(T, Decl(variadicTuples1.ts, 289, 22)) ->R : Symbol(R, Decl(variadicTuples1.ts, 289, 42)) ->args : Symbol(args, Decl(variadicTuples1.ts, 289, 46)) ->T : Symbol(T, Decl(variadicTuples1.ts, 289, 22)) ->args : Symbol(args, Decl(variadicTuples1.ts, 289, 63)) ->T : Symbol(T, Decl(variadicTuples1.ts, 289, 22)) ->R : Symbol(R, Decl(variadicTuples1.ts, 289, 42)) ->T : Symbol(T, Decl(variadicTuples1.ts, 289, 22)) ->R : Symbol(R, Decl(variadicTuples1.ts, 289, 42)) +>call : Symbol(call, Decl(variadicTuples1.ts, 315, 36)) +>T : Symbol(T, Decl(variadicTuples1.ts, 319, 22)) +>R : Symbol(R, Decl(variadicTuples1.ts, 319, 42)) +>args : Symbol(args, Decl(variadicTuples1.ts, 319, 46)) +>T : Symbol(T, Decl(variadicTuples1.ts, 319, 22)) +>args : Symbol(args, Decl(variadicTuples1.ts, 319, 63)) +>T : Symbol(T, Decl(variadicTuples1.ts, 319, 22)) +>R : Symbol(R, Decl(variadicTuples1.ts, 319, 42)) +>T : Symbol(T, Decl(variadicTuples1.ts, 319, 22)) +>R : Symbol(R, Decl(variadicTuples1.ts, 319, 42)) call('hello', 32, (a, b) => 42); ->call : Symbol(call, Decl(variadicTuples1.ts, 285, 36)) ->a : Symbol(a, Decl(variadicTuples1.ts, 291, 19)) ->b : Symbol(b, Decl(variadicTuples1.ts, 291, 21)) +>call : Symbol(call, Decl(variadicTuples1.ts, 315, 36)) +>a : Symbol(a, Decl(variadicTuples1.ts, 321, 19)) +>b : Symbol(b, Decl(variadicTuples1.ts, 321, 21)) // Would be nice to infer [...string[], (...args: string[]) => number] here // Requires [starting-fixed-part, ...rest-part, ending-fixed-part] tuple structure call(...sa, (...x) => 42); ->call : Symbol(call, Decl(variadicTuples1.ts, 285, 36)) +>call : Symbol(call, Decl(variadicTuples1.ts, 315, 36)) >sa : Symbol(sa, Decl(variadicTuples1.ts, 29, 13)) ->x : Symbol(x, Decl(variadicTuples1.ts, 296, 13)) +>x : Symbol(x, Decl(variadicTuples1.ts, 326, 13)) diff --git a/tests/baselines/reference/variadicTuples1.types b/tests/baselines/reference/variadicTuples1.types index 616127e76172c..203917cc7f10c 100644 --- a/tests/baselines/reference/variadicTuples1.types +++ b/tests/baselines/reference/variadicTuples1.types @@ -615,6 +615,133 @@ function f12(t: T, m: [...T], r: readonly [...T]) >m : [...T] } +function f13(t0: T, t1: [...T], t2: [...U]) { +>f13 : (t0: T, t1: [...T], t2: [...U]) => void +>t0 : T +>t1 : [...T] +>t2 : [...U] + + t0 = t1; +>t0 = t1 : [...T] +>t0 : T +>t1 : [...T] + + t0 = t2; +>t0 = t2 : [...U] +>t0 : T +>t2 : [...U] + + t1 = t0; +>t1 = t0 : T +>t1 : [...T] +>t0 : T + + t1 = t2; +>t1 = t2 : [...U] +>t1 : [...T] +>t2 : [...U] + + t2 = t0; // Error +>t2 = t0 : T +>t2 : [...U] +>t0 : T + + t2 = t1; // Error +>t2 = t1 : [...T] +>t2 : [...U] +>t1 : [...T] +} + +function f14(t0: T, t1: [...T], t2: [...U]) { +>f14 : (t0: T, t1: [...T], t2: [...U]) => void +>t0 : T +>t1 : [...T] +>t2 : [...U] + + t0 = t1; +>t0 = t1 : [...T] +>t0 : T +>t1 : [...T] + + t0 = t2; +>t0 = t2 : [...U] +>t0 : T +>t2 : [...U] + + t1 = t0; // Error +>t1 = t0 : T +>t1 : [...T] +>t0 : T + + t1 = t2; +>t1 = t2 : [...U] +>t1 : [...T] +>t2 : [...U] + + t2 = t0; // Error +>t2 = t0 : T +>t2 : [...U] +>t0 : T + + t2 = t1; // Error +>t2 = t1 : [...T] +>t2 : [...U] +>t1 : [...T] +} + +function f15(k0: keyof T, k1: keyof [...T], k2: keyof [...U], k3: keyof [1, 2, ...T]) { +>f15 : (k0: keyof T, k1: keyof [...T], k2: keyof [...U], k3: keyof [1, 2, ...T]) => void +>k0 : keyof T +>k1 : keyof [...T] +>k2 : keyof [...U] +>k3 : keyof [1, 2, ...T] + + k0 = 'length'; +>k0 = 'length' : "length" +>k0 : keyof T +>'length' : "length" + + k1 = 'length'; +>k1 = 'length' : "length" +>k1 : keyof [...T] +>'length' : "length" + + k2 = 'length'; +>k2 = 'length' : "length" +>k2 : keyof [...U] +>'length' : "length" + + k0 = 'slice'; +>k0 = 'slice' : "slice" +>k0 : keyof T +>'slice' : "slice" + + k1 = 'slice'; +>k1 = 'slice' : "slice" +>k1 : keyof [...T] +>'slice' : "slice" + + k2 = 'slice'; +>k2 = 'slice' : "slice" +>k2 : keyof [...U] +>'slice' : "slice" + + k3 = '0'; +>k3 = '0' : "0" +>k3 : keyof [1, 2, ...T] +>'0' : "0" + + k3 = '1'; +>k3 = '1' : "1" +>k3 : keyof [1, 2, ...T] +>'1' : "1" + + k3 = '2'; // Error +>k3 = '2' : "2" +>k3 : keyof [1, 2, ...T] +>'2' : "2" +} + // Inference between variadic tuple types type First = T[0]; From 13103708caf3251eed07a053cdbe9747fac67e65 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Wed, 24 Jun 2020 11:04:15 -0700 Subject: [PATCH 4/5] Address CR feedback --- src/compiler/checker.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 88f3a55f3e91b..4d61d6cd9a1df 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10195,8 +10195,8 @@ namespace ts { return type; } if (type.flags & TypeFlags.Index) { - const t = (type).type; - return isTupleType(t) ? getKnownKeysOfTupleType(t) : getIndexType(getApparentType(t)); + const t = getApparentType((type).type); + return isGenericTupleType(t) ? getKnownKeysOfTupleType(t) : getIndexType(t); } if (type.flags & TypeFlags.Conditional) { if ((type).root.isDistributive) { From 12f49c605a57c5206a3a1cba77441ee23a19ad93 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Thu, 25 Jun 2020 12:38:55 -0700 Subject: [PATCH 5/5] Accept new baselines --- .../reference/variadicTuples1.errors.txt | 21 +- .../reference/variadicTuples1.symbols | 1077 +++++------------ 2 files changed, 336 insertions(+), 762 deletions(-) diff --git a/tests/baselines/reference/variadicTuples1.errors.txt b/tests/baselines/reference/variadicTuples1.errors.txt index e855d0bb8deda..6ccc9daa42b4b 100644 --- a/tests/baselines/reference/variadicTuples1.errors.txt +++ b/tests/baselines/reference/variadicTuples1.errors.txt @@ -20,7 +20,26 @@ tests/cases/conformance/types/tuple/variadicTuples1.ts(169,5): error TS2322: Typ tests/cases/conformance/types/tuple/variadicTuples1.ts(170,5): error TS2322: Type 'T' is not assignable to type '[...T]'. The type 'readonly unknown[]' is 'readonly' and cannot be assigned to the mutable type '[...T]'. tests/cases/conformance/types/tuple/variadicTuples1.ts(171,5): error TS4104: The type 'readonly [...T]' is 'readonly' and cannot be assigned to the mutable type '[...T]'. -tests/cases/conformance/types/tuple/variadicTuples1.ts(303,14): error TS7019: Rest parameter 'x' implicitly has an 'any[]' type. +tests/cases/conformance/types/tuple/variadicTuples1.ts(181,5): error TS2322: Type 'T' is not assignable to type '[...U]'. + Type 'string[]' is not assignable to type '[...U]'. + Target requires 1 element(s) but source may have fewer. +tests/cases/conformance/types/tuple/variadicTuples1.ts(182,5): error TS2322: Type '[...T]' is not assignable to type '[...U]'. + Type 'T' is not assignable to type 'U'. + 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'string[]'. + Type 'string[]' is not assignable to type 'U'. + 'U' could be instantiated with an arbitrary type which could be unrelated to 'string[]'. +tests/cases/conformance/types/tuple/variadicTuples1.ts(188,5): error TS2322: Type 'T' is not assignable to type '[...T]'. + The type 'readonly string[]' is 'readonly' and cannot be assigned to the mutable type '[...T]'. +tests/cases/conformance/types/tuple/variadicTuples1.ts(190,5): error TS2322: Type 'T' is not assignable to type '[...U]'. + The type 'readonly string[]' is 'readonly' and cannot be assigned to the mutable type '[...U]'. +tests/cases/conformance/types/tuple/variadicTuples1.ts(191,5): error TS2322: Type '[...T]' is not assignable to type '[...U]'. + Type 'T' is not assignable to type 'U'. + 'T' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'readonly string[]'. + Type 'readonly string[]' is not assignable to type 'U'. + 'U' could be instantiated with an arbitrary type which could be unrelated to 'readonly string[]'. +tests/cases/conformance/types/tuple/variadicTuples1.ts(203,5): error TS2322: Type 'string' is not assignable to type 'keyof [1, 2, ...T]'. + Type '"2"' is not assignable to type 'number | "0" | "length" | "toString" | "toLocaleString" | "pop" | "push" | "concat" | "join" | "reverse" | "shift" | "slice" | "sort" | "splice" | "unshift" | "indexOf" | "lastIndexOf" | "every" | "some" | "forEach" | "map" | "filter" | "reduce" | "reduceRight" | "1"'. +tests/cases/conformance/types/tuple/variadicTuples1.ts(333,14): error TS7019: Rest parameter 'x' implicitly has an 'any[]' type. ==== tests/cases/conformance/types/tuple/variadicTuples1.ts (19 errors) ==== diff --git a/tests/baselines/reference/variadicTuples1.symbols b/tests/baselines/reference/variadicTuples1.symbols index f9cb516c319f8..fe83d5f0bd7cc 100644 --- a/tests/baselines/reference/variadicTuples1.symbols +++ b/tests/baselines/reference/variadicTuples1.symbols @@ -574,1015 +574,570 @@ function f12(t: T, m: [...T], r: readonly [...T]) } function f13(t0: T, t1: [...T], t2: [...U]) { ->f13 : Symbol(f13, Decl(variadicTuples1.ts, 167, 1)) ->T : Symbol(T, Decl(variadicTuples1.ts, 169, 13)) ->U : Symbol(U, Decl(variadicTuples1.ts, 169, 32)) ->T : Symbol(T, Decl(variadicTuples1.ts, 169, 13)) ->t0 : Symbol(t0, Decl(variadicTuples1.ts, 169, 46)) ->T : Symbol(T, Decl(variadicTuples1.ts, 169, 13)) ->t1 : Symbol(t1, Decl(variadicTuples1.ts, 169, 52)) ->T : Symbol(T, Decl(variadicTuples1.ts, 169, 13)) ->t2 : Symbol(t2, Decl(variadicTuples1.ts, 169, 64)) ->U : Symbol(U, Decl(variadicTuples1.ts, 169, 32)) +>f13 : Symbol(f13, Decl(variadicTuples1.ts, 173, 1)) +>T : Symbol(T, Decl(variadicTuples1.ts, 175, 13)) +>U : Symbol(U, Decl(variadicTuples1.ts, 175, 32)) +>T : Symbol(T, Decl(variadicTuples1.ts, 175, 13)) +>t0 : Symbol(t0, Decl(variadicTuples1.ts, 175, 46)) +>T : Symbol(T, Decl(variadicTuples1.ts, 175, 13)) +>t1 : Symbol(t1, Decl(variadicTuples1.ts, 175, 52)) +>T : Symbol(T, Decl(variadicTuples1.ts, 175, 13)) +>t2 : Symbol(t2, Decl(variadicTuples1.ts, 175, 64)) +>U : Symbol(U, Decl(variadicTuples1.ts, 175, 32)) t0 = t1; ->t0 : Symbol(t0, Decl(variadicTuples1.ts, 169, 46)) ->t1 : Symbol(t1, Decl(variadicTuples1.ts, 169, 52)) +>t0 : Symbol(t0, Decl(variadicTuples1.ts, 175, 46)) +>t1 : Symbol(t1, Decl(variadicTuples1.ts, 175, 52)) t0 = t2; ->t0 : Symbol(t0, Decl(variadicTuples1.ts, 169, 46)) ->t2 : Symbol(t2, Decl(variadicTuples1.ts, 169, 64)) +>t0 : Symbol(t0, Decl(variadicTuples1.ts, 175, 46)) +>t2 : Symbol(t2, Decl(variadicTuples1.ts, 175, 64)) t1 = t0; ->t1 : Symbol(t1, Decl(variadicTuples1.ts, 169, 52)) ->t0 : Symbol(t0, Decl(variadicTuples1.ts, 169, 46)) +>t1 : Symbol(t1, Decl(variadicTuples1.ts, 175, 52)) +>t0 : Symbol(t0, Decl(variadicTuples1.ts, 175, 46)) t1 = t2; ->t1 : Symbol(t1, Decl(variadicTuples1.ts, 169, 52)) ->t2 : Symbol(t2, Decl(variadicTuples1.ts, 169, 64)) +>t1 : Symbol(t1, Decl(variadicTuples1.ts, 175, 52)) +>t2 : Symbol(t2, Decl(variadicTuples1.ts, 175, 64)) t2 = t0; // Error ->t2 : Symbol(t2, Decl(variadicTuples1.ts, 169, 64)) ->t0 : Symbol(t0, Decl(variadicTuples1.ts, 169, 46)) +>t2 : Symbol(t2, Decl(variadicTuples1.ts, 175, 64)) +>t0 : Symbol(t0, Decl(variadicTuples1.ts, 175, 46)) t2 = t1; // Error ->t2 : Symbol(t2, Decl(variadicTuples1.ts, 169, 64)) ->t1 : Symbol(t1, Decl(variadicTuples1.ts, 169, 52)) +>t2 : Symbol(t2, Decl(variadicTuples1.ts, 175, 64)) +>t1 : Symbol(t1, Decl(variadicTuples1.ts, 175, 52)) } function f14(t0: T, t1: [...T], t2: [...U]) { ->f14 : Symbol(f14, Decl(variadicTuples1.ts, 176, 1)) ->T : Symbol(T, Decl(variadicTuples1.ts, 178, 13)) ->U : Symbol(U, Decl(variadicTuples1.ts, 178, 41)) ->T : Symbol(T, Decl(variadicTuples1.ts, 178, 13)) ->t0 : Symbol(t0, Decl(variadicTuples1.ts, 178, 55)) ->T : Symbol(T, Decl(variadicTuples1.ts, 178, 13)) ->t1 : Symbol(t1, Decl(variadicTuples1.ts, 178, 61)) ->T : Symbol(T, Decl(variadicTuples1.ts, 178, 13)) ->t2 : Symbol(t2, Decl(variadicTuples1.ts, 178, 73)) ->U : Symbol(U, Decl(variadicTuples1.ts, 178, 41)) +>f14 : Symbol(f14, Decl(variadicTuples1.ts, 182, 1)) +>T : Symbol(T, Decl(variadicTuples1.ts, 184, 13)) +>U : Symbol(U, Decl(variadicTuples1.ts, 184, 41)) +>T : Symbol(T, Decl(variadicTuples1.ts, 184, 13)) +>t0 : Symbol(t0, Decl(variadicTuples1.ts, 184, 55)) +>T : Symbol(T, Decl(variadicTuples1.ts, 184, 13)) +>t1 : Symbol(t1, Decl(variadicTuples1.ts, 184, 61)) +>T : Symbol(T, Decl(variadicTuples1.ts, 184, 13)) +>t2 : Symbol(t2, Decl(variadicTuples1.ts, 184, 73)) +>U : Symbol(U, Decl(variadicTuples1.ts, 184, 41)) t0 = t1; ->t0 : Symbol(t0, Decl(variadicTuples1.ts, 178, 55)) ->t1 : Symbol(t1, Decl(variadicTuples1.ts, 178, 61)) +>t0 : Symbol(t0, Decl(variadicTuples1.ts, 184, 55)) +>t1 : Symbol(t1, Decl(variadicTuples1.ts, 184, 61)) t0 = t2; ->t0 : Symbol(t0, Decl(variadicTuples1.ts, 178, 55)) ->t2 : Symbol(t2, Decl(variadicTuples1.ts, 178, 73)) +>t0 : Symbol(t0, Decl(variadicTuples1.ts, 184, 55)) +>t2 : Symbol(t2, Decl(variadicTuples1.ts, 184, 73)) t1 = t0; // Error ->t1 : Symbol(t1, Decl(variadicTuples1.ts, 178, 61)) ->t0 : Symbol(t0, Decl(variadicTuples1.ts, 178, 55)) +>t1 : Symbol(t1, Decl(variadicTuples1.ts, 184, 61)) +>t0 : Symbol(t0, Decl(variadicTuples1.ts, 184, 55)) t1 = t2; ->t1 : Symbol(t1, Decl(variadicTuples1.ts, 178, 61)) ->t2 : Symbol(t2, Decl(variadicTuples1.ts, 178, 73)) +>t1 : Symbol(t1, Decl(variadicTuples1.ts, 184, 61)) +>t2 : Symbol(t2, Decl(variadicTuples1.ts, 184, 73)) t2 = t0; // Error ->t2 : Symbol(t2, Decl(variadicTuples1.ts, 178, 73)) ->t0 : Symbol(t0, Decl(variadicTuples1.ts, 178, 55)) +>t2 : Symbol(t2, Decl(variadicTuples1.ts, 184, 73)) +>t0 : Symbol(t0, Decl(variadicTuples1.ts, 184, 55)) t2 = t1; // Error ->t2 : Symbol(t2, Decl(variadicTuples1.ts, 178, 73)) ->t1 : Symbol(t1, Decl(variadicTuples1.ts, 178, 61)) +>t2 : Symbol(t2, Decl(variadicTuples1.ts, 184, 73)) +>t1 : Symbol(t1, Decl(variadicTuples1.ts, 184, 61)) } function f15(k0: keyof T, k1: keyof [...T], k2: keyof [...U], k3: keyof [1, 2, ...T]) { ->f15 : Symbol(f15, Decl(variadicTuples1.ts, 185, 1)) ->T : Symbol(T, Decl(variadicTuples1.ts, 187, 13)) ->U : Symbol(U, Decl(variadicTuples1.ts, 187, 32)) ->T : Symbol(T, Decl(variadicTuples1.ts, 187, 13)) ->k0 : Symbol(k0, Decl(variadicTuples1.ts, 187, 46)) ->T : Symbol(T, Decl(variadicTuples1.ts, 187, 13)) ->k1 : Symbol(k1, Decl(variadicTuples1.ts, 187, 58)) ->T : Symbol(T, Decl(variadicTuples1.ts, 187, 13)) ->k2 : Symbol(k2, Decl(variadicTuples1.ts, 187, 76)) ->U : Symbol(U, Decl(variadicTuples1.ts, 187, 32)) ->k3 : Symbol(k3, Decl(variadicTuples1.ts, 187, 94)) ->T : Symbol(T, Decl(variadicTuples1.ts, 187, 13)) +>f15 : Symbol(f15, Decl(variadicTuples1.ts, 191, 1)) +>T : Symbol(T, Decl(variadicTuples1.ts, 193, 13)) +>U : Symbol(U, Decl(variadicTuples1.ts, 193, 32)) +>T : Symbol(T, Decl(variadicTuples1.ts, 193, 13)) +>k0 : Symbol(k0, Decl(variadicTuples1.ts, 193, 46)) +>T : Symbol(T, Decl(variadicTuples1.ts, 193, 13)) +>k1 : Symbol(k1, Decl(variadicTuples1.ts, 193, 58)) +>T : Symbol(T, Decl(variadicTuples1.ts, 193, 13)) +>k2 : Symbol(k2, Decl(variadicTuples1.ts, 193, 76)) +>U : Symbol(U, Decl(variadicTuples1.ts, 193, 32)) +>k3 : Symbol(k3, Decl(variadicTuples1.ts, 193, 94)) +>T : Symbol(T, Decl(variadicTuples1.ts, 193, 13)) k0 = 'length'; ->k0 : Symbol(k0, Decl(variadicTuples1.ts, 187, 46)) +>k0 : Symbol(k0, Decl(variadicTuples1.ts, 193, 46)) k1 = 'length'; ->k1 : Symbol(k1, Decl(variadicTuples1.ts, 187, 58)) +>k1 : Symbol(k1, Decl(variadicTuples1.ts, 193, 58)) k2 = 'length'; ->k2 : Symbol(k2, Decl(variadicTuples1.ts, 187, 76)) +>k2 : Symbol(k2, Decl(variadicTuples1.ts, 193, 76)) k0 = 'slice'; ->k0 : Symbol(k0, Decl(variadicTuples1.ts, 187, 46)) +>k0 : Symbol(k0, Decl(variadicTuples1.ts, 193, 46)) k1 = 'slice'; ->k1 : Symbol(k1, Decl(variadicTuples1.ts, 187, 58)) +>k1 : Symbol(k1, Decl(variadicTuples1.ts, 193, 58)) k2 = 'slice'; ->k2 : Symbol(k2, Decl(variadicTuples1.ts, 187, 76)) +>k2 : Symbol(k2, Decl(variadicTuples1.ts, 193, 76)) k3 = '0'; ->k3 : Symbol(k3, Decl(variadicTuples1.ts, 187, 94)) +>k3 : Symbol(k3, Decl(variadicTuples1.ts, 193, 94)) k3 = '1'; ->k3 : Symbol(k3, Decl(variadicTuples1.ts, 187, 94)) +>k3 : Symbol(k3, Decl(variadicTuples1.ts, 193, 94)) k3 = '2'; // Error ->k3 : Symbol(k3, Decl(variadicTuples1.ts, 187, 94)) +>k3 : Symbol(k3, Decl(variadicTuples1.ts, 193, 94)) } // Inference between variadic tuple types type First = T[0]; -<<<<<<< HEAD ->First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) ->T : Symbol(T, Decl(variadicTuples1.ts, 201, 11)) ->T : Symbol(T, Decl(variadicTuples1.ts, 201, 11)) +>First : Symbol(First, Decl(variadicTuples1.ts, 203, 1)) +>T : Symbol(T, Decl(variadicTuples1.ts, 207, 11)) +>T : Symbol(T, Decl(variadicTuples1.ts, 207, 11)) type DropFirst = T extends readonly [any, ...infer U] ? U : [...T]; ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) ->T : Symbol(T, Decl(variadicTuples1.ts, 202, 15)) ->T : Symbol(T, Decl(variadicTuples1.ts, 202, 15)) ->U : Symbol(U, Decl(variadicTuples1.ts, 202, 80)) ->U : Symbol(U, Decl(variadicTuples1.ts, 202, 80)) ->T : Symbol(T, Decl(variadicTuples1.ts, 202, 15)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 207, 48)) +>T : Symbol(T, Decl(variadicTuples1.ts, 208, 15)) +>T : Symbol(T, Decl(variadicTuples1.ts, 208, 15)) +>U : Symbol(U, Decl(variadicTuples1.ts, 208, 80)) +>U : Symbol(U, Decl(variadicTuples1.ts, 208, 80)) +>T : Symbol(T, Decl(variadicTuples1.ts, 208, 15)) type Last = T extends readonly [...infer _, infer U] ? U : undefined; ->Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) ->T : Symbol(T, Decl(variadicTuples1.ts, 204, 10)) ->T : Symbol(T, Decl(variadicTuples1.ts, 204, 10)) ->_ : Symbol(_, Decl(variadicTuples1.ts, 204, 70)) ->U : Symbol(U, Decl(variadicTuples1.ts, 204, 79)) ->U : Symbol(U, Decl(variadicTuples1.ts, 204, 79)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 208, 97)) +>T : Symbol(T, Decl(variadicTuples1.ts, 210, 10)) +>T : Symbol(T, Decl(variadicTuples1.ts, 210, 10)) +>_ : Symbol(_, Decl(variadicTuples1.ts, 210, 70)) +>U : Symbol(U, Decl(variadicTuples1.ts, 210, 79)) +>U : Symbol(U, Decl(variadicTuples1.ts, 210, 79)) type DropLast = T extends readonly [...infer U, any] ? U : [...T]; ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) ->T : Symbol(T, Decl(variadicTuples1.ts, 205, 14)) ->T : Symbol(T, Decl(variadicTuples1.ts, 205, 14)) ->U : Symbol(U, Decl(variadicTuples1.ts, 205, 74)) ->U : Symbol(U, Decl(variadicTuples1.ts, 205, 74)) ->T : Symbol(T, Decl(variadicTuples1.ts, 205, 14)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 210, 99)) +>T : Symbol(T, Decl(variadicTuples1.ts, 211, 14)) +>T : Symbol(T, Decl(variadicTuples1.ts, 211, 14)) +>U : Symbol(U, Decl(variadicTuples1.ts, 211, 74)) +>U : Symbol(U, Decl(variadicTuples1.ts, 211, 74)) +>T : Symbol(T, Decl(variadicTuples1.ts, 211, 14)) type T00 = First<[number, symbol, string]>; ->T00 : Symbol(T00, Decl(variadicTuples1.ts, 205, 96)) ->First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) +>T00 : Symbol(T00, Decl(variadicTuples1.ts, 211, 96)) +>First : Symbol(First, Decl(variadicTuples1.ts, 203, 1)) type T01 = First<[symbol, string]>; ->T01 : Symbol(T01, Decl(variadicTuples1.ts, 207, 43)) ->First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) +>T01 : Symbol(T01, Decl(variadicTuples1.ts, 213, 43)) +>First : Symbol(First, Decl(variadicTuples1.ts, 203, 1)) type T02 = First<[string]>; ->T02 : Symbol(T02, Decl(variadicTuples1.ts, 208, 35)) ->First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) +>T02 : Symbol(T02, Decl(variadicTuples1.ts, 214, 35)) +>First : Symbol(First, Decl(variadicTuples1.ts, 203, 1)) type T03 = First<[number, symbol, ...string[]]>; ->T03 : Symbol(T03, Decl(variadicTuples1.ts, 209, 27)) ->First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) +>T03 : Symbol(T03, Decl(variadicTuples1.ts, 215, 27)) +>First : Symbol(First, Decl(variadicTuples1.ts, 203, 1)) type T04 = First<[symbol, ...string[]]>; ->T04 : Symbol(T04, Decl(variadicTuples1.ts, 210, 48)) ->First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) +>T04 : Symbol(T04, Decl(variadicTuples1.ts, 216, 48)) +>First : Symbol(First, Decl(variadicTuples1.ts, 203, 1)) type T05 = First; ->T05 : Symbol(T05, Decl(variadicTuples1.ts, 211, 40)) ->First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) +>T05 : Symbol(T05, Decl(variadicTuples1.ts, 217, 40)) +>First : Symbol(First, Decl(variadicTuples1.ts, 203, 1)) type T06 = First<[]>; ->T06 : Symbol(T06, Decl(variadicTuples1.ts, 212, 27)) ->First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) +>T06 : Symbol(T06, Decl(variadicTuples1.ts, 218, 27)) +>First : Symbol(First, Decl(variadicTuples1.ts, 203, 1)) type T07 = First; ->T07 : Symbol(T07, Decl(variadicTuples1.ts, 213, 21)) ->First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) +>T07 : Symbol(T07, Decl(variadicTuples1.ts, 219, 21)) +>First : Symbol(First, Decl(variadicTuples1.ts, 203, 1)) type T08 = First; ->T08 : Symbol(T08, Decl(variadicTuples1.ts, 214, 22)) ->First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) +>T08 : Symbol(T08, Decl(variadicTuples1.ts, 220, 22)) +>First : Symbol(First, Decl(variadicTuples1.ts, 203, 1)) type T10 = DropFirst<[number, symbol, string]>; ->T10 : Symbol(T10, Decl(variadicTuples1.ts, 215, 24)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) +>T10 : Symbol(T10, Decl(variadicTuples1.ts, 221, 24)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 207, 48)) type T11 = DropFirst<[symbol, string]>; ->T11 : Symbol(T11, Decl(variadicTuples1.ts, 217, 47)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) +>T11 : Symbol(T11, Decl(variadicTuples1.ts, 223, 47)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 207, 48)) type T12 = DropFirst<[string]>; ->T12 : Symbol(T12, Decl(variadicTuples1.ts, 218, 39)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) +>T12 : Symbol(T12, Decl(variadicTuples1.ts, 224, 39)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 207, 48)) type T13 = DropFirst<[number, symbol, ...string[]]>; ->T13 : Symbol(T13, Decl(variadicTuples1.ts, 219, 31)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) +>T13 : Symbol(T13, Decl(variadicTuples1.ts, 225, 31)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 207, 48)) type T14 = DropFirst<[symbol, ...string[]]>; ->T14 : Symbol(T14, Decl(variadicTuples1.ts, 220, 52)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) +>T14 : Symbol(T14, Decl(variadicTuples1.ts, 226, 52)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 207, 48)) type T15 = DropFirst; ->T15 : Symbol(T15, Decl(variadicTuples1.ts, 221, 44)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) +>T15 : Symbol(T15, Decl(variadicTuples1.ts, 227, 44)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 207, 48)) type T16 = DropFirst<[]>; ->T16 : Symbol(T16, Decl(variadicTuples1.ts, 222, 31)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) +>T16 : Symbol(T16, Decl(variadicTuples1.ts, 228, 31)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 207, 48)) type T17 = DropFirst; ->T17 : Symbol(T17, Decl(variadicTuples1.ts, 223, 25)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) +>T17 : Symbol(T17, Decl(variadicTuples1.ts, 229, 25)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 207, 48)) type T18 = DropFirst; ->T18 : Symbol(T18, Decl(variadicTuples1.ts, 224, 26)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) +>T18 : Symbol(T18, Decl(variadicTuples1.ts, 230, 26)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 207, 48)) type T20 = Last<[number, symbol, string]>; ->T20 : Symbol(T20, Decl(variadicTuples1.ts, 225, 28)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) +>T20 : Symbol(T20, Decl(variadicTuples1.ts, 231, 28)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 208, 97)) type T21 = Last<[symbol, string]>; ->T21 : Symbol(T21, Decl(variadicTuples1.ts, 227, 42)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) +>T21 : Symbol(T21, Decl(variadicTuples1.ts, 233, 42)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 208, 97)) type T22 = Last<[string]>; ->T22 : Symbol(T22, Decl(variadicTuples1.ts, 228, 34)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) +>T22 : Symbol(T22, Decl(variadicTuples1.ts, 234, 34)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 208, 97)) type T23 = Last<[number, symbol, ...string[]]>; ->T23 : Symbol(T23, Decl(variadicTuples1.ts, 229, 26)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) +>T23 : Symbol(T23, Decl(variadicTuples1.ts, 235, 26)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 208, 97)) type T24 = Last<[symbol, ...string[]]>; ->T24 : Symbol(T24, Decl(variadicTuples1.ts, 230, 47)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) +>T24 : Symbol(T24, Decl(variadicTuples1.ts, 236, 47)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 208, 97)) type T25 = Last; ->T25 : Symbol(T25, Decl(variadicTuples1.ts, 231, 39)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) +>T25 : Symbol(T25, Decl(variadicTuples1.ts, 237, 39)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 208, 97)) type T26 = Last<[]>; // unknown[], maybe should be [] ->T26 : Symbol(T26, Decl(variadicTuples1.ts, 232, 26)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) +>T26 : Symbol(T26, Decl(variadicTuples1.ts, 238, 26)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 208, 97)) type T27 = Last; // unknown, maybe should be any ->T27 : Symbol(T27, Decl(variadicTuples1.ts, 233, 20)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) +>T27 : Symbol(T27, Decl(variadicTuples1.ts, 239, 20)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 208, 97)) type T28 = Last; ->T28 : Symbol(T28, Decl(variadicTuples1.ts, 234, 21)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) +>T28 : Symbol(T28, Decl(variadicTuples1.ts, 240, 21)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 208, 97)) type T30 = DropLast<[number, symbol, string]>; ->T30 : Symbol(T30, Decl(variadicTuples1.ts, 235, 23)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) +>T30 : Symbol(T30, Decl(variadicTuples1.ts, 241, 23)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 210, 99)) type T31 = DropLast<[symbol, string]>; ->T31 : Symbol(T31, Decl(variadicTuples1.ts, 237, 46)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) +>T31 : Symbol(T31, Decl(variadicTuples1.ts, 243, 46)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 210, 99)) type T32 = DropLast<[string]>; ->T32 : Symbol(T32, Decl(variadicTuples1.ts, 238, 38)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) +>T32 : Symbol(T32, Decl(variadicTuples1.ts, 244, 38)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 210, 99)) type T33 = DropLast<[number, symbol, ...string[]]>; ->T33 : Symbol(T33, Decl(variadicTuples1.ts, 239, 30)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) +>T33 : Symbol(T33, Decl(variadicTuples1.ts, 245, 30)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 210, 99)) type T34 = DropLast<[symbol, ...string[]]>; ->T34 : Symbol(T34, Decl(variadicTuples1.ts, 240, 51)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) +>T34 : Symbol(T34, Decl(variadicTuples1.ts, 246, 51)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 210, 99)) type T35 = DropLast; ->T35 : Symbol(T35, Decl(variadicTuples1.ts, 241, 43)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) +>T35 : Symbol(T35, Decl(variadicTuples1.ts, 247, 43)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 210, 99)) type T36 = DropLast<[]>; // unknown[], maybe should be [] ->T36 : Symbol(T36, Decl(variadicTuples1.ts, 242, 30)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) +>T36 : Symbol(T36, Decl(variadicTuples1.ts, 248, 30)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 210, 99)) type T37 = DropLast; ->T37 : Symbol(T37, Decl(variadicTuples1.ts, 243, 24)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) +>T37 : Symbol(T37, Decl(variadicTuples1.ts, 249, 24)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 210, 99)) type T38 = DropLast; ->T38 : Symbol(T38, Decl(variadicTuples1.ts, 244, 25)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) +>T38 : Symbol(T38, Decl(variadicTuples1.ts, 250, 25)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 210, 99)) type R00 = First; ->R00 : Symbol(R00, Decl(variadicTuples1.ts, 245, 27)) ->First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) +>R00 : Symbol(R00, Decl(variadicTuples1.ts, 251, 27)) +>First : Symbol(First, Decl(variadicTuples1.ts, 203, 1)) type R01 = First; ->R01 : Symbol(R01, Decl(variadicTuples1.ts, 247, 52)) ->First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) +>R01 : Symbol(R01, Decl(variadicTuples1.ts, 253, 52)) +>First : Symbol(First, Decl(variadicTuples1.ts, 203, 1)) type R02 = First; ->R02 : Symbol(R02, Decl(variadicTuples1.ts, 248, 44)) ->First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) +>R02 : Symbol(R02, Decl(variadicTuples1.ts, 254, 44)) +>First : Symbol(First, Decl(variadicTuples1.ts, 203, 1)) type R03 = First; ->R03 : Symbol(R03, Decl(variadicTuples1.ts, 249, 36)) ->First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) +>R03 : Symbol(R03, Decl(variadicTuples1.ts, 255, 36)) +>First : Symbol(First, Decl(variadicTuples1.ts, 203, 1)) type R04 = First; ->R04 : Symbol(R04, Decl(variadicTuples1.ts, 250, 57)) ->First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) +>R04 : Symbol(R04, Decl(variadicTuples1.ts, 256, 57)) +>First : Symbol(First, Decl(variadicTuples1.ts, 203, 1)) type R05 = First; ->R05 : Symbol(R05, Decl(variadicTuples1.ts, 251, 49)) ->First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) +>R05 : Symbol(R05, Decl(variadicTuples1.ts, 257, 49)) +>First : Symbol(First, Decl(variadicTuples1.ts, 203, 1)) type R06 = First; ->R06 : Symbol(R06, Decl(variadicTuples1.ts, 252, 36)) ->First : Symbol(First, Decl(variadicTuples1.ts, 197, 1)) +>R06 : Symbol(R06, Decl(variadicTuples1.ts, 258, 36)) +>First : Symbol(First, Decl(variadicTuples1.ts, 203, 1)) type R10 = DropFirst; ->R10 : Symbol(R10, Decl(variadicTuples1.ts, 253, 30)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) +>R10 : Symbol(R10, Decl(variadicTuples1.ts, 259, 30)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 207, 48)) type R11 = DropFirst; ->R11 : Symbol(R11, Decl(variadicTuples1.ts, 255, 56)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) +>R11 : Symbol(R11, Decl(variadicTuples1.ts, 261, 56)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 207, 48)) type R12 = DropFirst; ->R12 : Symbol(R12, Decl(variadicTuples1.ts, 256, 48)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) +>R12 : Symbol(R12, Decl(variadicTuples1.ts, 262, 48)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 207, 48)) type R13 = DropFirst; ->R13 : Symbol(R13, Decl(variadicTuples1.ts, 257, 40)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) +>R13 : Symbol(R13, Decl(variadicTuples1.ts, 263, 40)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 207, 48)) type R14 = DropFirst; ->R14 : Symbol(R14, Decl(variadicTuples1.ts, 258, 61)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) +>R14 : Symbol(R14, Decl(variadicTuples1.ts, 264, 61)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 207, 48)) type R15 = DropFirst; ->R15 : Symbol(R15, Decl(variadicTuples1.ts, 259, 53)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) +>R15 : Symbol(R15, Decl(variadicTuples1.ts, 265, 53)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 207, 48)) type R16 = DropFirst; ->R16 : Symbol(R16, Decl(variadicTuples1.ts, 260, 40)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 201, 48)) +>R16 : Symbol(R16, Decl(variadicTuples1.ts, 266, 40)) +>DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 207, 48)) type R20 = Last; ->R20 : Symbol(R20, Decl(variadicTuples1.ts, 261, 34)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) +>R20 : Symbol(R20, Decl(variadicTuples1.ts, 267, 34)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 208, 97)) type R21 = Last; ->R21 : Symbol(R21, Decl(variadicTuples1.ts, 263, 51)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) +>R21 : Symbol(R21, Decl(variadicTuples1.ts, 269, 51)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 208, 97)) type R22 = Last; ->R22 : Symbol(R22, Decl(variadicTuples1.ts, 264, 43)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) +>R22 : Symbol(R22, Decl(variadicTuples1.ts, 270, 43)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 208, 97)) type R23 = Last; ->R23 : Symbol(R23, Decl(variadicTuples1.ts, 265, 35)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) +>R23 : Symbol(R23, Decl(variadicTuples1.ts, 271, 35)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 208, 97)) type R24 = Last; ->R24 : Symbol(R24, Decl(variadicTuples1.ts, 266, 56)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) +>R24 : Symbol(R24, Decl(variadicTuples1.ts, 272, 56)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 208, 97)) type R25 = Last; ->R25 : Symbol(R25, Decl(variadicTuples1.ts, 267, 48)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) +>R25 : Symbol(R25, Decl(variadicTuples1.ts, 273, 48)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 208, 97)) type R26 = Last; ->R26 : Symbol(R26, Decl(variadicTuples1.ts, 268, 35)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 202, 97)) +>R26 : Symbol(R26, Decl(variadicTuples1.ts, 274, 35)) +>Last : Symbol(Last, Decl(variadicTuples1.ts, 208, 97)) type R30 = DropLast; ->R30 : Symbol(R30, Decl(variadicTuples1.ts, 269, 29)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) +>R30 : Symbol(R30, Decl(variadicTuples1.ts, 275, 29)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 210, 99)) type R31 = DropLast; ->R31 : Symbol(R31, Decl(variadicTuples1.ts, 271, 55)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) +>R31 : Symbol(R31, Decl(variadicTuples1.ts, 277, 55)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 210, 99)) type R32 = DropLast; ->R32 : Symbol(R32, Decl(variadicTuples1.ts, 272, 47)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) +>R32 : Symbol(R32, Decl(variadicTuples1.ts, 278, 47)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 210, 99)) type R33 = DropLast; ->R33 : Symbol(R33, Decl(variadicTuples1.ts, 273, 39)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) +>R33 : Symbol(R33, Decl(variadicTuples1.ts, 279, 39)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 210, 99)) type R34 = DropLast; ->R34 : Symbol(R34, Decl(variadicTuples1.ts, 274, 60)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) +>R34 : Symbol(R34, Decl(variadicTuples1.ts, 280, 60)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 210, 99)) type R35 = DropLast; ->R35 : Symbol(R35, Decl(variadicTuples1.ts, 275, 52)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) +>R35 : Symbol(R35, Decl(variadicTuples1.ts, 281, 52)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 210, 99)) type R36 = DropLast; ->R36 : Symbol(R36, Decl(variadicTuples1.ts, 276, 39)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 204, 99)) -======= ->First : Symbol(First, Decl(variadicTuples1.ts, 173, 1)) ->T : Symbol(T, Decl(variadicTuples1.ts, 177, 11)) ->T : Symbol(T, Decl(variadicTuples1.ts, 177, 11)) - -type DropFirst = T extends readonly [any, ...infer U] ? U : [...T]; ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 177, 48)) ->T : Symbol(T, Decl(variadicTuples1.ts, 178, 15)) ->T : Symbol(T, Decl(variadicTuples1.ts, 178, 15)) ->U : Symbol(U, Decl(variadicTuples1.ts, 178, 80)) ->U : Symbol(U, Decl(variadicTuples1.ts, 178, 80)) ->T : Symbol(T, Decl(variadicTuples1.ts, 178, 15)) - -type Last = T extends readonly [...infer _, infer U] ? U : undefined; ->Last : Symbol(Last, Decl(variadicTuples1.ts, 178, 97)) ->T : Symbol(T, Decl(variadicTuples1.ts, 180, 10)) ->T : Symbol(T, Decl(variadicTuples1.ts, 180, 10)) ->_ : Symbol(_, Decl(variadicTuples1.ts, 180, 70)) ->U : Symbol(U, Decl(variadicTuples1.ts, 180, 79)) ->U : Symbol(U, Decl(variadicTuples1.ts, 180, 79)) - -type DropLast = T extends readonly [...infer U, any] ? U : [...T]; ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 180, 99)) ->T : Symbol(T, Decl(variadicTuples1.ts, 181, 14)) ->T : Symbol(T, Decl(variadicTuples1.ts, 181, 14)) ->U : Symbol(U, Decl(variadicTuples1.ts, 181, 74)) ->U : Symbol(U, Decl(variadicTuples1.ts, 181, 74)) ->T : Symbol(T, Decl(variadicTuples1.ts, 181, 14)) - -type T00 = First<[number, symbol, string]>; ->T00 : Symbol(T00, Decl(variadicTuples1.ts, 181, 96)) ->First : Symbol(First, Decl(variadicTuples1.ts, 173, 1)) - -type T01 = First<[symbol, string]>; ->T01 : Symbol(T01, Decl(variadicTuples1.ts, 183, 43)) ->First : Symbol(First, Decl(variadicTuples1.ts, 173, 1)) - -type T02 = First<[string]>; ->T02 : Symbol(T02, Decl(variadicTuples1.ts, 184, 35)) ->First : Symbol(First, Decl(variadicTuples1.ts, 173, 1)) - -type T03 = First<[number, symbol, ...string[]]>; ->T03 : Symbol(T03, Decl(variadicTuples1.ts, 185, 27)) ->First : Symbol(First, Decl(variadicTuples1.ts, 173, 1)) - -type T04 = First<[symbol, ...string[]]>; ->T04 : Symbol(T04, Decl(variadicTuples1.ts, 186, 48)) ->First : Symbol(First, Decl(variadicTuples1.ts, 173, 1)) - -type T05 = First; ->T05 : Symbol(T05, Decl(variadicTuples1.ts, 187, 40)) ->First : Symbol(First, Decl(variadicTuples1.ts, 173, 1)) - -type T06 = First<[]>; ->T06 : Symbol(T06, Decl(variadicTuples1.ts, 188, 27)) ->First : Symbol(First, Decl(variadicTuples1.ts, 173, 1)) - -type T07 = First; ->T07 : Symbol(T07, Decl(variadicTuples1.ts, 189, 21)) ->First : Symbol(First, Decl(variadicTuples1.ts, 173, 1)) - -type T08 = First; ->T08 : Symbol(T08, Decl(variadicTuples1.ts, 190, 22)) ->First : Symbol(First, Decl(variadicTuples1.ts, 173, 1)) - -type T10 = DropFirst<[number, symbol, string]>; ->T10 : Symbol(T10, Decl(variadicTuples1.ts, 191, 24)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 177, 48)) - -type T11 = DropFirst<[symbol, string]>; ->T11 : Symbol(T11, Decl(variadicTuples1.ts, 193, 47)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 177, 48)) - -type T12 = DropFirst<[string]>; ->T12 : Symbol(T12, Decl(variadicTuples1.ts, 194, 39)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 177, 48)) - -type T13 = DropFirst<[number, symbol, ...string[]]>; ->T13 : Symbol(T13, Decl(variadicTuples1.ts, 195, 31)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 177, 48)) - -type T14 = DropFirst<[symbol, ...string[]]>; ->T14 : Symbol(T14, Decl(variadicTuples1.ts, 196, 52)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 177, 48)) - -type T15 = DropFirst; ->T15 : Symbol(T15, Decl(variadicTuples1.ts, 197, 44)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 177, 48)) - -type T16 = DropFirst<[]>; ->T16 : Symbol(T16, Decl(variadicTuples1.ts, 198, 31)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 177, 48)) - -type T17 = DropFirst; ->T17 : Symbol(T17, Decl(variadicTuples1.ts, 199, 25)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 177, 48)) - -type T18 = DropFirst; ->T18 : Symbol(T18, Decl(variadicTuples1.ts, 200, 26)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 177, 48)) - -type T20 = Last<[number, symbol, string]>; ->T20 : Symbol(T20, Decl(variadicTuples1.ts, 201, 28)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 178, 97)) - -type T21 = Last<[symbol, string]>; ->T21 : Symbol(T21, Decl(variadicTuples1.ts, 203, 42)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 178, 97)) - -type T22 = Last<[string]>; ->T22 : Symbol(T22, Decl(variadicTuples1.ts, 204, 34)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 178, 97)) - -type T23 = Last<[number, symbol, ...string[]]>; ->T23 : Symbol(T23, Decl(variadicTuples1.ts, 205, 26)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 178, 97)) - -type T24 = Last<[symbol, ...string[]]>; ->T24 : Symbol(T24, Decl(variadicTuples1.ts, 206, 47)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 178, 97)) - -type T25 = Last; ->T25 : Symbol(T25, Decl(variadicTuples1.ts, 207, 39)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 178, 97)) - -type T26 = Last<[]>; // unknown[], maybe should be [] ->T26 : Symbol(T26, Decl(variadicTuples1.ts, 208, 26)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 178, 97)) - -type T27 = Last; // unknown, maybe should be any ->T27 : Symbol(T27, Decl(variadicTuples1.ts, 209, 20)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 178, 97)) - -type T28 = Last; ->T28 : Symbol(T28, Decl(variadicTuples1.ts, 210, 21)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 178, 97)) - -type T30 = DropLast<[number, symbol, string]>; ->T30 : Symbol(T30, Decl(variadicTuples1.ts, 211, 23)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 180, 99)) - -type T31 = DropLast<[symbol, string]>; ->T31 : Symbol(T31, Decl(variadicTuples1.ts, 213, 46)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 180, 99)) - -type T32 = DropLast<[string]>; ->T32 : Symbol(T32, Decl(variadicTuples1.ts, 214, 38)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 180, 99)) - -type T33 = DropLast<[number, symbol, ...string[]]>; ->T33 : Symbol(T33, Decl(variadicTuples1.ts, 215, 30)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 180, 99)) - -type T34 = DropLast<[symbol, ...string[]]>; ->T34 : Symbol(T34, Decl(variadicTuples1.ts, 216, 51)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 180, 99)) - -type T35 = DropLast; ->T35 : Symbol(T35, Decl(variadicTuples1.ts, 217, 43)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 180, 99)) - -type T36 = DropLast<[]>; // unknown[], maybe should be [] ->T36 : Symbol(T36, Decl(variadicTuples1.ts, 218, 30)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 180, 99)) - -type T37 = DropLast; ->T37 : Symbol(T37, Decl(variadicTuples1.ts, 219, 24)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 180, 99)) - -type T38 = DropLast; ->T38 : Symbol(T38, Decl(variadicTuples1.ts, 220, 25)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 180, 99)) - -type R00 = First; ->R00 : Symbol(R00, Decl(variadicTuples1.ts, 221, 27)) ->First : Symbol(First, Decl(variadicTuples1.ts, 173, 1)) - -type R01 = First; ->R01 : Symbol(R01, Decl(variadicTuples1.ts, 223, 52)) ->First : Symbol(First, Decl(variadicTuples1.ts, 173, 1)) - -type R02 = First; ->R02 : Symbol(R02, Decl(variadicTuples1.ts, 224, 44)) ->First : Symbol(First, Decl(variadicTuples1.ts, 173, 1)) - -type R03 = First; ->R03 : Symbol(R03, Decl(variadicTuples1.ts, 225, 36)) ->First : Symbol(First, Decl(variadicTuples1.ts, 173, 1)) - -type R04 = First; ->R04 : Symbol(R04, Decl(variadicTuples1.ts, 226, 57)) ->First : Symbol(First, Decl(variadicTuples1.ts, 173, 1)) - -type R05 = First; ->R05 : Symbol(R05, Decl(variadicTuples1.ts, 227, 49)) ->First : Symbol(First, Decl(variadicTuples1.ts, 173, 1)) - -type R06 = First; ->R06 : Symbol(R06, Decl(variadicTuples1.ts, 228, 36)) ->First : Symbol(First, Decl(variadicTuples1.ts, 173, 1)) - -type R10 = DropFirst; ->R10 : Symbol(R10, Decl(variadicTuples1.ts, 229, 30)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 177, 48)) - -type R11 = DropFirst; ->R11 : Symbol(R11, Decl(variadicTuples1.ts, 231, 56)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 177, 48)) - -type R12 = DropFirst; ->R12 : Symbol(R12, Decl(variadicTuples1.ts, 232, 48)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 177, 48)) - -type R13 = DropFirst; ->R13 : Symbol(R13, Decl(variadicTuples1.ts, 233, 40)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 177, 48)) - -type R14 = DropFirst; ->R14 : Symbol(R14, Decl(variadicTuples1.ts, 234, 61)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 177, 48)) - -type R15 = DropFirst; ->R15 : Symbol(R15, Decl(variadicTuples1.ts, 235, 53)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 177, 48)) - -type R16 = DropFirst; ->R16 : Symbol(R16, Decl(variadicTuples1.ts, 236, 40)) ->DropFirst : Symbol(DropFirst, Decl(variadicTuples1.ts, 177, 48)) - -type R20 = Last; ->R20 : Symbol(R20, Decl(variadicTuples1.ts, 237, 34)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 178, 97)) - -type R21 = Last; ->R21 : Symbol(R21, Decl(variadicTuples1.ts, 239, 51)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 178, 97)) - -type R22 = Last; ->R22 : Symbol(R22, Decl(variadicTuples1.ts, 240, 43)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 178, 97)) - -type R23 = Last; ->R23 : Symbol(R23, Decl(variadicTuples1.ts, 241, 35)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 178, 97)) - -type R24 = Last; ->R24 : Symbol(R24, Decl(variadicTuples1.ts, 242, 56)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 178, 97)) - -type R25 = Last; ->R25 : Symbol(R25, Decl(variadicTuples1.ts, 243, 48)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 178, 97)) - -type R26 = Last; ->R26 : Symbol(R26, Decl(variadicTuples1.ts, 244, 35)) ->Last : Symbol(Last, Decl(variadicTuples1.ts, 178, 97)) - -type R30 = DropLast; ->R30 : Symbol(R30, Decl(variadicTuples1.ts, 245, 29)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 180, 99)) - -type R31 = DropLast; ->R31 : Symbol(R31, Decl(variadicTuples1.ts, 247, 55)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 180, 99)) - -type R32 = DropLast; ->R32 : Symbol(R32, Decl(variadicTuples1.ts, 248, 47)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 180, 99)) - -type R33 = DropLast; ->R33 : Symbol(R33, Decl(variadicTuples1.ts, 249, 39)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 180, 99)) - -type R34 = DropLast; ->R34 : Symbol(R34, Decl(variadicTuples1.ts, 250, 60)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 180, 99)) - -type R35 = DropLast; ->R35 : Symbol(R35, Decl(variadicTuples1.ts, 251, 52)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 180, 99)) - -type R36 = DropLast; ->R36 : Symbol(R36, Decl(variadicTuples1.ts, 252, 39)) ->DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 180, 99)) ->>>>>>> master +>R36 : Symbol(R36, Decl(variadicTuples1.ts, 282, 39)) +>DropLast : Symbol(DropLast, Decl(variadicTuples1.ts, 210, 99)) // Inference to [...T, ...U] with implied arity for T function curry(f: (...args: [...T, ...U]) => R, ...a: T) { -<<<<<<< HEAD ->curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) ->T : Symbol(T, Decl(variadicTuples1.ts, 281, 15)) ->U : Symbol(U, Decl(variadicTuples1.ts, 281, 35)) ->R : Symbol(R, Decl(variadicTuples1.ts, 281, 56)) ->f : Symbol(f, Decl(variadicTuples1.ts, 281, 60)) ->args : Symbol(args, Decl(variadicTuples1.ts, 281, 64)) ->T : Symbol(T, Decl(variadicTuples1.ts, 281, 15)) ->U : Symbol(U, Decl(variadicTuples1.ts, 281, 35)) ->R : Symbol(R, Decl(variadicTuples1.ts, 281, 56)) ->a : Symbol(a, Decl(variadicTuples1.ts, 281, 92)) ->T : Symbol(T, Decl(variadicTuples1.ts, 281, 15)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 283, 33)) +>T : Symbol(T, Decl(variadicTuples1.ts, 287, 15)) +>U : Symbol(U, Decl(variadicTuples1.ts, 287, 35)) +>R : Symbol(R, Decl(variadicTuples1.ts, 287, 56)) +>f : Symbol(f, Decl(variadicTuples1.ts, 287, 60)) +>args : Symbol(args, Decl(variadicTuples1.ts, 287, 64)) +>T : Symbol(T, Decl(variadicTuples1.ts, 287, 15)) +>U : Symbol(U, Decl(variadicTuples1.ts, 287, 35)) +>R : Symbol(R, Decl(variadicTuples1.ts, 287, 56)) +>a : Symbol(a, Decl(variadicTuples1.ts, 287, 92)) +>T : Symbol(T, Decl(variadicTuples1.ts, 287, 15)) return (...b: U) => f(...a, ...b); ->b : Symbol(b, Decl(variadicTuples1.ts, 282, 12)) ->U : Symbol(U, Decl(variadicTuples1.ts, 281, 35)) ->f : Symbol(f, Decl(variadicTuples1.ts, 281, 60)) ->a : Symbol(a, Decl(variadicTuples1.ts, 281, 92)) ->b : Symbol(b, Decl(variadicTuples1.ts, 282, 12)) +>b : Symbol(b, Decl(variadicTuples1.ts, 288, 12)) +>U : Symbol(U, Decl(variadicTuples1.ts, 287, 35)) +>f : Symbol(f, Decl(variadicTuples1.ts, 287, 60)) +>a : Symbol(a, Decl(variadicTuples1.ts, 287, 92)) +>b : Symbol(b, Decl(variadicTuples1.ts, 288, 12)) } const fn1 = (a: number, b: string, c: boolean, d: string[]) => 0; ->fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 285, 5)) ->a : Symbol(a, Decl(variadicTuples1.ts, 285, 13)) ->b : Symbol(b, Decl(variadicTuples1.ts, 285, 23)) ->c : Symbol(c, Decl(variadicTuples1.ts, 285, 34)) ->d : Symbol(d, Decl(variadicTuples1.ts, 285, 46)) +>fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 291, 5)) +>a : Symbol(a, Decl(variadicTuples1.ts, 291, 13)) +>b : Symbol(b, Decl(variadicTuples1.ts, 291, 23)) +>c : Symbol(c, Decl(variadicTuples1.ts, 291, 34)) +>d : Symbol(d, Decl(variadicTuples1.ts, 291, 46)) const c0 = curry(fn1); // (a: number, b: string, c: boolean, d: string[]) => number ->c0 : Symbol(c0, Decl(variadicTuples1.ts, 287, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) ->fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 285, 5)) +>c0 : Symbol(c0, Decl(variadicTuples1.ts, 293, 5)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 283, 33)) +>fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 291, 5)) const c1 = curry(fn1, 1); // (b: string, c: boolean, d: string[]) => number ->c1 : Symbol(c1, Decl(variadicTuples1.ts, 288, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) ->fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 285, 5)) +>c1 : Symbol(c1, Decl(variadicTuples1.ts, 294, 5)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 283, 33)) +>fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 291, 5)) const c2 = curry(fn1, 1, 'abc'); // (c: boolean, d: string[]) => number ->c2 : Symbol(c2, Decl(variadicTuples1.ts, 289, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) ->fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 285, 5)) +>c2 : Symbol(c2, Decl(variadicTuples1.ts, 295, 5)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 283, 33)) +>fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 291, 5)) const c3 = curry(fn1, 1, 'abc', true); // (d: string[]) => number ->c3 : Symbol(c3, Decl(variadicTuples1.ts, 290, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) ->fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 285, 5)) +>c3 : Symbol(c3, Decl(variadicTuples1.ts, 296, 5)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 283, 33)) +>fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 291, 5)) const c4 = curry(fn1, 1, 'abc', true, ['x', 'y']); // () => number ->c4 : Symbol(c4, Decl(variadicTuples1.ts, 291, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) ->fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 285, 5)) +>c4 : Symbol(c4, Decl(variadicTuples1.ts, 297, 5)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 283, 33)) +>fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 291, 5)) const fn2 = (x: number, b: boolean, ...args: string[]) => 0; ->fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 293, 5)) ->x : Symbol(x, Decl(variadicTuples1.ts, 293, 13)) ->b : Symbol(b, Decl(variadicTuples1.ts, 293, 23)) ->args : Symbol(args, Decl(variadicTuples1.ts, 293, 35)) +>fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 299, 5)) +>x : Symbol(x, Decl(variadicTuples1.ts, 299, 13)) +>b : Symbol(b, Decl(variadicTuples1.ts, 299, 23)) +>args : Symbol(args, Decl(variadicTuples1.ts, 299, 35)) const c10 = curry(fn2); // (x: number, b: boolean, ...args: string[]) => number ->c10 : Symbol(c10, Decl(variadicTuples1.ts, 295, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) ->fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 293, 5)) +>c10 : Symbol(c10, Decl(variadicTuples1.ts, 301, 5)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 283, 33)) +>fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 299, 5)) const c11 = curry(fn2, 1); // (b: boolean, ...args: string[]) => number ->c11 : Symbol(c11, Decl(variadicTuples1.ts, 296, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) ->fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 293, 5)) +>c11 : Symbol(c11, Decl(variadicTuples1.ts, 302, 5)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 283, 33)) +>fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 299, 5)) const c12 = curry(fn2, 1, true); // (...args: string[]) => number ->c12 : Symbol(c12, Decl(variadicTuples1.ts, 297, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) ->fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 293, 5)) +>c12 : Symbol(c12, Decl(variadicTuples1.ts, 303, 5)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 283, 33)) +>fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 299, 5)) const c13 = curry(fn2, 1, true, 'abc', 'def'); // (...args: string[]) => number ->c13 : Symbol(c13, Decl(variadicTuples1.ts, 298, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) ->fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 293, 5)) +>c13 : Symbol(c13, Decl(variadicTuples1.ts, 304, 5)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 283, 33)) +>fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 299, 5)) const fn3 = (...args: string[]) => 0; ->fn3 : Symbol(fn3, Decl(variadicTuples1.ts, 300, 5)) ->args : Symbol(args, Decl(variadicTuples1.ts, 300, 13)) +>fn3 : Symbol(fn3, Decl(variadicTuples1.ts, 306, 5)) +>args : Symbol(args, Decl(variadicTuples1.ts, 306, 13)) const c20 = curry(fn3); // (...args: string[]) => number ->c20 : Symbol(c20, Decl(variadicTuples1.ts, 302, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) ->fn3 : Symbol(fn3, Decl(variadicTuples1.ts, 300, 5)) +>c20 : Symbol(c20, Decl(variadicTuples1.ts, 308, 5)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 283, 33)) +>fn3 : Symbol(fn3, Decl(variadicTuples1.ts, 306, 5)) const c21 = curry(fn3, 'abc', 'def'); // (...args: string[]) => number ->c21 : Symbol(c21, Decl(variadicTuples1.ts, 303, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) ->fn3 : Symbol(fn3, Decl(variadicTuples1.ts, 300, 5)) +>c21 : Symbol(c21, Decl(variadicTuples1.ts, 309, 5)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 283, 33)) +>fn3 : Symbol(fn3, Decl(variadicTuples1.ts, 306, 5)) const c22 = curry(fn3, ...sa); // (...args: string[]) => number ->c22 : Symbol(c22, Decl(variadicTuples1.ts, 304, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 277, 33)) ->fn3 : Symbol(fn3, Decl(variadicTuples1.ts, 300, 5)) -======= ->curry : Symbol(curry, Decl(variadicTuples1.ts, 253, 33)) ->T : Symbol(T, Decl(variadicTuples1.ts, 257, 15)) ->U : Symbol(U, Decl(variadicTuples1.ts, 257, 35)) ->R : Symbol(R, Decl(variadicTuples1.ts, 257, 56)) ->f : Symbol(f, Decl(variadicTuples1.ts, 257, 60)) ->args : Symbol(args, Decl(variadicTuples1.ts, 257, 64)) ->T : Symbol(T, Decl(variadicTuples1.ts, 257, 15)) ->U : Symbol(U, Decl(variadicTuples1.ts, 257, 35)) ->R : Symbol(R, Decl(variadicTuples1.ts, 257, 56)) ->a : Symbol(a, Decl(variadicTuples1.ts, 257, 92)) ->T : Symbol(T, Decl(variadicTuples1.ts, 257, 15)) - - return (...b: U) => f(...a, ...b); ->b : Symbol(b, Decl(variadicTuples1.ts, 258, 12)) ->U : Symbol(U, Decl(variadicTuples1.ts, 257, 35)) ->f : Symbol(f, Decl(variadicTuples1.ts, 257, 60)) ->a : Symbol(a, Decl(variadicTuples1.ts, 257, 92)) ->b : Symbol(b, Decl(variadicTuples1.ts, 258, 12)) -} - -const fn1 = (a: number, b: string, c: boolean, d: string[]) => 0; ->fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 261, 5)) ->a : Symbol(a, Decl(variadicTuples1.ts, 261, 13)) ->b : Symbol(b, Decl(variadicTuples1.ts, 261, 23)) ->c : Symbol(c, Decl(variadicTuples1.ts, 261, 34)) ->d : Symbol(d, Decl(variadicTuples1.ts, 261, 46)) - -const c0 = curry(fn1); // (a: number, b: string, c: boolean, d: string[]) => number ->c0 : Symbol(c0, Decl(variadicTuples1.ts, 263, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 253, 33)) ->fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 261, 5)) - -const c1 = curry(fn1, 1); // (b: string, c: boolean, d: string[]) => number ->c1 : Symbol(c1, Decl(variadicTuples1.ts, 264, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 253, 33)) ->fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 261, 5)) - -const c2 = curry(fn1, 1, 'abc'); // (c: boolean, d: string[]) => number ->c2 : Symbol(c2, Decl(variadicTuples1.ts, 265, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 253, 33)) ->fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 261, 5)) - -const c3 = curry(fn1, 1, 'abc', true); // (d: string[]) => number ->c3 : Symbol(c3, Decl(variadicTuples1.ts, 266, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 253, 33)) ->fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 261, 5)) - -const c4 = curry(fn1, 1, 'abc', true, ['x', 'y']); // () => number ->c4 : Symbol(c4, Decl(variadicTuples1.ts, 267, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 253, 33)) ->fn1 : Symbol(fn1, Decl(variadicTuples1.ts, 261, 5)) - -const fn2 = (x: number, b: boolean, ...args: string[]) => 0; ->fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 269, 5)) ->x : Symbol(x, Decl(variadicTuples1.ts, 269, 13)) ->b : Symbol(b, Decl(variadicTuples1.ts, 269, 23)) ->args : Symbol(args, Decl(variadicTuples1.ts, 269, 35)) - -const c10 = curry(fn2); // (x: number, b: boolean, ...args: string[]) => number ->c10 : Symbol(c10, Decl(variadicTuples1.ts, 271, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 253, 33)) ->fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 269, 5)) - -const c11 = curry(fn2, 1); // (b: boolean, ...args: string[]) => number ->c11 : Symbol(c11, Decl(variadicTuples1.ts, 272, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 253, 33)) ->fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 269, 5)) - -const c12 = curry(fn2, 1, true); // (...args: string[]) => number ->c12 : Symbol(c12, Decl(variadicTuples1.ts, 273, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 253, 33)) ->fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 269, 5)) - -const c13 = curry(fn2, 1, true, 'abc', 'def'); // (...args: string[]) => number ->c13 : Symbol(c13, Decl(variadicTuples1.ts, 274, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 253, 33)) ->fn2 : Symbol(fn2, Decl(variadicTuples1.ts, 269, 5)) - -const fn3 = (...args: string[]) => 0; ->fn3 : Symbol(fn3, Decl(variadicTuples1.ts, 276, 5)) ->args : Symbol(args, Decl(variadicTuples1.ts, 276, 13)) - -const c20 = curry(fn3); // (...args: string[]) => number ->c20 : Symbol(c20, Decl(variadicTuples1.ts, 278, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 253, 33)) ->fn3 : Symbol(fn3, Decl(variadicTuples1.ts, 276, 5)) - -const c21 = curry(fn3, 'abc', 'def'); // (...args: string[]) => number ->c21 : Symbol(c21, Decl(variadicTuples1.ts, 279, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 253, 33)) ->fn3 : Symbol(fn3, Decl(variadicTuples1.ts, 276, 5)) - -const c22 = curry(fn3, ...sa); // (...args: string[]) => number ->c22 : Symbol(c22, Decl(variadicTuples1.ts, 280, 5)) ->curry : Symbol(curry, Decl(variadicTuples1.ts, 253, 33)) ->fn3 : Symbol(fn3, Decl(variadicTuples1.ts, 276, 5)) ->>>>>>> master +>c22 : Symbol(c22, Decl(variadicTuples1.ts, 310, 5)) +>curry : Symbol(curry, Decl(variadicTuples1.ts, 283, 33)) +>fn3 : Symbol(fn3, Decl(variadicTuples1.ts, 306, 5)) >sa : Symbol(sa, Decl(variadicTuples1.ts, 29, 13)) // No inference to [...T, ...U] when there is no implied arity function curry2(f: (...args: [...T, ...U]) => R, t: [...T], u: [...U]) { -<<<<<<< HEAD ->curry2 : Symbol(curry2, Decl(variadicTuples1.ts, 304, 30)) ->T : Symbol(T, Decl(variadicTuples1.ts, 308, 16)) ->U : Symbol(U, Decl(variadicTuples1.ts, 308, 36)) ->R : Symbol(R, Decl(variadicTuples1.ts, 308, 57)) ->f : Symbol(f, Decl(variadicTuples1.ts, 308, 61)) ->args : Symbol(args, Decl(variadicTuples1.ts, 308, 65)) ->T : Symbol(T, Decl(variadicTuples1.ts, 308, 16)) ->U : Symbol(U, Decl(variadicTuples1.ts, 308, 36)) ->R : Symbol(R, Decl(variadicTuples1.ts, 308, 57)) ->t : Symbol(t, Decl(variadicTuples1.ts, 308, 93)) ->T : Symbol(T, Decl(variadicTuples1.ts, 308, 16)) ->u : Symbol(u, Decl(variadicTuples1.ts, 308, 104)) ->U : Symbol(U, Decl(variadicTuples1.ts, 308, 36)) - - return f(...t, ...u); ->f : Symbol(f, Decl(variadicTuples1.ts, 308, 61)) ->t : Symbol(t, Decl(variadicTuples1.ts, 308, 93)) ->u : Symbol(u, Decl(variadicTuples1.ts, 308, 104)) -} - -declare function fn10(a: string, b: number, c: boolean): string[]; ->fn10 : Symbol(fn10, Decl(variadicTuples1.ts, 310, 1)) ->a : Symbol(a, Decl(variadicTuples1.ts, 312, 22)) ->b : Symbol(b, Decl(variadicTuples1.ts, 312, 32)) ->c : Symbol(c, Decl(variadicTuples1.ts, 312, 43)) - -curry2(fn10, ['hello', 42], [true]); ->curry2 : Symbol(curry2, Decl(variadicTuples1.ts, 304, 30)) ->fn10 : Symbol(fn10, Decl(variadicTuples1.ts, 310, 1)) - -curry2(fn10, ['hello'], [42, true]); ->curry2 : Symbol(curry2, Decl(variadicTuples1.ts, 304, 30)) ->fn10 : Symbol(fn10, Decl(variadicTuples1.ts, 310, 1)) -======= ->curry2 : Symbol(curry2, Decl(variadicTuples1.ts, 280, 30)) ->T : Symbol(T, Decl(variadicTuples1.ts, 284, 16)) ->U : Symbol(U, Decl(variadicTuples1.ts, 284, 36)) ->R : Symbol(R, Decl(variadicTuples1.ts, 284, 57)) ->f : Symbol(f, Decl(variadicTuples1.ts, 284, 61)) ->args : Symbol(args, Decl(variadicTuples1.ts, 284, 65)) ->T : Symbol(T, Decl(variadicTuples1.ts, 284, 16)) ->U : Symbol(U, Decl(variadicTuples1.ts, 284, 36)) ->R : Symbol(R, Decl(variadicTuples1.ts, 284, 57)) ->t : Symbol(t, Decl(variadicTuples1.ts, 284, 93)) ->T : Symbol(T, Decl(variadicTuples1.ts, 284, 16)) ->u : Symbol(u, Decl(variadicTuples1.ts, 284, 104)) ->U : Symbol(U, Decl(variadicTuples1.ts, 284, 36)) +>curry2 : Symbol(curry2, Decl(variadicTuples1.ts, 310, 30)) +>T : Symbol(T, Decl(variadicTuples1.ts, 314, 16)) +>U : Symbol(U, Decl(variadicTuples1.ts, 314, 36)) +>R : Symbol(R, Decl(variadicTuples1.ts, 314, 57)) +>f : Symbol(f, Decl(variadicTuples1.ts, 314, 61)) +>args : Symbol(args, Decl(variadicTuples1.ts, 314, 65)) +>T : Symbol(T, Decl(variadicTuples1.ts, 314, 16)) +>U : Symbol(U, Decl(variadicTuples1.ts, 314, 36)) +>R : Symbol(R, Decl(variadicTuples1.ts, 314, 57)) +>t : Symbol(t, Decl(variadicTuples1.ts, 314, 93)) +>T : Symbol(T, Decl(variadicTuples1.ts, 314, 16)) +>u : Symbol(u, Decl(variadicTuples1.ts, 314, 104)) +>U : Symbol(U, Decl(variadicTuples1.ts, 314, 36)) return f(...t, ...u); ->f : Symbol(f, Decl(variadicTuples1.ts, 284, 61)) ->t : Symbol(t, Decl(variadicTuples1.ts, 284, 93)) ->u : Symbol(u, Decl(variadicTuples1.ts, 284, 104)) +>f : Symbol(f, Decl(variadicTuples1.ts, 314, 61)) +>t : Symbol(t, Decl(variadicTuples1.ts, 314, 93)) +>u : Symbol(u, Decl(variadicTuples1.ts, 314, 104)) } declare function fn10(a: string, b: number, c: boolean): string[]; ->fn10 : Symbol(fn10, Decl(variadicTuples1.ts, 286, 1)) ->a : Symbol(a, Decl(variadicTuples1.ts, 288, 22)) ->b : Symbol(b, Decl(variadicTuples1.ts, 288, 32)) ->c : Symbol(c, Decl(variadicTuples1.ts, 288, 43)) +>fn10 : Symbol(fn10, Decl(variadicTuples1.ts, 316, 1)) +>a : Symbol(a, Decl(variadicTuples1.ts, 318, 22)) +>b : Symbol(b, Decl(variadicTuples1.ts, 318, 32)) +>c : Symbol(c, Decl(variadicTuples1.ts, 318, 43)) curry2(fn10, ['hello', 42], [true]); ->curry2 : Symbol(curry2, Decl(variadicTuples1.ts, 280, 30)) ->fn10 : Symbol(fn10, Decl(variadicTuples1.ts, 286, 1)) +>curry2 : Symbol(curry2, Decl(variadicTuples1.ts, 310, 30)) +>fn10 : Symbol(fn10, Decl(variadicTuples1.ts, 316, 1)) curry2(fn10, ['hello'], [42, true]); ->curry2 : Symbol(curry2, Decl(variadicTuples1.ts, 280, 30)) ->fn10 : Symbol(fn10, Decl(variadicTuples1.ts, 286, 1)) ->>>>>>> master +>curry2 : Symbol(curry2, Decl(variadicTuples1.ts, 310, 30)) +>fn10 : Symbol(fn10, Decl(variadicTuples1.ts, 316, 1)) // Last argument is contextually typed declare function call(...args: [...T, (...args: T) => R]): [T, R]; -<<<<<<< HEAD ->call : Symbol(call, Decl(variadicTuples1.ts, 315, 36)) ->T : Symbol(T, Decl(variadicTuples1.ts, 319, 22)) ->R : Symbol(R, Decl(variadicTuples1.ts, 319, 42)) ->args : Symbol(args, Decl(variadicTuples1.ts, 319, 46)) ->T : Symbol(T, Decl(variadicTuples1.ts, 319, 22)) ->args : Symbol(args, Decl(variadicTuples1.ts, 319, 63)) ->T : Symbol(T, Decl(variadicTuples1.ts, 319, 22)) ->R : Symbol(R, Decl(variadicTuples1.ts, 319, 42)) ->T : Symbol(T, Decl(variadicTuples1.ts, 319, 22)) ->R : Symbol(R, Decl(variadicTuples1.ts, 319, 42)) +>call : Symbol(call, Decl(variadicTuples1.ts, 321, 36)) +>T : Symbol(T, Decl(variadicTuples1.ts, 325, 22)) +>R : Symbol(R, Decl(variadicTuples1.ts, 325, 42)) +>args : Symbol(args, Decl(variadicTuples1.ts, 325, 46)) +>T : Symbol(T, Decl(variadicTuples1.ts, 325, 22)) +>args : Symbol(args, Decl(variadicTuples1.ts, 325, 63)) +>T : Symbol(T, Decl(variadicTuples1.ts, 325, 22)) +>R : Symbol(R, Decl(variadicTuples1.ts, 325, 42)) +>T : Symbol(T, Decl(variadicTuples1.ts, 325, 22)) +>R : Symbol(R, Decl(variadicTuples1.ts, 325, 42)) call('hello', 32, (a, b) => 42); ->call : Symbol(call, Decl(variadicTuples1.ts, 315, 36)) ->a : Symbol(a, Decl(variadicTuples1.ts, 321, 19)) ->b : Symbol(b, Decl(variadicTuples1.ts, 321, 21)) -======= ->call : Symbol(call, Decl(variadicTuples1.ts, 291, 36)) ->T : Symbol(T, Decl(variadicTuples1.ts, 295, 22)) ->R : Symbol(R, Decl(variadicTuples1.ts, 295, 42)) ->args : Symbol(args, Decl(variadicTuples1.ts, 295, 46)) ->T : Symbol(T, Decl(variadicTuples1.ts, 295, 22)) ->args : Symbol(args, Decl(variadicTuples1.ts, 295, 63)) ->T : Symbol(T, Decl(variadicTuples1.ts, 295, 22)) ->R : Symbol(R, Decl(variadicTuples1.ts, 295, 42)) ->T : Symbol(T, Decl(variadicTuples1.ts, 295, 22)) ->R : Symbol(R, Decl(variadicTuples1.ts, 295, 42)) - -call('hello', 32, (a, b) => 42); ->call : Symbol(call, Decl(variadicTuples1.ts, 291, 36)) ->a : Symbol(a, Decl(variadicTuples1.ts, 297, 19)) ->b : Symbol(b, Decl(variadicTuples1.ts, 297, 21)) ->>>>>>> master +>call : Symbol(call, Decl(variadicTuples1.ts, 321, 36)) +>a : Symbol(a, Decl(variadicTuples1.ts, 327, 19)) +>b : Symbol(b, Decl(variadicTuples1.ts, 327, 21)) // Would be nice to infer [...string[], (...args: string[]) => number] here // Requires [starting-fixed-part, ...rest-part, ending-fixed-part] tuple structure call(...sa, (...x) => 42); -<<<<<<< HEAD ->call : Symbol(call, Decl(variadicTuples1.ts, 315, 36)) ->sa : Symbol(sa, Decl(variadicTuples1.ts, 29, 13)) ->x : Symbol(x, Decl(variadicTuples1.ts, 326, 13)) -======= ->call : Symbol(call, Decl(variadicTuples1.ts, 291, 36)) +>call : Symbol(call, Decl(variadicTuples1.ts, 321, 36)) >sa : Symbol(sa, Decl(variadicTuples1.ts, 29, 13)) ->x : Symbol(x, Decl(variadicTuples1.ts, 302, 13)) ->>>>>>> master +>x : Symbol(x, Decl(variadicTuples1.ts, 332, 13))