diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 62756388dc4..bc93cce86b8 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -4705,14 +4705,14 @@ namespace ts { // If the parent is a tuple type, the rest element has a tuple type of the // remaining tuple element types. Otherwise, the rest element has an array type with same // element type as the parent type. - type = isTupleType(parentType) ? - sliceTupleType(parentType, index) : + type = everyType(parentType, isTupleType) ? + mapType(parentType, t => sliceTupleType(t, index)) : createArrayType(elementType); } else { // Use specific property type when parent is a tuple or numeric index type when parent is an array const index = pattern.elements.indexOf(declaration); - type = isTupleLikeType(parentType) ? + type = everyType(parentType, isTupleLikeType) ? getTupleElementType(parentType, index) || declaration.initializer && checkDeclarationInitializer(declaration) : elementType; if (!type) { @@ -4728,11 +4728,11 @@ namespace ts { } // In strict null checking mode, if a default value of a non-undefined type is specified, remove // undefined from the final type. - if (strictNullChecks && declaration.initializer && !(getFalsyFlags(checkExpressionCached(declaration.initializer)) & TypeFlags.Undefined)) { + if (strictNullChecks && declaration.initializer && !(getFalsyFlags(checkDeclarationInitializer(declaration)) & TypeFlags.Undefined)) { type = getTypeWithFacts(type, TypeFacts.NEUndefined); } return declaration.initializer && !getEffectiveTypeAnnotationNode(walkUpBindingElementsAndPatterns(declaration)) ? - getUnionType([type, checkExpressionCached(declaration.initializer)], UnionReduction.Subtype) : + getUnionType([type, checkDeclarationInitializer(declaration)], UnionReduction.Subtype) : type; } @@ -7331,10 +7331,10 @@ namespace ts { } } else if (isUnion) { - const index = !isLateBoundName(name) && ((isNumericLiteralName(name) && getIndexInfoOfType(type, IndexKind.Number)) || getIndexInfoOfType(type, IndexKind.String)); - if (index) { - checkFlags |= index.isReadonly ? CheckFlags.Readonly : 0; - indexTypes = append(indexTypes, index.type); + const indexInfo = !isLateBoundName(name) && (isNumericLiteralName(name) && getIndexInfoOfType(type, IndexKind.Number) || getIndexInfoOfType(type, IndexKind.String)); + if (indexInfo) { + checkFlags |= indexInfo.isReadonly ? CheckFlags.Readonly : 0; + indexTypes = append(indexTypes, isTupleType(type) ? getRestTypeOfTupleType(type) || undefinedType : indexInfo.type); } else { checkFlags |= CheckFlags.Partial; @@ -9342,11 +9342,12 @@ namespace ts { getFlowTypeOfReference(accessExpression, propType) : propType; } - if (isTupleType(objectType)) { - const restType = getRestTypeOfTupleType(objectType); - if (restType && isNumericLiteralName(propName) && +propName >= 0) { - return restType; + if (everyType(objectType, isTupleType) && isNumericLiteralName(propName) && +propName >= 0) { + if (accessNode && everyType(objectType, t => !(t).target.hasRestElement)) { + const indexNode = accessNode.kind === SyntaxKind.ElementAccessExpression ? accessNode.argumentExpression : accessNode.indexType; + error(indexNode, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName), typeToString(objectType)); } + return mapType(objectType, t => getRestTypeOfTupleType(t) || undefinedType); } } if (!(indexType.flags & TypeFlags.Nullable) && isTypeAssignableToKind(indexType, TypeFlags.StringLike | TypeFlags.NumberLike | TypeFlags.ESSymbolLike)) { @@ -12908,9 +12909,14 @@ namespace ts { } function getTupleElementType(type: Type, index: number) { - return isTupleType(type) ? - index < getLengthOfTupleType(type) ? type.typeArguments![index] : getRestTypeOfTupleType(type) : - getTypeOfPropertyOfType(type, "" + index as __String); + const propType = getTypeOfPropertyOfType(type, "" + index as __String); + if (propType) { + return propType; + } + if (everyType(type, isTupleType) && !everyType(type, t => !(t).target.hasRestElement)) { + return mapType(type, t => getRestTypeOfTupleType(t) || undefinedType); + } + return undefined; } function isNeitherUnitTypeNorNever(type: Type): boolean { @@ -14402,7 +14408,7 @@ namespace ts { } function getTypeOfDestructuredArrayElement(type: Type, index: number) { - return isTupleLikeType(type) && getTupleElementType(type, index) || + return everyType(type, isTupleLikeType) && getTupleElementType(type, index) || checkIteratedTypeOrElementType(type, /*errorNode*/ undefined, /*allowStringInput*/ false, /*allowAsyncIterables*/ false) || errorType; } @@ -14600,6 +14606,10 @@ namespace ts { return type.flags & TypeFlags.Union ? forEach((type).types, f) : f(type); } + function everyType(type: Type, f: (t: Type) => boolean): boolean { + return type.flags & TypeFlags.Union ? every((type).types, f) : f(type); + } + function filterType(type: Type, f: (t: Type) => boolean): Type { if (type.flags & TypeFlags.Union) { const types = (type).types; @@ -16707,11 +16717,6 @@ namespace ts { return mapType(type, t => getIndexTypeOfStructuredType(t, kind), /*noReductions*/ true); } - // Return true if the given contextual type is a tuple-like type - function contextualTypeIsTupleLikeType(type: Type): boolean { - return !!(type.flags & TypeFlags.Union ? forEach((type).types, isTupleLikeType) : isTupleLikeType(type)); - } - // In an object literal contextually typed by a type T, the contextual type of a property assignment is the type of // the matching property in T, if one exists. Otherwise, it is the type of the numeric index signature in T, if one // exists. Otherwise, it is the type of the string index signature in T, if one exists. @@ -17263,7 +17268,8 @@ namespace ts { } function getArrayLiteralTupleTypeIfApplicable(elementTypes: Type[], contextualType: Type | undefined, hasRestElement: boolean, elementCount = elementTypes.length) { - if (contextualType && contextualTypeIsTupleLikeType(contextualType)) { + // Infer a tuple type when the contextual type is or contains a tuple-like type + if (contextualType && forEachType(contextualType, isTupleLikeType)) { const minLength = elementCount - (hasRestElement ? 1 : 0); const pattern = contextualType.pattern; // If array literal is contextually typed by a binding pattern or an assignment pattern, pad the resulting @@ -18993,13 +18999,6 @@ namespace ts { error(indexExpression, Diagnostics.A_const_enum_member_can_only_be_accessed_using_a_string_literal); return errorType; } - if (isTupleType(objectType) && !objectType.target.hasRestElement && isNumericLiteral(indexExpression)) { - const index = +indexExpression.text; - const maximumIndex = length(objectType.target.typeParameters); - if (index >= maximumIndex) { - error(indexExpression, Diagnostics.Index_0_is_out_of_bounds_in_tuple_of_length_1, index, maximumIndex); - } - } return checkIndexedAccessIndexType(getIndexedAccessType(objectType, isForInVariableForNumericPropertyNames(indexExpression) ? numberType : indexType, node), node); } @@ -21740,7 +21739,7 @@ namespace ts { if (element.kind !== SyntaxKind.SpreadElement) { const propName = "" + elementIndex as __String; const type = isTypeAny(sourceType) ? sourceType : - isTupleLikeType(sourceType) ? getTupleElementType(sourceType, elementIndex) : + everyType(sourceType, isTupleLikeType) ? getTupleElementType(sourceType, elementIndex) : elementType; if (type) { return checkDestructuringAssignment(element, type, checkMode); @@ -21766,8 +21765,8 @@ namespace ts { } else { checkGrammarForDisallowedTrailingComma(node.elements, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma); - const type = isTupleType(sourceType) ? - sliceTupleType(sourceType, elementIndex) : + const type = everyType(sourceType, isTupleType) ? + mapType(sourceType, t => sliceTupleType(t, elementIndex)) : createArrayType(elementType); return checkDestructuringAssignment(restExpression, type, checkMode); } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 7baeeb7b65d..65a9e4bafb2 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2485,10 +2485,6 @@ "category": "Error", "code": 2732 }, - "Index '{0}' is out-of-bounds in tuple of length {1}.": { - "category": "Error", - "code": 2733 - }, "It is highly likely that you are missing a semicolon.": { "category": "Error", "code": 2734 diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 0f90748f3c0..8ee1e4571b3 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -36,23 +36,6 @@ namespace ts { Low = 250 } - function getPriorityValues(highPriorityValue: number): [number, number, number] { - const mediumPriorityValue = highPriorityValue * 2; - const lowPriorityValue = mediumPriorityValue * 4; - return [highPriorityValue, mediumPriorityValue, lowPriorityValue]; - } - - function pollingInterval(watchPriority: PollingInterval): number { - return pollingIntervalsForPriority[watchPriority]; - } - - const pollingIntervalsForPriority = getPriorityValues(250); - - /* @internal */ - export function watchFileUsingPriorityPollingInterval(host: System, fileName: string, callback: FileWatcherCallback, watchPriority: PollingInterval): FileWatcher { - return host.watchFile!(fileName, callback, pollingInterval(watchPriority)); - } - /* @internal */ export type HostWatchFile = (fileName: string, callback: FileWatcherCallback, pollingInterval: PollingInterval | undefined) => FileWatcher; /* @internal */ diff --git a/tests/baselines/reference/bestCommonTypeOfTuple.errors.txt b/tests/baselines/reference/bestCommonTypeOfTuple.errors.txt index 2c57099c3e8..e3c5dcc7986 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple.errors.txt +++ b/tests/baselines/reference/bestCommonTypeOfTuple.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts(22,13): error TS2733: Index '2' is out-of-bounds in tuple of length 2. -tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts(23,13): error TS2733: Index '2' is out-of-bounds in tuple of length 2. -tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts(24,13): error TS2733: Index '2' is out-of-bounds in tuple of length 2. -tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts(25,13): error TS2733: Index '3' is out-of-bounds in tuple of length 3. +tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts(22,13): error TS2339: Property '2' does not exist on type '[(x: number) => string, (x: number) => number]'. +tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts(23,13): error TS2339: Property '2' does not exist on type '[E1, E2]'. +tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts(24,13): error TS2339: Property '2' does not exist on type '[number, any]'. +tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts(25,13): error TS2339: Property '3' does not exist on type '[E1, E2, number]'. ==== tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple.ts (4 errors) ==== @@ -28,13 +28,13 @@ tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfT t4 = [E1.one, E2.two, 20]; var e1 = t1[2]; // {} ~ -!!! error TS2733: Index '2' is out-of-bounds in tuple of length 2. +!!! error TS2339: Property '2' does not exist on type '[(x: number) => string, (x: number) => number]'. var e2 = t2[2]; // {} ~ -!!! error TS2733: Index '2' is out-of-bounds in tuple of length 2. +!!! error TS2339: Property '2' does not exist on type '[E1, E2]'. var e3 = t3[2]; // any ~ -!!! error TS2733: Index '2' is out-of-bounds in tuple of length 2. +!!! error TS2339: Property '2' does not exist on type '[number, any]'. var e4 = t4[3]; // number ~ -!!! error TS2733: Index '3' is out-of-bounds in tuple of length 3. \ No newline at end of file +!!! error TS2339: Property '3' does not exist on type '[E1, E2, number]'. \ No newline at end of file diff --git a/tests/baselines/reference/bestCommonTypeOfTuple.types b/tests/baselines/reference/bestCommonTypeOfTuple.types index 612403084a5..4cc64a25505 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple.types +++ b/tests/baselines/reference/bestCommonTypeOfTuple.types @@ -76,26 +76,26 @@ t4 = [E1.one, E2.two, 20]; >20 : 20 var e1 = t1[2]; // {} ->e1 : ((x: number) => string) | ((x: number) => number) ->t1[2] : ((x: number) => string) | ((x: number) => number) +>e1 : undefined +>t1[2] : undefined >t1 : [(x: number) => string, (x: number) => number] >2 : 2 var e2 = t2[2]; // {} ->e2 : E1 | E2 ->t2[2] : E1 | E2 +>e2 : undefined +>t2[2] : undefined >t2 : [E1, E2] >2 : 2 var e3 = t3[2]; // any ->e3 : any ->t3[2] : any +>e3 : undefined +>t3[2] : undefined >t3 : [number, any] >2 : 2 var e4 = t4[3]; // number ->e4 : number ->t4[3] : number +>e4 : undefined +>t4[3] : undefined >t4 : [E1, E2, number] >3 : 3 diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.errors.txt b/tests/baselines/reference/bestCommonTypeOfTuple2.errors.txt index 80f40c74a07..d2fd301e131 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.errors.txt +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(17,14): error TS2733: Index '4' is out-of-bounds in tuple of length 2. -tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(18,14): error TS2733: Index '4' is out-of-bounds in tuple of length 2. -tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(19,14): error TS2733: Index '4' is out-of-bounds in tuple of length 2. -tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(20,14): error TS2733: Index '2' is out-of-bounds in tuple of length 2. -tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(21,14): error TS2733: Index '2' is out-of-bounds in tuple of length 2. +tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(17,14): error TS2339: Property '4' does not exist on type '[C, base]'. +tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(18,14): error TS2339: Property '4' does not exist on type '[C, D]'. +tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(19,14): error TS2339: Property '4' does not exist on type '[C1, D1]'. +tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(20,14): error TS2339: Property '2' does not exist on type '[base1, C1]'. +tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts(21,14): error TS2339: Property '2' does not exist on type '[C1, F]'. ==== tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfTuple2.ts (5 errors) ==== @@ -24,17 +24,17 @@ tests/cases/conformance/types/typeRelationships/bestCommonType/bestCommonTypeOfT var e11 = t1[4]; // base ~ -!!! error TS2733: Index '4' is out-of-bounds in tuple of length 2. +!!! error TS2339: Property '4' does not exist on type '[C, base]'. var e21 = t2[4]; // {} ~ -!!! error TS2733: Index '4' is out-of-bounds in tuple of length 2. +!!! error TS2339: Property '4' does not exist on type '[C, D]'. var e31 = t3[4]; // C1 ~ -!!! error TS2733: Index '4' is out-of-bounds in tuple of length 2. +!!! error TS2339: Property '4' does not exist on type '[C1, D1]'. var e41 = t4[2]; // base1 ~ -!!! error TS2733: Index '2' is out-of-bounds in tuple of length 2. +!!! error TS2339: Property '2' does not exist on type '[base1, C1]'. var e51 = t5[2]; // {} ~ -!!! error TS2733: Index '2' is out-of-bounds in tuple of length 2. +!!! error TS2339: Property '2' does not exist on type '[C1, F]'. \ No newline at end of file diff --git a/tests/baselines/reference/bestCommonTypeOfTuple2.types b/tests/baselines/reference/bestCommonTypeOfTuple2.types index 33691bc65a9..6b3e6a3789c 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple2.types +++ b/tests/baselines/reference/bestCommonTypeOfTuple2.types @@ -49,32 +49,32 @@ var t5: [C1, F] >t5 : [C1, F] var e11 = t1[4]; // base ->e11 : base | C ->t1[4] : base | C +>e11 : undefined +>t1[4] : undefined >t1 : [C, base] >4 : 4 var e21 = t2[4]; // {} ->e21 : C | D ->t2[4] : C | D +>e21 : undefined +>t2[4] : undefined >t2 : [C, D] >4 : 4 var e31 = t3[4]; // C1 ->e31 : C1 | D1 ->t3[4] : C1 | D1 +>e31 : undefined +>t3[4] : undefined >t3 : [C1, D1] >4 : 4 var e41 = t4[2]; // base1 ->e41 : base1 | C1 ->t4[2] : base1 | C1 +>e41 : undefined +>t4[2] : undefined >t4 : [base1, C1] >2 : 2 var e51 = t5[2]; // {} ->e51 : F | C1 ->t5[2] : F | C1 +>e51 : undefined +>t5[2] : undefined >t5 : [C1, F] >2 : 2 diff --git a/tests/baselines/reference/castingTuple.errors.txt b/tests/baselines/reference/castingTuple.errors.txt index e8bc9133a8a..08e2b32a858 100644 --- a/tests/baselines/reference/castingTuple.errors.txt +++ b/tests/baselines/reference/castingTuple.errors.txt @@ -6,7 +6,7 @@ tests/cases/conformance/types/tuple/castingTuple.ts(14,15): error TS2352: Conver tests/cases/conformance/types/tuple/castingTuple.ts(15,14): error TS2352: Conversion of type '[number, string]' to type '[number, string, boolean]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. tests/cases/conformance/types/tuple/castingTuple.ts(18,21): error TS2352: Conversion of type '[C, D]' to type '[C, D, A]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. Property '2' is missing in type '[C, D]'. -tests/cases/conformance/types/tuple/castingTuple.ts(20,33): error TS2733: Index '5' is out-of-bounds in tuple of length 3. +tests/cases/conformance/types/tuple/castingTuple.ts(20,33): error TS2339: Property '5' does not exist on type '[C, D, A]'. tests/cases/conformance/types/tuple/castingTuple.ts(30,10): error TS2352: Conversion of type '[number, string]' to type '[number, number]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. Type 'string' is not comparable to type 'number'. tests/cases/conformance/types/tuple/castingTuple.ts(31,10): error TS2352: Conversion of type '[C, D]' to type '[A, I]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. @@ -50,7 +50,7 @@ tests/cases/conformance/types/tuple/castingTuple.ts(33,1): error TS2304: Cannot var eleFromCDA1 = classCDATuple[2]; // A var eleFromCDA2 = classCDATuple[5]; // C | D | A ~ -!!! error TS2733: Index '5' is out-of-bounds in tuple of length 3. +!!! error TS2339: Property '5' does not exist on type '[C, D, A]'. var t10: [E1, E2] = [E1.one, E2.one]; var t11 = <[number, number]>t10; var array1 = <{}[]>emptyObjTuple; diff --git a/tests/baselines/reference/castingTuple.types b/tests/baselines/reference/castingTuple.types index 729c090e1ca..0c20dadc2be 100644 --- a/tests/baselines/reference/castingTuple.types +++ b/tests/baselines/reference/castingTuple.types @@ -83,8 +83,8 @@ var eleFromCDA1 = classCDATuple[2]; // A >2 : 2 var eleFromCDA2 = classCDATuple[5]; // C | D | A ->eleFromCDA2 : A | C | D ->classCDATuple[5] : A | C | D +>eleFromCDA2 : undefined +>classCDATuple[5] : undefined >classCDATuple : [C, D, A] >5 : 5 diff --git a/tests/baselines/reference/declarationsAndAssignments.errors.txt b/tests/baselines/reference/declarationsAndAssignments.errors.txt index 9f8cdc11851..46536d6fff0 100644 --- a/tests/baselines/reference/declarationsAndAssignments.errors.txt +++ b/tests/baselines/reference/declarationsAndAssignments.errors.txt @@ -5,7 +5,7 @@ tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(23,25): tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(24,19): error TS2353: Object literal may only specify known properties, and 'x' does not exist in type '{ y: any; }'. tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(28,28): error TS2353: Object literal may only specify known properties, and 'y' does not exist in type '{ x: any; }'. tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(29,22): error TS2353: Object literal may only specify known properties, and 'x' does not exist in type '{ y: any; }'. -tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(58,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string | 1', but here has type 'string'. +tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(58,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string | number', but here has type 'string'. tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(62,10): error TS2525: Initializer provides no value for this binding element and the binding element has no default value. tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(62,13): error TS2525: Initializer provides no value for this binding element and the binding element has no default value. tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(62,16): error TS2525: Initializer provides no value for this binding element and the binding element has no default value. @@ -97,7 +97,7 @@ tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(138,9): var x: number; var y: string; ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string | 1', but here has type 'string'. +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string | number', but here has type 'string'. } function f8() { diff --git a/tests/baselines/reference/declarationsAndAssignments.types b/tests/baselines/reference/declarationsAndAssignments.types index e7db6f84fdb..edb00c9879b 100644 --- a/tests/baselines/reference/declarationsAndAssignments.types +++ b/tests/baselines/reference/declarationsAndAssignments.types @@ -238,7 +238,7 @@ function f7() { var [x = 0, y = 1] = [1, "hello"]; // Error, initializer for y must be string >x : number >0 : 0 ->y : string | 1 +>y : string | number >1 : 1 >[1, "hello"] : [number, string] >1 : 1 @@ -248,7 +248,7 @@ function f7() { >x : number var y: string; ->y : string | 1 +>y : string | number } function f8() { diff --git a/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment2.types b/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment2.types index 127e6f46f79..aa4f3a73b09 100644 --- a/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment2.types +++ b/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment2.types @@ -39,7 +39,7 @@ function bar(): J { >3 : 3 } var [b3 = "string", b4, b5] = bar(); // Error ->b3 : Number | "string" +>b3 : string | Number >"string" : "string" >b4 : Number >b5 : Number diff --git a/tests/baselines/reference/destructuringVariableDeclaration1ES5.types b/tests/baselines/reference/destructuringVariableDeclaration1ES5.types index 58427ebd849..fc153be7c60 100644 --- a/tests/baselines/reference/destructuringVariableDeclaration1ES5.types +++ b/tests/baselines/reference/destructuringVariableDeclaration1ES5.types @@ -62,9 +62,9 @@ var [b2 = 3, b3 = true, b4 = temp] = [3, false, { t1: false, t2: "hello" }]; >"hello" : "hello" var [b5 = 3, b6 = true, b7 = temp] = [undefined, undefined, undefined]; ->b5 : 3 +>b5 : number >3 : 3 ->b6 : true +>b6 : boolean >true : true >b7 : { t1: boolean; t2: string; } >temp : { t1: boolean; t2: string; } diff --git a/tests/baselines/reference/destructuringVariableDeclaration1ES5iterable.types b/tests/baselines/reference/destructuringVariableDeclaration1ES5iterable.types index f8d01563d50..9c943356d80 100644 --- a/tests/baselines/reference/destructuringVariableDeclaration1ES5iterable.types +++ b/tests/baselines/reference/destructuringVariableDeclaration1ES5iterable.types @@ -62,9 +62,9 @@ var [b2 = 3, b3 = true, b4 = temp] = [3, false, { t1: false, t2: "hello" }]; >"hello" : "hello" var [b5 = 3, b6 = true, b7 = temp] = [undefined, undefined, undefined]; ->b5 : 3 +>b5 : number >3 : 3 ->b6 : true +>b6 : boolean >true : true >b7 : { t1: boolean; t2: string; } >temp : { t1: boolean; t2: string; } diff --git a/tests/baselines/reference/destructuringVariableDeclaration1ES6.types b/tests/baselines/reference/destructuringVariableDeclaration1ES6.types index 8b9566c3e1c..bf00e1955ca 100644 --- a/tests/baselines/reference/destructuringVariableDeclaration1ES6.types +++ b/tests/baselines/reference/destructuringVariableDeclaration1ES6.types @@ -62,9 +62,9 @@ var [b2 = 3, b3 = true, b4 = temp] = [3, false, { t1: false, t2: "hello" }]; >"hello" : "hello" var [b5 = 3, b6 = true, b7 = temp] = [undefined, undefined, undefined]; ->b5 : 3 +>b5 : number >3 : 3 ->b6 : true +>b6 : boolean >true : true >b7 : { t1: boolean; t2: string; } >temp : { t1: boolean; t2: string; } diff --git a/tests/baselines/reference/emptyTuplesTypeAssertion01.errors.txt b/tests/baselines/reference/emptyTuplesTypeAssertion01.errors.txt index 4b85b821a89..e3b857412cc 100644 --- a/tests/baselines/reference/emptyTuplesTypeAssertion01.errors.txt +++ b/tests/baselines/reference/emptyTuplesTypeAssertion01.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion01.ts(2,11): error TS2733: Index '0' is out-of-bounds in tuple of length 0. +tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion01.ts(2,11): error TS2339: Property '0' does not exist on type '[]'. ==== tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion01.ts (1 errors) ==== let x = <[]>[]; let y = x[0]; ~ -!!! error TS2733: Index '0' is out-of-bounds in tuple of length 0. \ No newline at end of file +!!! error TS2339: Property '0' does not exist on type '[]'. \ No newline at end of file diff --git a/tests/baselines/reference/emptyTuplesTypeAssertion01.js b/tests/baselines/reference/emptyTuplesTypeAssertion01.js index 8ee48da9a56..d213d3b1dca 100644 --- a/tests/baselines/reference/emptyTuplesTypeAssertion01.js +++ b/tests/baselines/reference/emptyTuplesTypeAssertion01.js @@ -9,4 +9,4 @@ var y = x[0]; //// [emptyTuplesTypeAssertion01.d.ts] declare let x: []; -declare let y: never; +declare let y: undefined; diff --git a/tests/baselines/reference/emptyTuplesTypeAssertion01.types b/tests/baselines/reference/emptyTuplesTypeAssertion01.types index 0a278c01d31..be26dc06955 100644 --- a/tests/baselines/reference/emptyTuplesTypeAssertion01.types +++ b/tests/baselines/reference/emptyTuplesTypeAssertion01.types @@ -5,8 +5,8 @@ let x = <[]>[]; >[] : [] let y = x[0]; ->y : never ->x[0] : never +>y : undefined +>x[0] : undefined >x : [] >0 : 0 diff --git a/tests/baselines/reference/emptyTuplesTypeAssertion02.errors.txt b/tests/baselines/reference/emptyTuplesTypeAssertion02.errors.txt index 3969ed0fc2d..34d22dc673a 100644 --- a/tests/baselines/reference/emptyTuplesTypeAssertion02.errors.txt +++ b/tests/baselines/reference/emptyTuplesTypeAssertion02.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion02.ts(2,11): error TS2733: Index '0' is out-of-bounds in tuple of length 0. +tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion02.ts(2,11): error TS2339: Property '0' does not exist on type '[]'. ==== tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion02.ts (1 errors) ==== let x = [] as []; let y = x[0]; ~ -!!! error TS2733: Index '0' is out-of-bounds in tuple of length 0. \ No newline at end of file +!!! error TS2339: Property '0' does not exist on type '[]'. \ No newline at end of file diff --git a/tests/baselines/reference/emptyTuplesTypeAssertion02.js b/tests/baselines/reference/emptyTuplesTypeAssertion02.js index 41607e53b40..2dbfd9ea7b8 100644 --- a/tests/baselines/reference/emptyTuplesTypeAssertion02.js +++ b/tests/baselines/reference/emptyTuplesTypeAssertion02.js @@ -9,4 +9,4 @@ var y = x[0]; //// [emptyTuplesTypeAssertion02.d.ts] declare let x: []; -declare let y: never; +declare let y: undefined; diff --git a/tests/baselines/reference/emptyTuplesTypeAssertion02.types b/tests/baselines/reference/emptyTuplesTypeAssertion02.types index ef35e90eac2..3bba21cc859 100644 --- a/tests/baselines/reference/emptyTuplesTypeAssertion02.types +++ b/tests/baselines/reference/emptyTuplesTypeAssertion02.types @@ -5,8 +5,8 @@ let x = [] as []; >[] : [] let y = x[0]; ->y : never ->x[0] : never +>y : undefined +>x[0] : undefined >x : [] >0 : 0 diff --git a/tests/baselines/reference/for-of43.types b/tests/baselines/reference/for-of43.types index 2327f1bafed..48466611d20 100644 --- a/tests/baselines/reference/for-of43.types +++ b/tests/baselines/reference/for-of43.types @@ -13,7 +13,7 @@ for (var {x: a = "", y: b = true} of array) { >a : string >"" : "" >y : any ->b : number | true +>b : number | boolean >true : true >array : { x: string; y: number; }[] diff --git a/tests/baselines/reference/genericCallWithTupleType.errors.txt b/tests/baselines/reference/genericCallWithTupleType.errors.txt index 6e6732ebb09..b8f354545de 100644 --- a/tests/baselines/reference/genericCallWithTupleType.errors.txt +++ b/tests/baselines/reference/genericCallWithTupleType.errors.txt @@ -1,11 +1,10 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(12,1): error TS2322: Type '[string, number, boolean, boolean]' is not assignable to type '[string, number]'. Types of property 'length' are incompatible. Type '4' is not assignable to type '2'. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(13,20): error TS2733: Index '2' is out-of-bounds in tuple of length 2. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(14,1): error TS2322: Type '{ a: string; }' is not assignable to type 'string | number'. - Type '{ a: string; }' is not assignable to type 'number'. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(14,11): error TS2733: Index '3' is out-of-bounds in tuple of length 2. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(15,20): error TS2733: Index '3' is out-of-bounds in tuple of length 2. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(13,20): error TS2339: Property '2' does not exist on type '[string, number]'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(14,1): error TS2322: Type '{ a: string; }' is not assignable to type 'undefined'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(14,11): error TS2339: Property '3' does not exist on type '[string, number]'. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(15,20): error TS2339: Property '3' does not exist on type '[string, number]'. tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(22,14): error TS2322: Type 'number' is not assignable to type 'string'. tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(22,17): error TS2322: Type 'string' is not assignable to type 'number'. tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(23,14): error TS2322: Type '{}' is not assignable to type 'string'. @@ -33,16 +32,15 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTup !!! error TS2322: Type '4' is not assignable to type '2'. var e3 = i1.tuple1[2]; // {} ~ -!!! error TS2733: Index '2' is out-of-bounds in tuple of length 2. +!!! error TS2339: Property '2' does not exist on type '[string, number]'. i1.tuple1[3] = { a: "string" }; ~~~~~~~~~~~~ -!!! error TS2322: Type '{ a: string; }' is not assignable to type 'string | number'. -!!! error TS2322: Type '{ a: string; }' is not assignable to type 'number'. +!!! error TS2322: Type '{ a: string; }' is not assignable to type 'undefined'. ~ -!!! error TS2733: Index '3' is out-of-bounds in tuple of length 2. +!!! error TS2339: Property '3' does not exist on type '[string, number]'. var e4 = i1.tuple1[3]; // {} ~ -!!! error TS2733: Index '3' is out-of-bounds in tuple of length 2. +!!! error TS2339: Property '3' does not exist on type '[string, number]'. i2.tuple1 = ["foo", 5]; i2.tuple1 = ["foo", "bar"]; i2.tuple1 = [5, "bar"]; diff --git a/tests/baselines/reference/genericCallWithTupleType.types b/tests/baselines/reference/genericCallWithTupleType.types index 359ead39870..07be141f789 100644 --- a/tests/baselines/reference/genericCallWithTupleType.types +++ b/tests/baselines/reference/genericCallWithTupleType.types @@ -48,8 +48,8 @@ i1.tuple1 = ["foo", 5, false, true]; >true : true var e3 = i1.tuple1[2]; // {} ->e3 : string | number ->i1.tuple1[2] : string | number +>e3 : undefined +>i1.tuple1[2] : undefined >i1.tuple1 : [string, number] >i1 : I >tuple1 : [string, number] @@ -57,7 +57,7 @@ var e3 = i1.tuple1[2]; // {} i1.tuple1[3] = { a: "string" }; >i1.tuple1[3] = { a: "string" } : { a: string; } ->i1.tuple1[3] : string | number +>i1.tuple1[3] : undefined >i1.tuple1 : [string, number] >i1 : I >tuple1 : [string, number] @@ -67,8 +67,8 @@ i1.tuple1[3] = { a: "string" }; >"string" : "string" var e4 = i1.tuple1[3]; // {} ->e4 : string | number ->i1.tuple1[3] : string | number +>e4 : undefined +>i1.tuple1[3] : undefined >i1.tuple1 : [string, number] >i1 : I >tuple1 : [string, number] diff --git a/tests/baselines/reference/indexerWithTuple.errors.txt b/tests/baselines/reference/indexerWithTuple.errors.txt index 4e931a3ad6e..45cddd9313f 100644 --- a/tests/baselines/reference/indexerWithTuple.errors.txt +++ b/tests/baselines/reference/indexerWithTuple.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/types/tuple/indexerWithTuple.ts(11,25): error TS2733: Index '2' is out-of-bounds in tuple of length 2. -tests/cases/conformance/types/tuple/indexerWithTuple.ts(17,27): error TS2733: Index '2' is out-of-bounds in tuple of length 2. -tests/cases/conformance/types/tuple/indexerWithTuple.ts(20,30): error TS2733: Index '2' is out-of-bounds in tuple of length 2. -tests/cases/conformance/types/tuple/indexerWithTuple.ts(28,30): error TS2733: Index '2' is out-of-bounds in tuple of length 2. +tests/cases/conformance/types/tuple/indexerWithTuple.ts(11,25): error TS2339: Property '2' does not exist on type '[string, number]'. +tests/cases/conformance/types/tuple/indexerWithTuple.ts(17,27): error TS2339: Property '2' does not exist on type '[number, [string, number]]'. +tests/cases/conformance/types/tuple/indexerWithTuple.ts(20,30): error TS2339: Property '2' does not exist on type '[number, string | number]'. +tests/cases/conformance/types/tuple/indexerWithTuple.ts(28,30): error TS2339: Property '2' does not exist on type '[boolean, string | number]'. ==== tests/cases/conformance/types/tuple/indexerWithTuple.ts (4 errors) ==== @@ -17,7 +17,7 @@ tests/cases/conformance/types/tuple/indexerWithTuple.ts(28,30): error TS2733: In var ele11 = strNumTuple[1]; // number var ele12 = strNumTuple[2]; // string | number ~ -!!! error TS2733: Index '2' is out-of-bounds in tuple of length 2. +!!! error TS2339: Property '2' does not exist on type '[string, number]'. var ele13 = strNumTuple[idx0]; // string | number var ele14 = strNumTuple[idx1]; // string | number var ele15 = strNumTuple["0"]; // string @@ -25,12 +25,12 @@ tests/cases/conformance/types/tuple/indexerWithTuple.ts(28,30): error TS2733: In var strNumTuple1 = numTupleTuple[1]; //[string, number]; var ele17 = numTupleTuple[2]; // number | [string, number] ~ -!!! error TS2733: Index '2' is out-of-bounds in tuple of length 2. +!!! error TS2339: Property '2' does not exist on type '[number, [string, number]]'. var eleUnion10 = unionTuple1[0]; // number var eleUnion11 = unionTuple1[1]; // string | number var eleUnion12 = unionTuple1[2]; // string | number ~ -!!! error TS2733: Index '2' is out-of-bounds in tuple of length 2. +!!! error TS2339: Property '2' does not exist on type '[number, string | number]'. var eleUnion13 = unionTuple1[idx0]; // string | number var eleUnion14 = unionTuple1[idx1]; // string | number var eleUnion15 = unionTuple1["0"]; // number @@ -40,7 +40,7 @@ tests/cases/conformance/types/tuple/indexerWithTuple.ts(28,30): error TS2733: In var eleUnion21 = unionTuple2[1]; // string | number var eleUnion22 = unionTuple2[2]; // string | number | boolean ~ -!!! error TS2733: Index '2' is out-of-bounds in tuple of length 2. +!!! error TS2339: Property '2' does not exist on type '[boolean, string | number]'. var eleUnion23 = unionTuple2[idx0]; // string | number | boolean var eleUnion24 = unionTuple2[idx1]; // string | number | boolean var eleUnion25 = unionTuple2["0"]; // boolean diff --git a/tests/baselines/reference/indexerWithTuple.types b/tests/baselines/reference/indexerWithTuple.types index 8a14fa9816e..01ede87ca9f 100644 --- a/tests/baselines/reference/indexerWithTuple.types +++ b/tests/baselines/reference/indexerWithTuple.types @@ -47,8 +47,8 @@ var ele11 = strNumTuple[1]; // number >1 : 1 var ele12 = strNumTuple[2]; // string | number ->ele12 : string | number ->strNumTuple[2] : string | number +>ele12 : undefined +>strNumTuple[2] : undefined >strNumTuple : [string, number] >2 : 2 @@ -83,8 +83,8 @@ var strNumTuple1 = numTupleTuple[1]; //[string, number]; >1 : 1 var ele17 = numTupleTuple[2]; // number | [string, number] ->ele17 : number | [string, number] ->numTupleTuple[2] : number | [string, number] +>ele17 : undefined +>numTupleTuple[2] : undefined >numTupleTuple : [number, [string, number]] >2 : 2 @@ -101,8 +101,8 @@ var eleUnion11 = unionTuple1[1]; // string | number >1 : 1 var eleUnion12 = unionTuple1[2]; // string | number ->eleUnion12 : string | number ->unionTuple1[2] : string | number +>eleUnion12 : undefined +>unionTuple1[2] : undefined >unionTuple1 : [number, string | number] >2 : 2 @@ -143,8 +143,8 @@ var eleUnion21 = unionTuple2[1]; // string | number >1 : 1 var eleUnion22 = unionTuple2[2]; // string | number | boolean ->eleUnion22 : string | number | boolean ->unionTuple2[2] : string | number | boolean +>eleUnion22 : undefined +>unionTuple2[2] : undefined >unionTuple2 : [boolean, string | number] >2 : 2 diff --git a/tests/baselines/reference/keyofAndIndexedAccess.js b/tests/baselines/reference/keyofAndIndexedAccess.js index 29a39b32251..b7d794285fa 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.js +++ b/tests/baselines/reference/keyofAndIndexedAccess.js @@ -61,12 +61,11 @@ type Q21 = Shape[WIDTH_OR_HEIGHT]; // number type Q30 = [string, number][0]; // string type Q31 = [string, number][1]; // number -type Q32 = [string, number][2]; // string | number +type Q32 = [string, number][number]; // string | number type Q33 = [string, number][E.A]; // string type Q34 = [string, number][E.B]; // number -type Q35 = [string, number][E.C]; // string | number -type Q36 = [string, number]["0"]; // string -type Q37 = [string, number]["1"]; // string +type Q35 = [string, number]["0"]; // string +type Q36 = [string, number]["1"]; // string type Q40 = (Shape | Options)["visible"]; // boolean | "yes" | "no" type Q41 = (Shape & Options)["visible"]; // true & "yes" | true & "no" | false & "yes" | false & "no" @@ -1147,12 +1146,11 @@ declare type Q20 = Shape[NAME]; declare type Q21 = Shape[WIDTH_OR_HEIGHT]; declare type Q30 = [string, number][0]; declare type Q31 = [string, number][1]; -declare type Q32 = [string, number][2]; +declare type Q32 = [string, number][number]; declare type Q33 = [string, number][E.A]; declare type Q34 = [string, number][E.B]; -declare type Q35 = [string, number][E.C]; -declare type Q36 = [string, number]["0"]; -declare type Q37 = [string, number]["1"]; +declare type Q35 = [string, number]["0"]; +declare type Q36 = [string, number]["1"]; declare type Q40 = (Shape | Options)["visible"]; declare type Q41 = (Shape & Options)["visible"]; declare type Q50 = Dictionary["howdy"]; diff --git a/tests/baselines/reference/keyofAndIndexedAccess.symbols b/tests/baselines/reference/keyofAndIndexedAccess.symbols index d69da8b8ed7..9881365b470 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.symbols +++ b/tests/baselines/reference/keyofAndIndexedAccess.symbols @@ -174,11 +174,11 @@ type Q30 = [string, number][0]; // string type Q31 = [string, number][1]; // number >Q31 : Symbol(Q31, Decl(keyofAndIndexedAccess.ts, 60, 31)) -type Q32 = [string, number][2]; // string | number +type Q32 = [string, number][number]; // string | number >Q32 : Symbol(Q32, Decl(keyofAndIndexedAccess.ts, 61, 31)) type Q33 = [string, number][E.A]; // string ->Q33 : Symbol(Q33, Decl(keyofAndIndexedAccess.ts, 62, 31)) +>Q33 : Symbol(Q33, Decl(keyofAndIndexedAccess.ts, 62, 36)) >E : Symbol(E, Decl(keyofAndIndexedAccess.ts, 21, 48)) >A : Symbol(E.A, Decl(keyofAndIndexedAccess.ts, 23, 14)) @@ -187,2153 +187,2148 @@ type Q34 = [string, number][E.B]; // number >E : Symbol(E, Decl(keyofAndIndexedAccess.ts, 21, 48)) >B : Symbol(E.B, Decl(keyofAndIndexedAccess.ts, 23, 17)) -type Q35 = [string, number][E.C]; // string | number +type Q35 = [string, number]["0"]; // string >Q35 : Symbol(Q35, Decl(keyofAndIndexedAccess.ts, 64, 33)) ->E : Symbol(E, Decl(keyofAndIndexedAccess.ts, 21, 48)) ->C : Symbol(E.C, Decl(keyofAndIndexedAccess.ts, 23, 20)) -type Q36 = [string, number]["0"]; // string +type Q36 = [string, number]["1"]; // string >Q36 : Symbol(Q36, Decl(keyofAndIndexedAccess.ts, 65, 33)) -type Q37 = [string, number]["1"]; // string ->Q37 : Symbol(Q37, Decl(keyofAndIndexedAccess.ts, 66, 33)) - type Q40 = (Shape | Options)["visible"]; // boolean | "yes" | "no" ->Q40 : Symbol(Q40, Decl(keyofAndIndexedAccess.ts, 67, 33)) +>Q40 : Symbol(Q40, Decl(keyofAndIndexedAccess.ts, 66, 33)) >Shape : Symbol(Shape, Decl(keyofAndIndexedAccess.ts, 0, 0)) >Options : Symbol(Options, Decl(keyofAndIndexedAccess.ts, 14, 1)) type Q41 = (Shape & Options)["visible"]; // true & "yes" | true & "no" | false & "yes" | false & "no" ->Q41 : Symbol(Q41, Decl(keyofAndIndexedAccess.ts, 69, 40)) +>Q41 : Symbol(Q41, Decl(keyofAndIndexedAccess.ts, 68, 40)) >Shape : Symbol(Shape, Decl(keyofAndIndexedAccess.ts, 0, 0)) >Options : Symbol(Options, Decl(keyofAndIndexedAccess.ts, 14, 1)) type Q50 = Dictionary["howdy"]; // Shape ->Q50 : Symbol(Q50, Decl(keyofAndIndexedAccess.ts, 70, 40)) +>Q50 : Symbol(Q50, Decl(keyofAndIndexedAccess.ts, 69, 40)) >Dictionary : Symbol(Dictionary, Decl(keyofAndIndexedAccess.ts, 18, 1)) >Shape : Symbol(Shape, Decl(keyofAndIndexedAccess.ts, 0, 0)) type Q51 = Dictionary[123]; // Shape ->Q51 : Symbol(Q51, Decl(keyofAndIndexedAccess.ts, 72, 38)) +>Q51 : Symbol(Q51, Decl(keyofAndIndexedAccess.ts, 71, 38)) >Dictionary : Symbol(Dictionary, Decl(keyofAndIndexedAccess.ts, 18, 1)) >Shape : Symbol(Shape, Decl(keyofAndIndexedAccess.ts, 0, 0)) type Q52 = Dictionary[E.B]; // Shape ->Q52 : Symbol(Q52, Decl(keyofAndIndexedAccess.ts, 73, 34)) +>Q52 : Symbol(Q52, Decl(keyofAndIndexedAccess.ts, 72, 34)) >Dictionary : Symbol(Dictionary, Decl(keyofAndIndexedAccess.ts, 18, 1)) >Shape : Symbol(Shape, Decl(keyofAndIndexedAccess.ts, 0, 0)) >E : Symbol(E, Decl(keyofAndIndexedAccess.ts, 21, 48)) >B : Symbol(E.B, Decl(keyofAndIndexedAccess.ts, 23, 17)) declare let cond: boolean; ->cond : Symbol(cond, Decl(keyofAndIndexedAccess.ts, 76, 11)) +>cond : Symbol(cond, Decl(keyofAndIndexedAccess.ts, 75, 11)) function getProperty(obj: T, key: K) { ->getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 76, 26)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 78, 21)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 78, 23)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 78, 21)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 78, 43)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 78, 21)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 78, 50)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 78, 23)) +>getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 75, 26)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 77, 21)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 77, 23)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 77, 21)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 77, 43)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 77, 21)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 77, 50)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 77, 23)) return obj[key]; ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 78, 43)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 78, 50)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 77, 43)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 77, 50)) } function setProperty(obj: T, key: K, value: T[K]) { ->setProperty : Symbol(setProperty, Decl(keyofAndIndexedAccess.ts, 80, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 82, 21)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 82, 23)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 82, 21)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 82, 43)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 82, 21)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 82, 50)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 82, 23)) ->value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 82, 58)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 82, 21)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 82, 23)) +>setProperty : Symbol(setProperty, Decl(keyofAndIndexedAccess.ts, 79, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 81, 21)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 81, 23)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 81, 21)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 81, 43)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 81, 21)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 81, 50)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 81, 23)) +>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 81, 58)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 81, 21)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 81, 23)) obj[key] = value; ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 82, 43)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 82, 50)) ->value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 82, 58)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 81, 43)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 81, 50)) +>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 81, 58)) } function f10(shape: Shape) { ->f10 : Symbol(f10, Decl(keyofAndIndexedAccess.ts, 84, 1)) ->shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 86, 13)) +>f10 : Symbol(f10, Decl(keyofAndIndexedAccess.ts, 83, 1)) +>shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 85, 13)) >Shape : Symbol(Shape, Decl(keyofAndIndexedAccess.ts, 0, 0)) let name = getProperty(shape, "name"); // string ->name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 87, 7)) ->getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 76, 26)) ->shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 86, 13)) +>name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 86, 7)) +>getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 75, 26)) +>shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 85, 13)) let widthOrHeight = getProperty(shape, cond ? "width" : "height"); // number ->widthOrHeight : Symbol(widthOrHeight, Decl(keyofAndIndexedAccess.ts, 88, 7)) ->getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 76, 26)) ->shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 86, 13)) ->cond : Symbol(cond, Decl(keyofAndIndexedAccess.ts, 76, 11)) +>widthOrHeight : Symbol(widthOrHeight, Decl(keyofAndIndexedAccess.ts, 87, 7)) +>getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 75, 26)) +>shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 85, 13)) +>cond : Symbol(cond, Decl(keyofAndIndexedAccess.ts, 75, 11)) let nameOrVisible = getProperty(shape, cond ? "name" : "visible"); // string | boolean ->nameOrVisible : Symbol(nameOrVisible, Decl(keyofAndIndexedAccess.ts, 89, 7)) ->getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 76, 26)) ->shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 86, 13)) ->cond : Symbol(cond, Decl(keyofAndIndexedAccess.ts, 76, 11)) +>nameOrVisible : Symbol(nameOrVisible, Decl(keyofAndIndexedAccess.ts, 88, 7)) +>getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 75, 26)) +>shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 85, 13)) +>cond : Symbol(cond, Decl(keyofAndIndexedAccess.ts, 75, 11)) setProperty(shape, "name", "rectangle"); ->setProperty : Symbol(setProperty, Decl(keyofAndIndexedAccess.ts, 80, 1)) ->shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 86, 13)) +>setProperty : Symbol(setProperty, Decl(keyofAndIndexedAccess.ts, 79, 1)) +>shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 85, 13)) setProperty(shape, cond ? "width" : "height", 10); ->setProperty : Symbol(setProperty, Decl(keyofAndIndexedAccess.ts, 80, 1)) ->shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 86, 13)) ->cond : Symbol(cond, Decl(keyofAndIndexedAccess.ts, 76, 11)) +>setProperty : Symbol(setProperty, Decl(keyofAndIndexedAccess.ts, 79, 1)) +>shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 85, 13)) +>cond : Symbol(cond, Decl(keyofAndIndexedAccess.ts, 75, 11)) setProperty(shape, cond ? "name" : "visible", true); // Technically not safe ->setProperty : Symbol(setProperty, Decl(keyofAndIndexedAccess.ts, 80, 1)) ->shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 86, 13)) ->cond : Symbol(cond, Decl(keyofAndIndexedAccess.ts, 76, 11)) +>setProperty : Symbol(setProperty, Decl(keyofAndIndexedAccess.ts, 79, 1)) +>shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 85, 13)) +>cond : Symbol(cond, Decl(keyofAndIndexedAccess.ts, 75, 11)) } function f11(a: Shape[]) { ->f11 : Symbol(f11, Decl(keyofAndIndexedAccess.ts, 93, 1)) ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 95, 13)) +>f11 : Symbol(f11, Decl(keyofAndIndexedAccess.ts, 92, 1)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 94, 13)) >Shape : Symbol(Shape, Decl(keyofAndIndexedAccess.ts, 0, 0)) let len = getProperty(a, "length"); // number ->len : Symbol(len, Decl(keyofAndIndexedAccess.ts, 96, 7)) ->getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 76, 26)) ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 95, 13)) +>len : Symbol(len, Decl(keyofAndIndexedAccess.ts, 95, 7)) +>getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 75, 26)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 94, 13)) setProperty(a, "length", len); ->setProperty : Symbol(setProperty, Decl(keyofAndIndexedAccess.ts, 80, 1)) ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 95, 13)) ->len : Symbol(len, Decl(keyofAndIndexedAccess.ts, 96, 7)) +>setProperty : Symbol(setProperty, Decl(keyofAndIndexedAccess.ts, 79, 1)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 94, 13)) +>len : Symbol(len, Decl(keyofAndIndexedAccess.ts, 95, 7)) } function f12(t: [Shape, boolean]) { ->f12 : Symbol(f12, Decl(keyofAndIndexedAccess.ts, 98, 1)) ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 100, 13)) +>f12 : Symbol(f12, Decl(keyofAndIndexedAccess.ts, 97, 1)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 99, 13)) >Shape : Symbol(Shape, Decl(keyofAndIndexedAccess.ts, 0, 0)) let len = getProperty(t, "length"); ->len : Symbol(len, Decl(keyofAndIndexedAccess.ts, 101, 7)) ->getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 76, 26)) ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 100, 13)) +>len : Symbol(len, Decl(keyofAndIndexedAccess.ts, 100, 7)) +>getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 75, 26)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 99, 13)) let s2 = getProperty(t, "0"); // Shape ->s2 : Symbol(s2, Decl(keyofAndIndexedAccess.ts, 102, 7)) ->getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 76, 26)) ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 100, 13)) +>s2 : Symbol(s2, Decl(keyofAndIndexedAccess.ts, 101, 7)) +>getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 75, 26)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 99, 13)) let b2 = getProperty(t, "1"); // boolean ->b2 : Symbol(b2, Decl(keyofAndIndexedAccess.ts, 103, 7)) ->getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 76, 26)) ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 100, 13)) +>b2 : Symbol(b2, Decl(keyofAndIndexedAccess.ts, 102, 7)) +>getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 75, 26)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 99, 13)) } function f13(foo: any, bar: any) { ->f13 : Symbol(f13, Decl(keyofAndIndexedAccess.ts, 104, 1)) ->foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 106, 13)) ->bar : Symbol(bar, Decl(keyofAndIndexedAccess.ts, 106, 22)) +>f13 : Symbol(f13, Decl(keyofAndIndexedAccess.ts, 103, 1)) +>foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 105, 13)) +>bar : Symbol(bar, Decl(keyofAndIndexedAccess.ts, 105, 22)) let x = getProperty(foo, "x"); // any ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 107, 7)) ->getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 76, 26)) ->foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 106, 13)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 106, 7)) +>getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 75, 26)) +>foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 105, 13)) let y = getProperty(foo, "100"); // any ->y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 108, 7)) ->getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 76, 26)) ->foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 106, 13)) +>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 107, 7)) +>getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 75, 26)) +>foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 105, 13)) let z = getProperty(foo, bar); // any ->z : Symbol(z, Decl(keyofAndIndexedAccess.ts, 109, 7)) ->getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 76, 26)) ->foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 106, 13)) ->bar : Symbol(bar, Decl(keyofAndIndexedAccess.ts, 106, 22)) +>z : Symbol(z, Decl(keyofAndIndexedAccess.ts, 108, 7)) +>getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 75, 26)) +>foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 105, 13)) +>bar : Symbol(bar, Decl(keyofAndIndexedAccess.ts, 105, 22)) } class Component { ->Component : Symbol(Component, Decl(keyofAndIndexedAccess.ts, 110, 1)) ->PropType : Symbol(PropType, Decl(keyofAndIndexedAccess.ts, 112, 16)) +>Component : Symbol(Component, Decl(keyofAndIndexedAccess.ts, 109, 1)) +>PropType : Symbol(PropType, Decl(keyofAndIndexedAccess.ts, 111, 16)) props: PropType; ->props : Symbol(Component.props, Decl(keyofAndIndexedAccess.ts, 112, 27)) ->PropType : Symbol(PropType, Decl(keyofAndIndexedAccess.ts, 112, 16)) +>props : Symbol(Component.props, Decl(keyofAndIndexedAccess.ts, 111, 27)) +>PropType : Symbol(PropType, Decl(keyofAndIndexedAccess.ts, 111, 16)) getProperty(key: K) { ->getProperty : Symbol(Component.getProperty, Decl(keyofAndIndexedAccess.ts, 113, 20)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 114, 16)) ->PropType : Symbol(PropType, Decl(keyofAndIndexedAccess.ts, 112, 16)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 114, 42)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 114, 16)) +>getProperty : Symbol(Component.getProperty, Decl(keyofAndIndexedAccess.ts, 112, 20)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 113, 16)) +>PropType : Symbol(PropType, Decl(keyofAndIndexedAccess.ts, 111, 16)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 113, 42)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 113, 16)) return this.props[key]; ->this.props : Symbol(Component.props, Decl(keyofAndIndexedAccess.ts, 112, 27)) ->this : Symbol(Component, Decl(keyofAndIndexedAccess.ts, 110, 1)) ->props : Symbol(Component.props, Decl(keyofAndIndexedAccess.ts, 112, 27)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 114, 42)) +>this.props : Symbol(Component.props, Decl(keyofAndIndexedAccess.ts, 111, 27)) +>this : Symbol(Component, Decl(keyofAndIndexedAccess.ts, 109, 1)) +>props : Symbol(Component.props, Decl(keyofAndIndexedAccess.ts, 111, 27)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 113, 42)) } setProperty(key: K, value: PropType[K]) { ->setProperty : Symbol(Component.setProperty, Decl(keyofAndIndexedAccess.ts, 116, 5)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 117, 16)) ->PropType : Symbol(PropType, Decl(keyofAndIndexedAccess.ts, 112, 16)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 117, 42)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 117, 16)) ->value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 117, 49)) ->PropType : Symbol(PropType, Decl(keyofAndIndexedAccess.ts, 112, 16)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 117, 16)) +>setProperty : Symbol(Component.setProperty, Decl(keyofAndIndexedAccess.ts, 115, 5)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 116, 16)) +>PropType : Symbol(PropType, Decl(keyofAndIndexedAccess.ts, 111, 16)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 116, 42)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 116, 16)) +>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 116, 49)) +>PropType : Symbol(PropType, Decl(keyofAndIndexedAccess.ts, 111, 16)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 116, 16)) this.props[key] = value; ->this.props : Symbol(Component.props, Decl(keyofAndIndexedAccess.ts, 112, 27)) ->this : Symbol(Component, Decl(keyofAndIndexedAccess.ts, 110, 1)) ->props : Symbol(Component.props, Decl(keyofAndIndexedAccess.ts, 112, 27)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 117, 42)) ->value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 117, 49)) +>this.props : Symbol(Component.props, Decl(keyofAndIndexedAccess.ts, 111, 27)) +>this : Symbol(Component, Decl(keyofAndIndexedAccess.ts, 109, 1)) +>props : Symbol(Component.props, Decl(keyofAndIndexedAccess.ts, 111, 27)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 116, 42)) +>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 116, 49)) } } function f20(component: Component) { ->f20 : Symbol(f20, Decl(keyofAndIndexedAccess.ts, 120, 1)) ->component : Symbol(component, Decl(keyofAndIndexedAccess.ts, 122, 13)) ->Component : Symbol(Component, Decl(keyofAndIndexedAccess.ts, 110, 1)) +>f20 : Symbol(f20, Decl(keyofAndIndexedAccess.ts, 119, 1)) +>component : Symbol(component, Decl(keyofAndIndexedAccess.ts, 121, 13)) +>Component : Symbol(Component, Decl(keyofAndIndexedAccess.ts, 109, 1)) >Shape : Symbol(Shape, Decl(keyofAndIndexedAccess.ts, 0, 0)) let name = component.getProperty("name"); // string ->name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 123, 7)) ->component.getProperty : Symbol(Component.getProperty, Decl(keyofAndIndexedAccess.ts, 113, 20)) ->component : Symbol(component, Decl(keyofAndIndexedAccess.ts, 122, 13)) ->getProperty : Symbol(Component.getProperty, Decl(keyofAndIndexedAccess.ts, 113, 20)) +>name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 122, 7)) +>component.getProperty : Symbol(Component.getProperty, Decl(keyofAndIndexedAccess.ts, 112, 20)) +>component : Symbol(component, Decl(keyofAndIndexedAccess.ts, 121, 13)) +>getProperty : Symbol(Component.getProperty, Decl(keyofAndIndexedAccess.ts, 112, 20)) let widthOrHeight = component.getProperty(cond ? "width" : "height"); // number ->widthOrHeight : Symbol(widthOrHeight, Decl(keyofAndIndexedAccess.ts, 124, 7)) ->component.getProperty : Symbol(Component.getProperty, Decl(keyofAndIndexedAccess.ts, 113, 20)) ->component : Symbol(component, Decl(keyofAndIndexedAccess.ts, 122, 13)) ->getProperty : Symbol(Component.getProperty, Decl(keyofAndIndexedAccess.ts, 113, 20)) ->cond : Symbol(cond, Decl(keyofAndIndexedAccess.ts, 76, 11)) +>widthOrHeight : Symbol(widthOrHeight, Decl(keyofAndIndexedAccess.ts, 123, 7)) +>component.getProperty : Symbol(Component.getProperty, Decl(keyofAndIndexedAccess.ts, 112, 20)) +>component : Symbol(component, Decl(keyofAndIndexedAccess.ts, 121, 13)) +>getProperty : Symbol(Component.getProperty, Decl(keyofAndIndexedAccess.ts, 112, 20)) +>cond : Symbol(cond, Decl(keyofAndIndexedAccess.ts, 75, 11)) let nameOrVisible = component.getProperty(cond ? "name" : "visible"); // string | boolean ->nameOrVisible : Symbol(nameOrVisible, Decl(keyofAndIndexedAccess.ts, 125, 7)) ->component.getProperty : Symbol(Component.getProperty, Decl(keyofAndIndexedAccess.ts, 113, 20)) ->component : Symbol(component, Decl(keyofAndIndexedAccess.ts, 122, 13)) ->getProperty : Symbol(Component.getProperty, Decl(keyofAndIndexedAccess.ts, 113, 20)) ->cond : Symbol(cond, Decl(keyofAndIndexedAccess.ts, 76, 11)) +>nameOrVisible : Symbol(nameOrVisible, Decl(keyofAndIndexedAccess.ts, 124, 7)) +>component.getProperty : Symbol(Component.getProperty, Decl(keyofAndIndexedAccess.ts, 112, 20)) +>component : Symbol(component, Decl(keyofAndIndexedAccess.ts, 121, 13)) +>getProperty : Symbol(Component.getProperty, Decl(keyofAndIndexedAccess.ts, 112, 20)) +>cond : Symbol(cond, Decl(keyofAndIndexedAccess.ts, 75, 11)) component.setProperty("name", "rectangle"); ->component.setProperty : Symbol(Component.setProperty, Decl(keyofAndIndexedAccess.ts, 116, 5)) ->component : Symbol(component, Decl(keyofAndIndexedAccess.ts, 122, 13)) ->setProperty : Symbol(Component.setProperty, Decl(keyofAndIndexedAccess.ts, 116, 5)) +>component.setProperty : Symbol(Component.setProperty, Decl(keyofAndIndexedAccess.ts, 115, 5)) +>component : Symbol(component, Decl(keyofAndIndexedAccess.ts, 121, 13)) +>setProperty : Symbol(Component.setProperty, Decl(keyofAndIndexedAccess.ts, 115, 5)) component.setProperty(cond ? "width" : "height", 10) ->component.setProperty : Symbol(Component.setProperty, Decl(keyofAndIndexedAccess.ts, 116, 5)) ->component : Symbol(component, Decl(keyofAndIndexedAccess.ts, 122, 13)) ->setProperty : Symbol(Component.setProperty, Decl(keyofAndIndexedAccess.ts, 116, 5)) ->cond : Symbol(cond, Decl(keyofAndIndexedAccess.ts, 76, 11)) +>component.setProperty : Symbol(Component.setProperty, Decl(keyofAndIndexedAccess.ts, 115, 5)) +>component : Symbol(component, Decl(keyofAndIndexedAccess.ts, 121, 13)) +>setProperty : Symbol(Component.setProperty, Decl(keyofAndIndexedAccess.ts, 115, 5)) +>cond : Symbol(cond, Decl(keyofAndIndexedAccess.ts, 75, 11)) component.setProperty(cond ? "name" : "visible", true); // Technically not safe ->component.setProperty : Symbol(Component.setProperty, Decl(keyofAndIndexedAccess.ts, 116, 5)) ->component : Symbol(component, Decl(keyofAndIndexedAccess.ts, 122, 13)) ->setProperty : Symbol(Component.setProperty, Decl(keyofAndIndexedAccess.ts, 116, 5)) ->cond : Symbol(cond, Decl(keyofAndIndexedAccess.ts, 76, 11)) +>component.setProperty : Symbol(Component.setProperty, Decl(keyofAndIndexedAccess.ts, 115, 5)) +>component : Symbol(component, Decl(keyofAndIndexedAccess.ts, 121, 13)) +>setProperty : Symbol(Component.setProperty, Decl(keyofAndIndexedAccess.ts, 115, 5)) +>cond : Symbol(cond, Decl(keyofAndIndexedAccess.ts, 75, 11)) } function pluck(array: T[], key: K) { ->pluck : Symbol(pluck, Decl(keyofAndIndexedAccess.ts, 129, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 131, 15)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 131, 17)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 131, 15)) ->array : Symbol(array, Decl(keyofAndIndexedAccess.ts, 131, 37)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 131, 15)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 131, 48)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 131, 17)) +>pluck : Symbol(pluck, Decl(keyofAndIndexedAccess.ts, 128, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 130, 15)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 130, 17)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 130, 15)) +>array : Symbol(array, Decl(keyofAndIndexedAccess.ts, 130, 37)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 130, 15)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 130, 48)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 130, 17)) return array.map(x => x[key]); >array.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) ->array : Symbol(array, Decl(keyofAndIndexedAccess.ts, 131, 37)) +>array : Symbol(array, Decl(keyofAndIndexedAccess.ts, 130, 37)) >map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 132, 21)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 132, 21)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 131, 48)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 131, 21)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 131, 21)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 130, 48)) } function f30(shapes: Shape[]) { ->f30 : Symbol(f30, Decl(keyofAndIndexedAccess.ts, 133, 1)) ->shapes : Symbol(shapes, Decl(keyofAndIndexedAccess.ts, 135, 13)) +>f30 : Symbol(f30, Decl(keyofAndIndexedAccess.ts, 132, 1)) +>shapes : Symbol(shapes, Decl(keyofAndIndexedAccess.ts, 134, 13)) >Shape : Symbol(Shape, Decl(keyofAndIndexedAccess.ts, 0, 0)) let names = pluck(shapes, "name"); // string[] ->names : Symbol(names, Decl(keyofAndIndexedAccess.ts, 136, 7)) ->pluck : Symbol(pluck, Decl(keyofAndIndexedAccess.ts, 129, 1)) ->shapes : Symbol(shapes, Decl(keyofAndIndexedAccess.ts, 135, 13)) +>names : Symbol(names, Decl(keyofAndIndexedAccess.ts, 135, 7)) +>pluck : Symbol(pluck, Decl(keyofAndIndexedAccess.ts, 128, 1)) +>shapes : Symbol(shapes, Decl(keyofAndIndexedAccess.ts, 134, 13)) let widths = pluck(shapes, "width"); // number[] ->widths : Symbol(widths, Decl(keyofAndIndexedAccess.ts, 137, 7)) ->pluck : Symbol(pluck, Decl(keyofAndIndexedAccess.ts, 129, 1)) ->shapes : Symbol(shapes, Decl(keyofAndIndexedAccess.ts, 135, 13)) +>widths : Symbol(widths, Decl(keyofAndIndexedAccess.ts, 136, 7)) +>pluck : Symbol(pluck, Decl(keyofAndIndexedAccess.ts, 128, 1)) +>shapes : Symbol(shapes, Decl(keyofAndIndexedAccess.ts, 134, 13)) let nameOrVisibles = pluck(shapes, cond ? "name" : "visible"); // (string | boolean)[] ->nameOrVisibles : Symbol(nameOrVisibles, Decl(keyofAndIndexedAccess.ts, 138, 7)) ->pluck : Symbol(pluck, Decl(keyofAndIndexedAccess.ts, 129, 1)) ->shapes : Symbol(shapes, Decl(keyofAndIndexedAccess.ts, 135, 13)) ->cond : Symbol(cond, Decl(keyofAndIndexedAccess.ts, 76, 11)) +>nameOrVisibles : Symbol(nameOrVisibles, Decl(keyofAndIndexedAccess.ts, 137, 7)) +>pluck : Symbol(pluck, Decl(keyofAndIndexedAccess.ts, 128, 1)) +>shapes : Symbol(shapes, Decl(keyofAndIndexedAccess.ts, 134, 13)) +>cond : Symbol(cond, Decl(keyofAndIndexedAccess.ts, 75, 11)) } function f31(key: K) { ->f31 : Symbol(f31, Decl(keyofAndIndexedAccess.ts, 139, 1)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 141, 13)) +>f31 : Symbol(f31, Decl(keyofAndIndexedAccess.ts, 138, 1)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 140, 13)) >Shape : Symbol(Shape, Decl(keyofAndIndexedAccess.ts, 0, 0)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 141, 36)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 141, 13)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 140, 36)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 140, 13)) const shape: Shape = { name: "foo", width: 5, height: 10, visible: true }; ->shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 142, 9)) +>shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 141, 9)) >Shape : Symbol(Shape, Decl(keyofAndIndexedAccess.ts, 0, 0)) ->name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 142, 26)) ->width : Symbol(width, Decl(keyofAndIndexedAccess.ts, 142, 39)) ->height : Symbol(height, Decl(keyofAndIndexedAccess.ts, 142, 49)) ->visible : Symbol(visible, Decl(keyofAndIndexedAccess.ts, 142, 61)) +>name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 141, 26)) +>width : Symbol(width, Decl(keyofAndIndexedAccess.ts, 141, 39)) +>height : Symbol(height, Decl(keyofAndIndexedAccess.ts, 141, 49)) +>visible : Symbol(visible, Decl(keyofAndIndexedAccess.ts, 141, 61)) return shape[key]; // Shape[K] ->shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 142, 9)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 141, 36)) +>shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 141, 9)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 140, 36)) } function f32(key: K) { ->f32 : Symbol(f32, Decl(keyofAndIndexedAccess.ts, 144, 1)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 146, 13)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 146, 43)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 146, 13)) +>f32 : Symbol(f32, Decl(keyofAndIndexedAccess.ts, 143, 1)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 145, 13)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 145, 43)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 145, 13)) const shape: Shape = { name: "foo", width: 5, height: 10, visible: true }; ->shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 147, 9)) +>shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 146, 9)) >Shape : Symbol(Shape, Decl(keyofAndIndexedAccess.ts, 0, 0)) ->name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 147, 26)) ->width : Symbol(width, Decl(keyofAndIndexedAccess.ts, 147, 39)) ->height : Symbol(height, Decl(keyofAndIndexedAccess.ts, 147, 49)) ->visible : Symbol(visible, Decl(keyofAndIndexedAccess.ts, 147, 61)) +>name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 146, 26)) +>width : Symbol(width, Decl(keyofAndIndexedAccess.ts, 146, 39)) +>height : Symbol(height, Decl(keyofAndIndexedAccess.ts, 146, 49)) +>visible : Symbol(visible, Decl(keyofAndIndexedAccess.ts, 146, 61)) return shape[key]; // Shape[K] ->shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 147, 9)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 146, 43)) +>shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 146, 9)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 145, 43)) } function f33(shape: S, key: K) { ->f33 : Symbol(f33, Decl(keyofAndIndexedAccess.ts, 149, 1)) ->S : Symbol(S, Decl(keyofAndIndexedAccess.ts, 151, 13)) +>f33 : Symbol(f33, Decl(keyofAndIndexedAccess.ts, 148, 1)) +>S : Symbol(S, Decl(keyofAndIndexedAccess.ts, 150, 13)) >Shape : Symbol(Shape, Decl(keyofAndIndexedAccess.ts, 0, 0)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 151, 29)) ->S : Symbol(S, Decl(keyofAndIndexedAccess.ts, 151, 13)) ->shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 151, 49)) ->S : Symbol(S, Decl(keyofAndIndexedAccess.ts, 151, 13)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 151, 58)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 151, 29)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 150, 29)) +>S : Symbol(S, Decl(keyofAndIndexedAccess.ts, 150, 13)) +>shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 150, 49)) +>S : Symbol(S, Decl(keyofAndIndexedAccess.ts, 150, 13)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 150, 58)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 150, 29)) let name = getProperty(shape, "name"); ->name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 152, 7)) ->getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 76, 26)) ->shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 151, 49)) +>name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 151, 7)) +>getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 75, 26)) +>shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 150, 49)) let prop = getProperty(shape, key); ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 153, 7)) ->getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 76, 26)) ->shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 151, 49)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 151, 58)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 152, 7)) +>getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 75, 26)) +>shape : Symbol(shape, Decl(keyofAndIndexedAccess.ts, 150, 49)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 150, 58)) return prop; ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 153, 7)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 152, 7)) } function f34(ts: TaggedShape) { ->f34 : Symbol(f34, Decl(keyofAndIndexedAccess.ts, 155, 1)) ->ts : Symbol(ts, Decl(keyofAndIndexedAccess.ts, 157, 13)) +>f34 : Symbol(f34, Decl(keyofAndIndexedAccess.ts, 154, 1)) +>ts : Symbol(ts, Decl(keyofAndIndexedAccess.ts, 156, 13)) >TaggedShape : Symbol(TaggedShape, Decl(keyofAndIndexedAccess.ts, 5, 1)) let tag1 = f33(ts, "tag"); ->tag1 : Symbol(tag1, Decl(keyofAndIndexedAccess.ts, 158, 7)) ->f33 : Symbol(f33, Decl(keyofAndIndexedAccess.ts, 149, 1)) ->ts : Symbol(ts, Decl(keyofAndIndexedAccess.ts, 157, 13)) +>tag1 : Symbol(tag1, Decl(keyofAndIndexedAccess.ts, 157, 7)) +>f33 : Symbol(f33, Decl(keyofAndIndexedAccess.ts, 148, 1)) +>ts : Symbol(ts, Decl(keyofAndIndexedAccess.ts, 156, 13)) let tag2 = getProperty(ts, "tag"); ->tag2 : Symbol(tag2, Decl(keyofAndIndexedAccess.ts, 159, 7)) ->getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 76, 26)) ->ts : Symbol(ts, Decl(keyofAndIndexedAccess.ts, 157, 13)) +>tag2 : Symbol(tag2, Decl(keyofAndIndexedAccess.ts, 158, 7)) +>getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 75, 26)) +>ts : Symbol(ts, Decl(keyofAndIndexedAccess.ts, 156, 13)) } class C { ->C : Symbol(C, Decl(keyofAndIndexedAccess.ts, 160, 1)) +>C : Symbol(C, Decl(keyofAndIndexedAccess.ts, 159, 1)) public x: string; ->x : Symbol(C.x, Decl(keyofAndIndexedAccess.ts, 162, 9)) +>x : Symbol(C.x, Decl(keyofAndIndexedAccess.ts, 161, 9)) protected y: string; ->y : Symbol(C.y, Decl(keyofAndIndexedAccess.ts, 163, 21)) +>y : Symbol(C.y, Decl(keyofAndIndexedAccess.ts, 162, 21)) private z: string; ->z : Symbol(C.z, Decl(keyofAndIndexedAccess.ts, 164, 24)) +>z : Symbol(C.z, Decl(keyofAndIndexedAccess.ts, 163, 24)) } // Indexed access expressions have always permitted access to private and protected members. // For consistency we also permit such access in indexed access types. function f40(c: C) { ->f40 : Symbol(f40, Decl(keyofAndIndexedAccess.ts, 166, 1)) ->c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 170, 13)) ->C : Symbol(C, Decl(keyofAndIndexedAccess.ts, 160, 1)) +>f40 : Symbol(f40, Decl(keyofAndIndexedAccess.ts, 165, 1)) +>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 169, 13)) +>C : Symbol(C, Decl(keyofAndIndexedAccess.ts, 159, 1)) type X = C["x"]; ->X : Symbol(X, Decl(keyofAndIndexedAccess.ts, 170, 20)) ->C : Symbol(C, Decl(keyofAndIndexedAccess.ts, 160, 1)) +>X : Symbol(X, Decl(keyofAndIndexedAccess.ts, 169, 20)) +>C : Symbol(C, Decl(keyofAndIndexedAccess.ts, 159, 1)) type Y = C["y"]; ->Y : Symbol(Y, Decl(keyofAndIndexedAccess.ts, 171, 20)) ->C : Symbol(C, Decl(keyofAndIndexedAccess.ts, 160, 1)) +>Y : Symbol(Y, Decl(keyofAndIndexedAccess.ts, 170, 20)) +>C : Symbol(C, Decl(keyofAndIndexedAccess.ts, 159, 1)) type Z = C["z"]; ->Z : Symbol(Z, Decl(keyofAndIndexedAccess.ts, 172, 20)) ->C : Symbol(C, Decl(keyofAndIndexedAccess.ts, 160, 1)) +>Z : Symbol(Z, Decl(keyofAndIndexedAccess.ts, 171, 20)) +>C : Symbol(C, Decl(keyofAndIndexedAccess.ts, 159, 1)) let x: X = c["x"]; ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 174, 7)) ->X : Symbol(X, Decl(keyofAndIndexedAccess.ts, 170, 20)) ->c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 170, 13)) ->"x" : Symbol(C.x, Decl(keyofAndIndexedAccess.ts, 162, 9)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 173, 7)) +>X : Symbol(X, Decl(keyofAndIndexedAccess.ts, 169, 20)) +>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 169, 13)) +>"x" : Symbol(C.x, Decl(keyofAndIndexedAccess.ts, 161, 9)) let y: Y = c["y"]; ->y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 175, 7)) ->Y : Symbol(Y, Decl(keyofAndIndexedAccess.ts, 171, 20)) ->c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 170, 13)) ->"y" : Symbol(C.y, Decl(keyofAndIndexedAccess.ts, 163, 21)) +>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 174, 7)) +>Y : Symbol(Y, Decl(keyofAndIndexedAccess.ts, 170, 20)) +>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 169, 13)) +>"y" : Symbol(C.y, Decl(keyofAndIndexedAccess.ts, 162, 21)) let z: Z = c["z"]; ->z : Symbol(z, Decl(keyofAndIndexedAccess.ts, 176, 7)) ->Z : Symbol(Z, Decl(keyofAndIndexedAccess.ts, 172, 20)) ->c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 170, 13)) ->"z" : Symbol(C.z, Decl(keyofAndIndexedAccess.ts, 164, 24)) +>z : Symbol(z, Decl(keyofAndIndexedAccess.ts, 175, 7)) +>Z : Symbol(Z, Decl(keyofAndIndexedAccess.ts, 171, 20)) +>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 169, 13)) +>"z" : Symbol(C.z, Decl(keyofAndIndexedAccess.ts, 163, 24)) } function f50(k: keyof T, s: string) { ->f50 : Symbol(f50, Decl(keyofAndIndexedAccess.ts, 177, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 179, 13)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 179, 16)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 179, 13)) ->s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 179, 27)) +>f50 : Symbol(f50, Decl(keyofAndIndexedAccess.ts, 176, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 178, 13)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 178, 16)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 178, 13)) +>s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 178, 27)) const x1 = s as keyof T; ->x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 180, 9)) ->s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 179, 27)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 179, 13)) +>x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 179, 9)) +>s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 178, 27)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 178, 13)) const x2 = k as string; ->x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 181, 9)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 179, 16)) +>x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 180, 9)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 178, 16)) } function f51(k: K, s: string) { ->f51 : Symbol(f51, Decl(keyofAndIndexedAccess.ts, 182, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 184, 13)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 184, 15)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 184, 13)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 184, 35)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 184, 15)) ->s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 184, 40)) +>f51 : Symbol(f51, Decl(keyofAndIndexedAccess.ts, 181, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 183, 13)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 183, 15)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 183, 13)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 183, 35)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 183, 15)) +>s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 183, 40)) const x1 = s as keyof T; ->x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 185, 9)) ->s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 184, 40)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 184, 13)) +>x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 184, 9)) +>s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 183, 40)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 183, 13)) const x2 = k as string; ->x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 186, 9)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 184, 35)) +>x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 185, 9)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 183, 35)) } function f52(obj: { [x: string]: boolean }, k: Exclude, s: string, n: number) { ->f52 : Symbol(f52, Decl(keyofAndIndexedAccess.ts, 187, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 189, 13)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 189, 16)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 189, 24)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 189, 46)) +>f52 : Symbol(f52, Decl(keyofAndIndexedAccess.ts, 186, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 188, 13)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 188, 16)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 188, 24)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 188, 46)) >Exclude : Symbol(Exclude, Decl(lib.es5.d.ts, --, --)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 189, 13)) ->s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 189, 75)) ->n : Symbol(n, Decl(keyofAndIndexedAccess.ts, 189, 86)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 188, 13)) +>s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 188, 75)) +>n : Symbol(n, Decl(keyofAndIndexedAccess.ts, 188, 86)) const x1 = obj[s]; ->x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 190, 9)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 189, 16)) ->s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 189, 75)) +>x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 189, 9)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 188, 16)) +>s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 188, 75)) const x2 = obj[n]; ->x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 191, 9)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 189, 16)) ->n : Symbol(n, Decl(keyofAndIndexedAccess.ts, 189, 86)) +>x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 190, 9)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 188, 16)) +>n : Symbol(n, Decl(keyofAndIndexedAccess.ts, 188, 86)) const x3 = obj[k]; ->x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 192, 9)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 189, 16)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 189, 46)) +>x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 191, 9)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 188, 16)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 188, 46)) } function f53>(obj: { [x: string]: boolean }, k: K, s: string, n: number) { ->f53 : Symbol(f53, Decl(keyofAndIndexedAccess.ts, 193, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 195, 13)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 195, 15)) +>f53 : Symbol(f53, Decl(keyofAndIndexedAccess.ts, 192, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 194, 13)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 194, 15)) >Exclude : Symbol(Exclude, Decl(lib.es5.d.ts, --, --)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 195, 13)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 195, 52)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 195, 60)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 195, 82)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 195, 15)) ->s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 195, 88)) ->n : Symbol(n, Decl(keyofAndIndexedAccess.ts, 195, 99)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 194, 13)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 194, 52)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 194, 60)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 194, 82)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 194, 15)) +>s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 194, 88)) +>n : Symbol(n, Decl(keyofAndIndexedAccess.ts, 194, 99)) const x1 = obj[s]; ->x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 196, 9)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 195, 52)) ->s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 195, 88)) +>x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 195, 9)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 194, 52)) +>s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 194, 88)) const x2 = obj[n]; ->x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 197, 9)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 195, 52)) ->n : Symbol(n, Decl(keyofAndIndexedAccess.ts, 195, 99)) +>x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 196, 9)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 194, 52)) +>n : Symbol(n, Decl(keyofAndIndexedAccess.ts, 194, 99)) const x3 = obj[k]; ->x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 198, 9)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 195, 52)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 195, 82)) +>x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 197, 9)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 194, 52)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 194, 82)) } function f54(obj: T, key: keyof T) { ->f54 : Symbol(f54, Decl(keyofAndIndexedAccess.ts, 199, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 201, 13)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 201, 16)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 201, 13)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 201, 23)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 201, 13)) +>f54 : Symbol(f54, Decl(keyofAndIndexedAccess.ts, 198, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 200, 13)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 200, 16)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 200, 13)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 200, 23)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 200, 13)) for (let s in obj[key]) { ->s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 202, 12)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 201, 16)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 201, 23)) +>s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 201, 12)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 200, 16)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 200, 23)) } const b = "foo" in obj[key]; ->b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 204, 9)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 201, 16)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 201, 23)) +>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 203, 9)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 200, 16)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 200, 23)) } function f55(obj: T, key: K) { ->f55 : Symbol(f55, Decl(keyofAndIndexedAccess.ts, 205, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 207, 13)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 207, 15)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 207, 13)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 207, 35)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 207, 13)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 207, 42)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 207, 15)) +>f55 : Symbol(f55, Decl(keyofAndIndexedAccess.ts, 204, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 206, 13)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 206, 15)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 206, 13)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 206, 35)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 206, 13)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 206, 42)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 206, 15)) for (let s in obj[key]) { ->s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 208, 12)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 207, 35)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 207, 42)) +>s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 207, 12)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 206, 35)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 206, 42)) } const b = "foo" in obj[key]; ->b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 210, 9)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 207, 35)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 207, 42)) +>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 209, 9)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 206, 35)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 206, 42)) } function f60(source: T, target: T) { ->f60 : Symbol(f60, Decl(keyofAndIndexedAccess.ts, 211, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 213, 13)) ->source : Symbol(source, Decl(keyofAndIndexedAccess.ts, 213, 16)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 213, 13)) ->target : Symbol(target, Decl(keyofAndIndexedAccess.ts, 213, 26)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 213, 13)) +>f60 : Symbol(f60, Decl(keyofAndIndexedAccess.ts, 210, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 212, 13)) +>source : Symbol(source, Decl(keyofAndIndexedAccess.ts, 212, 16)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 212, 13)) +>target : Symbol(target, Decl(keyofAndIndexedAccess.ts, 212, 26)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 212, 13)) for (let k in source) { ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 214, 12)) ->source : Symbol(source, Decl(keyofAndIndexedAccess.ts, 213, 16)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 213, 12)) +>source : Symbol(source, Decl(keyofAndIndexedAccess.ts, 212, 16)) target[k] = source[k]; ->target : Symbol(target, Decl(keyofAndIndexedAccess.ts, 213, 26)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 214, 12)) ->source : Symbol(source, Decl(keyofAndIndexedAccess.ts, 213, 16)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 214, 12)) +>target : Symbol(target, Decl(keyofAndIndexedAccess.ts, 212, 26)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 213, 12)) +>source : Symbol(source, Decl(keyofAndIndexedAccess.ts, 212, 16)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 213, 12)) } } function f70(func: (k1: keyof (T | U), k2: keyof (T & U)) => void) { ->f70 : Symbol(f70, Decl(keyofAndIndexedAccess.ts, 217, 1)) ->func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 219, 13)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 219, 20)) ->U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 219, 22)) ->k1 : Symbol(k1, Decl(keyofAndIndexedAccess.ts, 219, 26)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 219, 20)) ->U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 219, 22)) ->k2 : Symbol(k2, Decl(keyofAndIndexedAccess.ts, 219, 44)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 219, 20)) ->U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 219, 22)) +>f70 : Symbol(f70, Decl(keyofAndIndexedAccess.ts, 216, 1)) +>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 218, 13)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 218, 20)) +>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 218, 22)) +>k1 : Symbol(k1, Decl(keyofAndIndexedAccess.ts, 218, 26)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 218, 20)) +>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 218, 22)) +>k2 : Symbol(k2, Decl(keyofAndIndexedAccess.ts, 218, 44)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 218, 20)) +>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 218, 22)) func<{ a: any, b: any }, { a: any, c: any }>('a', 'a'); ->func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 219, 13)) +>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 218, 13)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 219, 10)) +>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 219, 18)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 219, 30)) +>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 219, 38)) + + func<{ a: any, b: any }, { a: any, c: any }>('a', 'b'); +>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 218, 13)) >a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 220, 10)) >b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 220, 18)) >a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 220, 30)) >c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 220, 38)) - func<{ a: any, b: any }, { a: any, c: any }>('a', 'b'); ->func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 219, 13)) + func<{ a: any, b: any }, { a: any, c: any }>('a', 'c'); +>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 218, 13)) >a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 221, 10)) >b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 221, 18)) >a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 221, 30)) >c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 221, 38)) - - func<{ a: any, b: any }, { a: any, c: any }>('a', 'c'); ->func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 219, 13)) ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 222, 10)) ->b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 222, 18)) ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 222, 30)) ->c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 222, 38)) } function f71(func: (x: T, y: U) => Partial) { ->f71 : Symbol(f71, Decl(keyofAndIndexedAccess.ts, 223, 1)) ->func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 225, 13)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 225, 20)) ->U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 225, 22)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 225, 26)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 225, 20)) ->y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 225, 31)) ->U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 225, 22)) +>f71 : Symbol(f71, Decl(keyofAndIndexedAccess.ts, 222, 1)) +>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 224, 13)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 224, 20)) +>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 224, 22)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 224, 26)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 224, 20)) +>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 224, 31)) +>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 224, 22)) >Partial : Symbol(Partial, Decl(lib.es5.d.ts, --, --)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 225, 20)) ->U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 225, 22)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 224, 20)) +>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 224, 22)) let x = func({ a: 1, b: "hello" }, { c: true }); ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 226, 7)) ->func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 225, 13)) ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 226, 18)) ->b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 226, 24)) ->c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 226, 40)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 225, 7)) +>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 224, 13)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 225, 18)) +>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 225, 24)) +>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 225, 40)) x.a; // number | undefined ->x.a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 226, 18)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 226, 7)) ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 226, 18)) +>x.a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 225, 18)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 225, 7)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 225, 18)) x.b; // string | undefined ->x.b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 226, 24)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 226, 7)) ->b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 226, 24)) +>x.b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 225, 24)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 225, 7)) +>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 225, 24)) x.c; // boolean | undefined ->x.c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 226, 40)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 226, 7)) ->c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 226, 40)) +>x.c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 225, 40)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 225, 7)) +>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 225, 40)) } function f72(func: (x: T, y: U, k: K) => (T & U)[K]) { ->f72 : Symbol(f72, Decl(keyofAndIndexedAccess.ts, 230, 1)) ->func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 232, 13)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 232, 20)) ->U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 232, 22)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 232, 25)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 232, 20)) ->U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 232, 22)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 232, 55)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 232, 20)) ->y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 232, 60)) ->U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 232, 22)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 232, 66)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 232, 25)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 232, 20)) ->U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 232, 22)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 232, 25)) +>f72 : Symbol(f72, Decl(keyofAndIndexedAccess.ts, 229, 1)) +>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 231, 13)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 231, 20)) +>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 231, 22)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 231, 25)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 231, 20)) +>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 231, 22)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 231, 55)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 231, 20)) +>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 231, 60)) +>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 231, 22)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 231, 66)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 231, 25)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 231, 20)) +>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 231, 22)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 231, 25)) let a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 233, 7)) ->func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 232, 13)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 232, 7)) +>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 231, 13)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 232, 18)) +>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 232, 24)) +>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 232, 40)) + + let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string +>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 233, 7)) +>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 231, 13)) >a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 233, 18)) >b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 233, 24)) >c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 233, 40)) - let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string ->b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 234, 7)) ->func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 232, 13)) + let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean +>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 234, 7)) +>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 231, 13)) >a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 234, 18)) >b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 234, 24)) >c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 234, 40)) - - let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean ->c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 235, 7)) ->func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 232, 13)) ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 235, 18)) ->b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 235, 24)) ->c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 235, 40)) } function f73(func: (x: T, y: U, k: K) => (T & U)[K]) { ->f73 : Symbol(f73, Decl(keyofAndIndexedAccess.ts, 236, 1)) ->func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 238, 13)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 238, 20)) ->U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 238, 22)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 238, 25)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 238, 20)) ->U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 238, 22)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 238, 51)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 238, 20)) ->y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 238, 56)) ->U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 238, 22)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 238, 62)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 238, 25)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 238, 20)) ->U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 238, 22)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 238, 25)) +>f73 : Symbol(f73, Decl(keyofAndIndexedAccess.ts, 235, 1)) +>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 237, 13)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 237, 20)) +>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 237, 22)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 237, 25)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 237, 20)) +>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 237, 22)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 237, 51)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 237, 20)) +>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 237, 56)) +>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 237, 22)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 237, 62)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 237, 25)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 237, 20)) +>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 237, 22)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 237, 25)) let a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 239, 7)) ->func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 238, 13)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 238, 7)) +>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 237, 13)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 238, 18)) +>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 238, 24)) +>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 238, 40)) + + let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string +>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 239, 7)) +>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 237, 13)) >a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 239, 18)) >b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 239, 24)) >c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 239, 40)) - let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string ->b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 240, 7)) ->func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 238, 13)) + let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean +>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 240, 7)) +>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 237, 13)) >a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 240, 18)) >b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 240, 24)) >c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 240, 40)) - - let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean ->c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 241, 7)) ->func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 238, 13)) ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 241, 18)) ->b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 241, 24)) ->c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 241, 40)) } function f74(func: (x: T, y: U, k: K) => (T | U)[K]) { ->f74 : Symbol(f74, Decl(keyofAndIndexedAccess.ts, 242, 1)) ->func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 244, 13)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 244, 20)) ->U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 244, 22)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 244, 25)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 244, 20)) ->U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 244, 22)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 244, 51)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 244, 20)) ->y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 244, 56)) ->U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 244, 22)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 244, 62)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 244, 25)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 244, 20)) ->U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 244, 22)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 244, 25)) +>f74 : Symbol(f74, Decl(keyofAndIndexedAccess.ts, 241, 1)) +>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 243, 13)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 243, 20)) +>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 243, 22)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 243, 25)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 243, 20)) +>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 243, 22)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 243, 51)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 243, 20)) +>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 243, 56)) +>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 243, 22)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 243, 62)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 243, 25)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 243, 20)) +>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 243, 22)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 243, 25)) let a = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'a'); // number ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 245, 7)) ->func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 244, 13)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 244, 7)) +>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 243, 13)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 244, 18)) +>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 244, 24)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 244, 40)) +>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 244, 46)) + + let b = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'b'); // string | boolean +>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 245, 7)) +>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 243, 13)) >a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 245, 18)) >b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 245, 24)) >a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 245, 40)) >b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 245, 46)) - - let b = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'b'); // string | boolean ->b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 246, 7)) ->func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 244, 13)) ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 246, 18)) ->b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 246, 24)) ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 246, 40)) ->b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 246, 46)) } function f80(obj: T) { ->f80 : Symbol(f80, Decl(keyofAndIndexedAccess.ts, 247, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 249, 13)) ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 249, 24)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 249, 29)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 249, 42)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 249, 13)) +>f80 : Symbol(f80, Decl(keyofAndIndexedAccess.ts, 246, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 248, 13)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 248, 24)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 248, 29)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 248, 42)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 248, 13)) let a1 = obj.a; // { x: any } ->a1 : Symbol(a1, Decl(keyofAndIndexedAccess.ts, 250, 7)) ->obj.a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 249, 24)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 249, 42)) ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 249, 24)) +>a1 : Symbol(a1, Decl(keyofAndIndexedAccess.ts, 249, 7)) +>obj.a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 248, 24)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 248, 42)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 248, 24)) let a2 = obj['a']; // { x: any } ->a2 : Symbol(a2, Decl(keyofAndIndexedAccess.ts, 251, 7)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 249, 42)) ->'a' : Symbol(a, Decl(keyofAndIndexedAccess.ts, 249, 24)) +>a2 : Symbol(a2, Decl(keyofAndIndexedAccess.ts, 250, 7)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 248, 42)) +>'a' : Symbol(a, Decl(keyofAndIndexedAccess.ts, 248, 24)) let a3 = obj['a'] as T['a']; // T["a"] ->a3 : Symbol(a3, Decl(keyofAndIndexedAccess.ts, 252, 7)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 249, 42)) ->'a' : Symbol(a, Decl(keyofAndIndexedAccess.ts, 249, 24)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 249, 13)) +>a3 : Symbol(a3, Decl(keyofAndIndexedAccess.ts, 251, 7)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 248, 42)) +>'a' : Symbol(a, Decl(keyofAndIndexedAccess.ts, 248, 24)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 248, 13)) let x1 = obj.a.x; // any ->x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 253, 7)) ->obj.a.x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 249, 29)) ->obj.a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 249, 24)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 249, 42)) ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 249, 24)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 249, 29)) +>x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 252, 7)) +>obj.a.x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 248, 29)) +>obj.a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 248, 24)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 248, 42)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 248, 24)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 248, 29)) let x2 = obj['a']['x']; // any ->x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 254, 7)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 249, 42)) ->'a' : Symbol(a, Decl(keyofAndIndexedAccess.ts, 249, 24)) ->'x' : Symbol(x, Decl(keyofAndIndexedAccess.ts, 249, 29)) +>x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 253, 7)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 248, 42)) +>'a' : Symbol(a, Decl(keyofAndIndexedAccess.ts, 248, 24)) +>'x' : Symbol(x, Decl(keyofAndIndexedAccess.ts, 248, 29)) let x3 = obj['a']['x'] as T['a']['x']; // T["a"]["x"] ->x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 255, 7)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 249, 42)) ->'a' : Symbol(a, Decl(keyofAndIndexedAccess.ts, 249, 24)) ->'x' : Symbol(x, Decl(keyofAndIndexedAccess.ts, 249, 29)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 249, 13)) +>x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 254, 7)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 248, 42)) +>'a' : Symbol(a, Decl(keyofAndIndexedAccess.ts, 248, 24)) +>'x' : Symbol(x, Decl(keyofAndIndexedAccess.ts, 248, 29)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 248, 13)) } function f81(obj: T) { ->f81 : Symbol(f81, Decl(keyofAndIndexedAccess.ts, 256, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 258, 13)) ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 258, 24)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 258, 29)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 258, 42)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 258, 13)) +>f81 : Symbol(f81, Decl(keyofAndIndexedAccess.ts, 255, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 257, 13)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 257, 24)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 257, 29)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 257, 42)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 257, 13)) return obj['a']['x'] as T['a']['x']; ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 258, 42)) ->'a' : Symbol(a, Decl(keyofAndIndexedAccess.ts, 258, 24)) ->'x' : Symbol(x, Decl(keyofAndIndexedAccess.ts, 258, 29)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 258, 13)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 257, 42)) +>'a' : Symbol(a, Decl(keyofAndIndexedAccess.ts, 257, 24)) +>'x' : Symbol(x, Decl(keyofAndIndexedAccess.ts, 257, 29)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 257, 13)) } function f82() { ->f82 : Symbol(f82, Decl(keyofAndIndexedAccess.ts, 260, 1)) +>f82 : Symbol(f82, Decl(keyofAndIndexedAccess.ts, 259, 1)) let x1 = f81({ a: { x: "hello" } }); // string ->x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 263, 7)) ->f81 : Symbol(f81, Decl(keyofAndIndexedAccess.ts, 256, 1)) ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 263, 18)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 263, 23)) +>x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 262, 7)) +>f81 : Symbol(f81, Decl(keyofAndIndexedAccess.ts, 255, 1)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 262, 18)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 262, 23)) let x2 = f81({ a: { x: 42 } }); // number ->x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 264, 7)) ->f81 : Symbol(f81, Decl(keyofAndIndexedAccess.ts, 256, 1)) ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 264, 18)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 264, 23)) +>x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 263, 7)) +>f81 : Symbol(f81, Decl(keyofAndIndexedAccess.ts, 255, 1)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 263, 18)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 263, 23)) } function f83(obj: T, key: K) { ->f83 : Symbol(f83, Decl(keyofAndIndexedAccess.ts, 265, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 267, 13)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 267, 26)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 267, 39)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 267, 51)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 267, 13)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 267, 71)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 267, 13)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 267, 78)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 267, 51)) +>f83 : Symbol(f83, Decl(keyofAndIndexedAccess.ts, 264, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 266, 13)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 266, 26)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 266, 39)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 266, 51)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 266, 13)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 266, 71)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 266, 13)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 266, 78)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 266, 51)) return obj[key]['x'] as T[K]['x']; ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 267, 71)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 267, 78)) ->'x' : Symbol(x, Decl(keyofAndIndexedAccess.ts, 267, 39)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 267, 13)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 267, 51)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 266, 71)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 266, 78)) +>'x' : Symbol(x, Decl(keyofAndIndexedAccess.ts, 266, 39)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 266, 13)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 266, 51)) } function f84() { ->f84 : Symbol(f84, Decl(keyofAndIndexedAccess.ts, 269, 1)) +>f84 : Symbol(f84, Decl(keyofAndIndexedAccess.ts, 268, 1)) let x1 = f83({ foo: { x: "hello" } }, "foo"); // string ->x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 272, 7)) ->f83 : Symbol(f83, Decl(keyofAndIndexedAccess.ts, 265, 1)) ->foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 272, 18)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 272, 25)) +>x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 271, 7)) +>f83 : Symbol(f83, Decl(keyofAndIndexedAccess.ts, 264, 1)) +>foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 271, 18)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 271, 25)) let x2 = f83({ bar: { x: 42 } }, "bar"); // number ->x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 273, 7)) ->f83 : Symbol(f83, Decl(keyofAndIndexedAccess.ts, 265, 1)) ->bar : Symbol(bar, Decl(keyofAndIndexedAccess.ts, 273, 18)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 273, 25)) +>x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 272, 7)) +>f83 : Symbol(f83, Decl(keyofAndIndexedAccess.ts, 264, 1)) +>bar : Symbol(bar, Decl(keyofAndIndexedAccess.ts, 272, 18)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 272, 25)) } class C1 { ->C1 : Symbol(C1, Decl(keyofAndIndexedAccess.ts, 274, 1)) +>C1 : Symbol(C1, Decl(keyofAndIndexedAccess.ts, 273, 1)) x: number; ->x : Symbol(C1.x, Decl(keyofAndIndexedAccess.ts, 276, 10)) +>x : Symbol(C1.x, Decl(keyofAndIndexedAccess.ts, 275, 10)) get(key: K) { ->get : Symbol(C1.get, Decl(keyofAndIndexedAccess.ts, 277, 14)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 278, 8)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 278, 30)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 278, 8)) +>get : Symbol(C1.get, Decl(keyofAndIndexedAccess.ts, 276, 14)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 277, 8)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 277, 30)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 277, 8)) return this[key]; ->this : Symbol(C1, Decl(keyofAndIndexedAccess.ts, 274, 1)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 278, 30)) +>this : Symbol(C1, Decl(keyofAndIndexedAccess.ts, 273, 1)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 277, 30)) } set(key: K, value: this[K]) { ->set : Symbol(C1.set, Decl(keyofAndIndexedAccess.ts, 280, 5)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 281, 8)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 281, 30)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 281, 8)) ->value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 281, 37)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 281, 8)) +>set : Symbol(C1.set, Decl(keyofAndIndexedAccess.ts, 279, 5)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 280, 8)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 280, 30)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 280, 8)) +>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 280, 37)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 280, 8)) this[key] = value; ->this : Symbol(C1, Decl(keyofAndIndexedAccess.ts, 274, 1)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 281, 30)) ->value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 281, 37)) +>this : Symbol(C1, Decl(keyofAndIndexedAccess.ts, 273, 1)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 280, 30)) +>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 280, 37)) } foo() { ->foo : Symbol(C1.foo, Decl(keyofAndIndexedAccess.ts, 283, 5)) +>foo : Symbol(C1.foo, Decl(keyofAndIndexedAccess.ts, 282, 5)) let x1 = this.x; // number ->x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 285, 11)) ->this.x : Symbol(C1.x, Decl(keyofAndIndexedAccess.ts, 276, 10)) ->this : Symbol(C1, Decl(keyofAndIndexedAccess.ts, 274, 1)) ->x : Symbol(C1.x, Decl(keyofAndIndexedAccess.ts, 276, 10)) +>x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 284, 11)) +>this.x : Symbol(C1.x, Decl(keyofAndIndexedAccess.ts, 275, 10)) +>this : Symbol(C1, Decl(keyofAndIndexedAccess.ts, 273, 1)) +>x : Symbol(C1.x, Decl(keyofAndIndexedAccess.ts, 275, 10)) let x2 = this["x"]; // number ->x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 286, 11)) ->this : Symbol(C1, Decl(keyofAndIndexedAccess.ts, 274, 1)) ->"x" : Symbol(C1.x, Decl(keyofAndIndexedAccess.ts, 276, 10)) +>x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 285, 11)) +>this : Symbol(C1, Decl(keyofAndIndexedAccess.ts, 273, 1)) +>"x" : Symbol(C1.x, Decl(keyofAndIndexedAccess.ts, 275, 10)) let x3 = this.get("x"); // this["x"] ->x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 287, 11)) ->this.get : Symbol(C1.get, Decl(keyofAndIndexedAccess.ts, 277, 14)) ->this : Symbol(C1, Decl(keyofAndIndexedAccess.ts, 274, 1)) ->get : Symbol(C1.get, Decl(keyofAndIndexedAccess.ts, 277, 14)) +>x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 286, 11)) +>this.get : Symbol(C1.get, Decl(keyofAndIndexedAccess.ts, 276, 14)) +>this : Symbol(C1, Decl(keyofAndIndexedAccess.ts, 273, 1)) +>get : Symbol(C1.get, Decl(keyofAndIndexedAccess.ts, 276, 14)) let x4 = getProperty(this, "x"); // this["x"] ->x4 : Symbol(x4, Decl(keyofAndIndexedAccess.ts, 288, 11)) ->getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 76, 26)) ->this : Symbol(C1, Decl(keyofAndIndexedAccess.ts, 274, 1)) +>x4 : Symbol(x4, Decl(keyofAndIndexedAccess.ts, 287, 11)) +>getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 75, 26)) +>this : Symbol(C1, Decl(keyofAndIndexedAccess.ts, 273, 1)) this.x = 42; ->this.x : Symbol(C1.x, Decl(keyofAndIndexedAccess.ts, 276, 10)) ->this : Symbol(C1, Decl(keyofAndIndexedAccess.ts, 274, 1)) ->x : Symbol(C1.x, Decl(keyofAndIndexedAccess.ts, 276, 10)) +>this.x : Symbol(C1.x, Decl(keyofAndIndexedAccess.ts, 275, 10)) +>this : Symbol(C1, Decl(keyofAndIndexedAccess.ts, 273, 1)) +>x : Symbol(C1.x, Decl(keyofAndIndexedAccess.ts, 275, 10)) this["x"] = 42; ->this : Symbol(C1, Decl(keyofAndIndexedAccess.ts, 274, 1)) ->"x" : Symbol(C1.x, Decl(keyofAndIndexedAccess.ts, 276, 10)) +>this : Symbol(C1, Decl(keyofAndIndexedAccess.ts, 273, 1)) +>"x" : Symbol(C1.x, Decl(keyofAndIndexedAccess.ts, 275, 10)) this.set("x", 42); ->this.set : Symbol(C1.set, Decl(keyofAndIndexedAccess.ts, 280, 5)) ->this : Symbol(C1, Decl(keyofAndIndexedAccess.ts, 274, 1)) ->set : Symbol(C1.set, Decl(keyofAndIndexedAccess.ts, 280, 5)) +>this.set : Symbol(C1.set, Decl(keyofAndIndexedAccess.ts, 279, 5)) +>this : Symbol(C1, Decl(keyofAndIndexedAccess.ts, 273, 1)) +>set : Symbol(C1.set, Decl(keyofAndIndexedAccess.ts, 279, 5)) setProperty(this, "x", 42); ->setProperty : Symbol(setProperty, Decl(keyofAndIndexedAccess.ts, 80, 1)) ->this : Symbol(C1, Decl(keyofAndIndexedAccess.ts, 274, 1)) +>setProperty : Symbol(setProperty, Decl(keyofAndIndexedAccess.ts, 79, 1)) +>this : Symbol(C1, Decl(keyofAndIndexedAccess.ts, 273, 1)) } } type S2 = { ->S2 : Symbol(S2, Decl(keyofAndIndexedAccess.ts, 294, 1)) +>S2 : Symbol(S2, Decl(keyofAndIndexedAccess.ts, 293, 1)) a: string; ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 296, 11)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 295, 11)) b: string; ->b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 297, 14)) +>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 296, 14)) }; function f90(x1: S2[keyof S2], x2: T[keyof S2], x3: S2[K]) { ->f90 : Symbol(f90, Decl(keyofAndIndexedAccess.ts, 299, 2)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 301, 13)) ->S2 : Symbol(S2, Decl(keyofAndIndexedAccess.ts, 294, 1)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 301, 26)) ->S2 : Symbol(S2, Decl(keyofAndIndexedAccess.ts, 294, 1)) ->x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 301, 47)) ->S2 : Symbol(S2, Decl(keyofAndIndexedAccess.ts, 294, 1)) ->S2 : Symbol(S2, Decl(keyofAndIndexedAccess.ts, 294, 1)) ->x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 301, 64)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 301, 13)) ->S2 : Symbol(S2, Decl(keyofAndIndexedAccess.ts, 294, 1)) ->x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 301, 81)) ->S2 : Symbol(S2, Decl(keyofAndIndexedAccess.ts, 294, 1)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 301, 26)) +>f90 : Symbol(f90, Decl(keyofAndIndexedAccess.ts, 298, 2)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 300, 13)) +>S2 : Symbol(S2, Decl(keyofAndIndexedAccess.ts, 293, 1)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 300, 26)) +>S2 : Symbol(S2, Decl(keyofAndIndexedAccess.ts, 293, 1)) +>x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 300, 47)) +>S2 : Symbol(S2, Decl(keyofAndIndexedAccess.ts, 293, 1)) +>S2 : Symbol(S2, Decl(keyofAndIndexedAccess.ts, 293, 1)) +>x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 300, 64)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 300, 13)) +>S2 : Symbol(S2, Decl(keyofAndIndexedAccess.ts, 293, 1)) +>x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 300, 81)) +>S2 : Symbol(S2, Decl(keyofAndIndexedAccess.ts, 293, 1)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 300, 26)) x1 = x2; ->x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 301, 47)) ->x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 301, 64)) +>x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 300, 47)) +>x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 300, 64)) x1 = x3; ->x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 301, 47)) ->x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 301, 81)) +>x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 300, 47)) +>x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 300, 81)) x2 = x1; ->x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 301, 64)) ->x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 301, 47)) +>x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 300, 64)) +>x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 300, 47)) x2 = x3; ->x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 301, 64)) ->x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 301, 81)) +>x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 300, 64)) +>x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 300, 81)) x3 = x1; ->x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 301, 81)) ->x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 301, 47)) +>x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 300, 81)) +>x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 300, 47)) x3 = x2; ->x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 301, 81)) ->x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 301, 64)) +>x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 300, 81)) +>x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 300, 64)) x1.length; >x1.length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) ->x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 301, 47)) +>x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 300, 47)) >length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) x2.length; >x2.length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) ->x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 301, 64)) +>x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 300, 64)) >length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) x3.length; >x3.length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) ->x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 301, 81)) +>x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 300, 81)) >length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) } function f91(x: T, y: T[keyof T], z: T[K]) { ->f91 : Symbol(f91, Decl(keyofAndIndexedAccess.ts, 311, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 313, 13)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 313, 15)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 313, 13)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 313, 35)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 313, 13)) ->y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 313, 40)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 313, 13)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 313, 13)) ->z : Symbol(z, Decl(keyofAndIndexedAccess.ts, 313, 55)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 313, 13)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 313, 15)) +>f91 : Symbol(f91, Decl(keyofAndIndexedAccess.ts, 310, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 312, 13)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 312, 15)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 312, 13)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 312, 35)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 312, 13)) +>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 312, 40)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 312, 13)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 312, 13)) +>z : Symbol(z, Decl(keyofAndIndexedAccess.ts, 312, 55)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 312, 13)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 312, 15)) let a: {}; ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 314, 7)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 313, 7)) a = x; ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 314, 7)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 313, 35)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 313, 7)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 312, 35)) a = y; ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 314, 7)) ->y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 313, 40)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 313, 7)) +>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 312, 40)) a = z; ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 314, 7)) ->z : Symbol(z, Decl(keyofAndIndexedAccess.ts, 313, 55)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 313, 7)) +>z : Symbol(z, Decl(keyofAndIndexedAccess.ts, 312, 55)) } function f92(x: T, y: T[keyof T], z: T[K]) { ->f92 : Symbol(f92, Decl(keyofAndIndexedAccess.ts, 318, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 320, 13)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 320, 15)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 320, 13)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 320, 35)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 320, 13)) ->y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 320, 40)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 320, 13)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 320, 13)) ->z : Symbol(z, Decl(keyofAndIndexedAccess.ts, 320, 55)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 320, 13)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 320, 15)) +>f92 : Symbol(f92, Decl(keyofAndIndexedAccess.ts, 317, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 319, 13)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 319, 15)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 319, 13)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 319, 35)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 319, 13)) +>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 319, 40)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 319, 13)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 319, 13)) +>z : Symbol(z, Decl(keyofAndIndexedAccess.ts, 319, 55)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 319, 13)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 319, 15)) let a: {} | null | undefined; ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 321, 7)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 320, 7)) a = x; ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 321, 7)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 320, 35)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 320, 7)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 319, 35)) a = y; ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 321, 7)) ->y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 320, 40)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 320, 7)) +>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 319, 40)) a = z; ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 321, 7)) ->z : Symbol(z, Decl(keyofAndIndexedAccess.ts, 320, 55)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 320, 7)) +>z : Symbol(z, Decl(keyofAndIndexedAccess.ts, 319, 55)) } // Repros from #12011 class Base { ->Base : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 325, 1)) +>Base : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 324, 1)) get(prop: K) { ->get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 329, 12)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 330, 8)) ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 330, 30)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 330, 8)) +>get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 328, 12)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 329, 8)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 329, 30)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 329, 8)) return this[prop]; ->this : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 325, 1)) ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 330, 30)) +>this : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 324, 1)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 329, 30)) } set(prop: K, value: this[K]) { ->set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 332, 5)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 333, 8)) ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 333, 30)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 333, 8)) ->value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 333, 38)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 333, 8)) +>set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 331, 5)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 332, 8)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 332, 30)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 332, 8)) +>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 332, 38)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 332, 8)) this[prop] = value; ->this : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 325, 1)) ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 333, 30)) ->value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 333, 38)) +>this : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 324, 1)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 332, 30)) +>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 332, 38)) } } class Person extends Base { ->Person : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 336, 1)) ->Base : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 325, 1)) +>Person : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 335, 1)) +>Base : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 324, 1)) parts: number; ->parts : Symbol(Person.parts, Decl(keyofAndIndexedAccess.ts, 338, 27)) +>parts : Symbol(Person.parts, Decl(keyofAndIndexedAccess.ts, 337, 27)) constructor(parts: number) { ->parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 340, 16)) +>parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 339, 16)) super(); ->super : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 325, 1)) +>super : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 324, 1)) this.set("parts", parts); ->this.set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 332, 5)) ->this : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 336, 1)) ->set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 332, 5)) ->parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 340, 16)) +>this.set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 331, 5)) +>this : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 335, 1)) +>set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 331, 5)) +>parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 339, 16)) } getParts() { ->getParts : Symbol(Person.getParts, Decl(keyofAndIndexedAccess.ts, 343, 5)) +>getParts : Symbol(Person.getParts, Decl(keyofAndIndexedAccess.ts, 342, 5)) return this.get("parts") ->this.get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 329, 12)) ->this : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 336, 1)) ->get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 329, 12)) +>this.get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 328, 12)) +>this : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 335, 1)) +>get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 328, 12)) } } class OtherPerson { ->OtherPerson : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 347, 1)) +>OtherPerson : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 346, 1)) parts: number; ->parts : Symbol(OtherPerson.parts, Decl(keyofAndIndexedAccess.ts, 349, 19)) +>parts : Symbol(OtherPerson.parts, Decl(keyofAndIndexedAccess.ts, 348, 19)) constructor(parts: number) { ->parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 351, 16)) +>parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 350, 16)) setProperty(this, "parts", parts); ->setProperty : Symbol(setProperty, Decl(keyofAndIndexedAccess.ts, 80, 1)) ->this : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 347, 1)) ->parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 351, 16)) +>setProperty : Symbol(setProperty, Decl(keyofAndIndexedAccess.ts, 79, 1)) +>this : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 346, 1)) +>parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 350, 16)) } getParts() { ->getParts : Symbol(OtherPerson.getParts, Decl(keyofAndIndexedAccess.ts, 353, 5)) +>getParts : Symbol(OtherPerson.getParts, Decl(keyofAndIndexedAccess.ts, 352, 5)) return getProperty(this, "parts") ->getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 76, 26)) ->this : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 347, 1)) +>getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 75, 26)) +>this : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 346, 1)) } } // Modified repro from #12544 function path(obj: T, key1: K1): T[K1]; ->path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 357, 1), Decl(keyofAndIndexedAccess.ts, 361, 62), Decl(keyofAndIndexedAccess.ts, 362, 100), Decl(keyofAndIndexedAccess.ts, 363, 142), Decl(keyofAndIndexedAccess.ts, 364, 59)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 361, 14)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 361, 16)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 361, 14)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 361, 37)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 361, 14)) ->key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 361, 44)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 361, 16)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 361, 14)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 361, 16)) +>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 356, 1), Decl(keyofAndIndexedAccess.ts, 360, 62), Decl(keyofAndIndexedAccess.ts, 361, 100), Decl(keyofAndIndexedAccess.ts, 362, 142), Decl(keyofAndIndexedAccess.ts, 363, 59)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 360, 14)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 360, 16)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 360, 14)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 360, 37)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 360, 14)) +>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 360, 44)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 360, 16)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 360, 14)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 360, 16)) function path(obj: T, key1: K1, key2: K2): T[K1][K2]; ->path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 357, 1), Decl(keyofAndIndexedAccess.ts, 361, 62), Decl(keyofAndIndexedAccess.ts, 362, 100), Decl(keyofAndIndexedAccess.ts, 363, 142), Decl(keyofAndIndexedAccess.ts, 364, 59)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 362, 14)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 362, 16)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 362, 14)) ->K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 362, 36)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 362, 14)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 362, 16)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 362, 61)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 362, 14)) ->key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 362, 68)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 362, 16)) ->key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 362, 78)) ->K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 362, 36)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 362, 14)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 362, 16)) ->K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 362, 36)) +>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 356, 1), Decl(keyofAndIndexedAccess.ts, 360, 62), Decl(keyofAndIndexedAccess.ts, 361, 100), Decl(keyofAndIndexedAccess.ts, 362, 142), Decl(keyofAndIndexedAccess.ts, 363, 59)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 361, 14)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 361, 16)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 361, 14)) +>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 361, 36)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 361, 14)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 361, 16)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 361, 61)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 361, 14)) +>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 361, 68)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 361, 16)) +>key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 361, 78)) +>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 361, 36)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 361, 14)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 361, 16)) +>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 361, 36)) function path(obj: T, key1: K1, key2: K2, key3: K3): T[K1][K2][K3]; ->path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 357, 1), Decl(keyofAndIndexedAccess.ts, 361, 62), Decl(keyofAndIndexedAccess.ts, 362, 100), Decl(keyofAndIndexedAccess.ts, 363, 142), Decl(keyofAndIndexedAccess.ts, 364, 59)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 363, 14)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 363, 16)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 363, 14)) ->K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 363, 36)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 363, 14)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 363, 16)) ->K3 : Symbol(K3, Decl(keyofAndIndexedAccess.ts, 363, 60)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 363, 14)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 363, 16)) ->K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 363, 36)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 363, 89)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 363, 14)) ->key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 363, 96)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 363, 16)) ->key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 363, 106)) ->K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 363, 36)) ->key3 : Symbol(key3, Decl(keyofAndIndexedAccess.ts, 363, 116)) ->K3 : Symbol(K3, Decl(keyofAndIndexedAccess.ts, 363, 60)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 363, 14)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 363, 16)) ->K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 363, 36)) ->K3 : Symbol(K3, Decl(keyofAndIndexedAccess.ts, 363, 60)) +>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 356, 1), Decl(keyofAndIndexedAccess.ts, 360, 62), Decl(keyofAndIndexedAccess.ts, 361, 100), Decl(keyofAndIndexedAccess.ts, 362, 142), Decl(keyofAndIndexedAccess.ts, 363, 59)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 362, 14)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 362, 16)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 362, 14)) +>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 362, 36)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 362, 14)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 362, 16)) +>K3 : Symbol(K3, Decl(keyofAndIndexedAccess.ts, 362, 60)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 362, 14)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 362, 16)) +>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 362, 36)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 362, 89)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 362, 14)) +>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 362, 96)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 362, 16)) +>key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 362, 106)) +>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 362, 36)) +>key3 : Symbol(key3, Decl(keyofAndIndexedAccess.ts, 362, 116)) +>K3 : Symbol(K3, Decl(keyofAndIndexedAccess.ts, 362, 60)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 362, 14)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 362, 16)) +>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 362, 36)) +>K3 : Symbol(K3, Decl(keyofAndIndexedAccess.ts, 362, 60)) function path(obj: any, ...keys: (string | number)[]): any; ->path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 357, 1), Decl(keyofAndIndexedAccess.ts, 361, 62), Decl(keyofAndIndexedAccess.ts, 362, 100), Decl(keyofAndIndexedAccess.ts, 363, 142), Decl(keyofAndIndexedAccess.ts, 364, 59)) +>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 356, 1), Decl(keyofAndIndexedAccess.ts, 360, 62), Decl(keyofAndIndexedAccess.ts, 361, 100), Decl(keyofAndIndexedAccess.ts, 362, 142), Decl(keyofAndIndexedAccess.ts, 363, 59)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 363, 14)) +>keys : Symbol(keys, Decl(keyofAndIndexedAccess.ts, 363, 23)) + +function path(obj: any, ...keys: (string | number)[]): any { +>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 356, 1), Decl(keyofAndIndexedAccess.ts, 360, 62), Decl(keyofAndIndexedAccess.ts, 361, 100), Decl(keyofAndIndexedAccess.ts, 362, 142), Decl(keyofAndIndexedAccess.ts, 363, 59)) >obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 364, 14)) >keys : Symbol(keys, Decl(keyofAndIndexedAccess.ts, 364, 23)) -function path(obj: any, ...keys: (string | number)[]): any { ->path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 357, 1), Decl(keyofAndIndexedAccess.ts, 361, 62), Decl(keyofAndIndexedAccess.ts, 362, 100), Decl(keyofAndIndexedAccess.ts, 363, 142), Decl(keyofAndIndexedAccess.ts, 364, 59)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 365, 14)) ->keys : Symbol(keys, Decl(keyofAndIndexedAccess.ts, 365, 23)) - let result = obj; ->result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 366, 7)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 365, 14)) +>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 365, 7)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 364, 14)) for (let k of keys) { ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 367, 12)) ->keys : Symbol(keys, Decl(keyofAndIndexedAccess.ts, 365, 23)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 366, 12)) +>keys : Symbol(keys, Decl(keyofAndIndexedAccess.ts, 364, 23)) result = result[k]; ->result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 366, 7)) ->result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 366, 7)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 367, 12)) +>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 365, 7)) +>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 365, 7)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 366, 12)) } return result; ->result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 366, 7)) +>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 365, 7)) } type Thing = { ->Thing : Symbol(Thing, Decl(keyofAndIndexedAccess.ts, 371, 1)) +>Thing : Symbol(Thing, Decl(keyofAndIndexedAccess.ts, 370, 1)) a: { x: number, y: string }, ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 373, 14)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 374, 8)) ->y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 374, 19)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 372, 14)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 373, 8)) +>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 373, 19)) b: boolean ->b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 374, 32)) +>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 373, 32)) }; function f1(thing: Thing) { ->f1 : Symbol(f1, Decl(keyofAndIndexedAccess.ts, 376, 2)) ->thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 379, 12)) ->Thing : Symbol(Thing, Decl(keyofAndIndexedAccess.ts, 371, 1)) +>f1 : Symbol(f1, Decl(keyofAndIndexedAccess.ts, 375, 2)) +>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 378, 12)) +>Thing : Symbol(Thing, Decl(keyofAndIndexedAccess.ts, 370, 1)) let x1 = path(thing, 'a'); // { x: number, y: string } ->x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 380, 7)) ->path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 357, 1), Decl(keyofAndIndexedAccess.ts, 361, 62), Decl(keyofAndIndexedAccess.ts, 362, 100), Decl(keyofAndIndexedAccess.ts, 363, 142), Decl(keyofAndIndexedAccess.ts, 364, 59)) ->thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 379, 12)) +>x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 379, 7)) +>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 356, 1), Decl(keyofAndIndexedAccess.ts, 360, 62), Decl(keyofAndIndexedAccess.ts, 361, 100), Decl(keyofAndIndexedAccess.ts, 362, 142), Decl(keyofAndIndexedAccess.ts, 363, 59)) +>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 378, 12)) let x2 = path(thing, 'a', 'y'); // string ->x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 381, 7)) ->path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 357, 1), Decl(keyofAndIndexedAccess.ts, 361, 62), Decl(keyofAndIndexedAccess.ts, 362, 100), Decl(keyofAndIndexedAccess.ts, 363, 142), Decl(keyofAndIndexedAccess.ts, 364, 59)) ->thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 379, 12)) +>x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 380, 7)) +>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 356, 1), Decl(keyofAndIndexedAccess.ts, 360, 62), Decl(keyofAndIndexedAccess.ts, 361, 100), Decl(keyofAndIndexedAccess.ts, 362, 142), Decl(keyofAndIndexedAccess.ts, 363, 59)) +>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 378, 12)) let x3 = path(thing, 'b'); // boolean ->x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 382, 7)) ->path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 357, 1), Decl(keyofAndIndexedAccess.ts, 361, 62), Decl(keyofAndIndexedAccess.ts, 362, 100), Decl(keyofAndIndexedAccess.ts, 363, 142), Decl(keyofAndIndexedAccess.ts, 364, 59)) ->thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 379, 12)) +>x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 381, 7)) +>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 356, 1), Decl(keyofAndIndexedAccess.ts, 360, 62), Decl(keyofAndIndexedAccess.ts, 361, 100), Decl(keyofAndIndexedAccess.ts, 362, 142), Decl(keyofAndIndexedAccess.ts, 363, 59)) +>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 378, 12)) let x4 = path(thing, ...['a', 'x']); // any ->x4 : Symbol(x4, Decl(keyofAndIndexedAccess.ts, 383, 7)) ->path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 357, 1), Decl(keyofAndIndexedAccess.ts, 361, 62), Decl(keyofAndIndexedAccess.ts, 362, 100), Decl(keyofAndIndexedAccess.ts, 363, 142), Decl(keyofAndIndexedAccess.ts, 364, 59)) ->thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 379, 12)) +>x4 : Symbol(x4, Decl(keyofAndIndexedAccess.ts, 382, 7)) +>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 356, 1), Decl(keyofAndIndexedAccess.ts, 360, 62), Decl(keyofAndIndexedAccess.ts, 361, 100), Decl(keyofAndIndexedAccess.ts, 362, 142), Decl(keyofAndIndexedAccess.ts, 363, 59)) +>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 378, 12)) } // Repro from comment in #12114 const assignTo2 = (object: T, key1: K1, key2: K2) => ->assignTo2 : Symbol(assignTo2, Decl(keyofAndIndexedAccess.ts, 388, 5)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 388, 19)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 388, 21)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 388, 19)) ->K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 388, 41)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 388, 19)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 388, 21)) ->object : Symbol(object, Decl(keyofAndIndexedAccess.ts, 388, 66)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 388, 19)) ->key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 388, 76)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 388, 21)) ->key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 388, 86)) ->K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 388, 41)) +>assignTo2 : Symbol(assignTo2, Decl(keyofAndIndexedAccess.ts, 387, 5)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 387, 19)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 387, 21)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 387, 19)) +>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 387, 41)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 387, 19)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 387, 21)) +>object : Symbol(object, Decl(keyofAndIndexedAccess.ts, 387, 66)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 387, 19)) +>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 387, 76)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 387, 21)) +>key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 387, 86)) +>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 387, 41)) (value: T[K1][K2]) => object[key1][key2] = value; ->value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 389, 5)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 388, 19)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 388, 21)) ->K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 388, 41)) ->object : Symbol(object, Decl(keyofAndIndexedAccess.ts, 388, 66)) ->key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 388, 76)) ->key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 388, 86)) ->value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 389, 5)) +>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 388, 5)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 387, 19)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 387, 21)) +>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 387, 41)) +>object : Symbol(object, Decl(keyofAndIndexedAccess.ts, 387, 66)) +>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 387, 76)) +>key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 387, 86)) +>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 388, 5)) // Modified repro from #12573 declare function one(handler: (t: T) => void): T ->one : Symbol(one, Decl(keyofAndIndexedAccess.ts, 389, 53)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 393, 21)) ->handler : Symbol(handler, Decl(keyofAndIndexedAccess.ts, 393, 24)) ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 393, 34)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 393, 21)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 393, 21)) +>one : Symbol(one, Decl(keyofAndIndexedAccess.ts, 388, 53)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 392, 21)) +>handler : Symbol(handler, Decl(keyofAndIndexedAccess.ts, 392, 24)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 392, 34)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 392, 21)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 392, 21)) var empty = one(() => {}) // inferred as {}, expected ->empty : Symbol(empty, Decl(keyofAndIndexedAccess.ts, 394, 3)) ->one : Symbol(one, Decl(keyofAndIndexedAccess.ts, 389, 53)) +>empty : Symbol(empty, Decl(keyofAndIndexedAccess.ts, 393, 3)) +>one : Symbol(one, Decl(keyofAndIndexedAccess.ts, 388, 53)) type Handlers = { [K in keyof T]: (t: T[K]) => void } ->Handlers : Symbol(Handlers, Decl(keyofAndIndexedAccess.ts, 394, 25)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 396, 14)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 396, 22)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 396, 14)) ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 396, 38)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 396, 14)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 396, 22)) +>Handlers : Symbol(Handlers, Decl(keyofAndIndexedAccess.ts, 393, 25)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 395, 14)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 395, 22)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 395, 14)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 395, 38)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 395, 14)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 395, 22)) declare function on(handlerHash: Handlers): T ->on : Symbol(on, Decl(keyofAndIndexedAccess.ts, 396, 56)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 397, 20)) ->handlerHash : Symbol(handlerHash, Decl(keyofAndIndexedAccess.ts, 397, 23)) ->Handlers : Symbol(Handlers, Decl(keyofAndIndexedAccess.ts, 394, 25)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 397, 20)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 397, 20)) +>on : Symbol(on, Decl(keyofAndIndexedAccess.ts, 395, 56)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 396, 20)) +>handlerHash : Symbol(handlerHash, Decl(keyofAndIndexedAccess.ts, 396, 23)) +>Handlers : Symbol(Handlers, Decl(keyofAndIndexedAccess.ts, 393, 25)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 396, 20)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 396, 20)) var hashOfEmpty1 = on({ test: () => {} }); // {} ->hashOfEmpty1 : Symbol(hashOfEmpty1, Decl(keyofAndIndexedAccess.ts, 398, 3)) ->on : Symbol(on, Decl(keyofAndIndexedAccess.ts, 396, 56)) ->test : Symbol(test, Decl(keyofAndIndexedAccess.ts, 398, 23)) +>hashOfEmpty1 : Symbol(hashOfEmpty1, Decl(keyofAndIndexedAccess.ts, 397, 3)) +>on : Symbol(on, Decl(keyofAndIndexedAccess.ts, 395, 56)) +>test : Symbol(test, Decl(keyofAndIndexedAccess.ts, 397, 23)) var hashOfEmpty2 = on({ test: (x: boolean) => {} }); // { test: boolean } ->hashOfEmpty2 : Symbol(hashOfEmpty2, Decl(keyofAndIndexedAccess.ts, 399, 3)) ->on : Symbol(on, Decl(keyofAndIndexedAccess.ts, 396, 56)) ->test : Symbol(test, Decl(keyofAndIndexedAccess.ts, 399, 23)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 399, 31)) +>hashOfEmpty2 : Symbol(hashOfEmpty2, Decl(keyofAndIndexedAccess.ts, 398, 3)) +>on : Symbol(on, Decl(keyofAndIndexedAccess.ts, 395, 56)) +>test : Symbol(test, Decl(keyofAndIndexedAccess.ts, 398, 23)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 398, 31)) // Repro from #12624 interface Options1 { ->Options1 : Symbol(Options1, Decl(keyofAndIndexedAccess.ts, 399, 52)) ->Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 403, 19)) ->Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 403, 24)) +>Options1 : Symbol(Options1, Decl(keyofAndIndexedAccess.ts, 398, 52)) +>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 402, 19)) +>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 402, 24)) data?: Data ->data : Symbol(Options1.data, Decl(keyofAndIndexedAccess.ts, 403, 36)) ->Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 403, 19)) +>data : Symbol(Options1.data, Decl(keyofAndIndexedAccess.ts, 402, 36)) +>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 402, 19)) computed?: Computed; ->computed : Symbol(Options1.computed, Decl(keyofAndIndexedAccess.ts, 404, 15)) ->Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 403, 24)) +>computed : Symbol(Options1.computed, Decl(keyofAndIndexedAccess.ts, 403, 15)) +>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 402, 24)) } declare class Component1 { ->Component1 : Symbol(Component1, Decl(keyofAndIndexedAccess.ts, 406, 1)) ->Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 408, 25)) ->Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 408, 30)) +>Component1 : Symbol(Component1, Decl(keyofAndIndexedAccess.ts, 405, 1)) +>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 407, 25)) +>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 407, 30)) constructor(options: Options1); ->options : Symbol(options, Decl(keyofAndIndexedAccess.ts, 409, 16)) ->Options1 : Symbol(Options1, Decl(keyofAndIndexedAccess.ts, 399, 52)) ->Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 408, 25)) ->Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 408, 30)) +>options : Symbol(options, Decl(keyofAndIndexedAccess.ts, 408, 16)) +>Options1 : Symbol(Options1, Decl(keyofAndIndexedAccess.ts, 398, 52)) +>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 407, 25)) +>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 407, 30)) get(key: K): (Data & Computed)[K]; ->get : Symbol(Component1.get, Decl(keyofAndIndexedAccess.ts, 409, 51)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 410, 8)) ->Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 408, 25)) ->Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 408, 30)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 410, 43)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 410, 8)) ->Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 408, 25)) ->Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 408, 30)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 410, 8)) +>get : Symbol(Component1.get, Decl(keyofAndIndexedAccess.ts, 408, 51)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 409, 8)) +>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 407, 25)) +>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 407, 30)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 409, 43)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 409, 8)) +>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 407, 25)) +>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 407, 30)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 409, 8)) } let c1 = new Component1({ ->c1 : Symbol(c1, Decl(keyofAndIndexedAccess.ts, 413, 3)) ->Component1 : Symbol(Component1, Decl(keyofAndIndexedAccess.ts, 406, 1)) +>c1 : Symbol(c1, Decl(keyofAndIndexedAccess.ts, 412, 3)) +>Component1 : Symbol(Component1, Decl(keyofAndIndexedAccess.ts, 405, 1)) data: { ->data : Symbol(data, Decl(keyofAndIndexedAccess.ts, 413, 25)) +>data : Symbol(data, Decl(keyofAndIndexedAccess.ts, 412, 25)) hello: "" ->hello : Symbol(hello, Decl(keyofAndIndexedAccess.ts, 414, 11)) +>hello : Symbol(hello, Decl(keyofAndIndexedAccess.ts, 413, 11)) } }); c1.get("hello"); ->c1.get : Symbol(Component1.get, Decl(keyofAndIndexedAccess.ts, 409, 51)) ->c1 : Symbol(c1, Decl(keyofAndIndexedAccess.ts, 413, 3)) ->get : Symbol(Component1.get, Decl(keyofAndIndexedAccess.ts, 409, 51)) +>c1.get : Symbol(Component1.get, Decl(keyofAndIndexedAccess.ts, 408, 51)) +>c1 : Symbol(c1, Decl(keyofAndIndexedAccess.ts, 412, 3)) +>get : Symbol(Component1.get, Decl(keyofAndIndexedAccess.ts, 408, 51)) // Repro from #12625 interface Options2 { ->Options2 : Symbol(Options2, Decl(keyofAndIndexedAccess.ts, 419, 16)) ->Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 423, 19)) ->Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 423, 24)) +>Options2 : Symbol(Options2, Decl(keyofAndIndexedAccess.ts, 418, 16)) +>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 422, 19)) +>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 422, 24)) data?: Data ->data : Symbol(Options2.data, Decl(keyofAndIndexedAccess.ts, 423, 36)) ->Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 423, 19)) +>data : Symbol(Options2.data, Decl(keyofAndIndexedAccess.ts, 422, 36)) +>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 422, 19)) computed?: Computed; ->computed : Symbol(Options2.computed, Decl(keyofAndIndexedAccess.ts, 424, 15)) ->Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 423, 24)) +>computed : Symbol(Options2.computed, Decl(keyofAndIndexedAccess.ts, 423, 15)) +>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 422, 24)) } declare class Component2 { ->Component2 : Symbol(Component2, Decl(keyofAndIndexedAccess.ts, 426, 1)) ->Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 428, 25)) ->Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 428, 30)) +>Component2 : Symbol(Component2, Decl(keyofAndIndexedAccess.ts, 425, 1)) +>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 427, 25)) +>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 427, 30)) constructor(options: Options2); ->options : Symbol(options, Decl(keyofAndIndexedAccess.ts, 429, 16)) ->Options2 : Symbol(Options2, Decl(keyofAndIndexedAccess.ts, 419, 16)) ->Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 428, 25)) ->Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 428, 30)) +>options : Symbol(options, Decl(keyofAndIndexedAccess.ts, 428, 16)) +>Options2 : Symbol(Options2, Decl(keyofAndIndexedAccess.ts, 418, 16)) +>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 427, 25)) +>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 427, 30)) get(key: K): (Data & Computed)[K]; ->get : Symbol(Component2.get, Decl(keyofAndIndexedAccess.ts, 429, 51)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 430, 8)) ->Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 428, 25)) ->Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 428, 30)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 430, 47)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 430, 8)) ->Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 428, 25)) ->Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 428, 30)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 430, 8)) +>get : Symbol(Component2.get, Decl(keyofAndIndexedAccess.ts, 428, 51)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 429, 8)) +>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 427, 25)) +>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 427, 30)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 429, 47)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 429, 8)) +>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 427, 25)) +>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 427, 30)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 429, 8)) } // Repro from #12641 interface R { ->R : Symbol(R, Decl(keyofAndIndexedAccess.ts, 431, 1)) +>R : Symbol(R, Decl(keyofAndIndexedAccess.ts, 430, 1)) p: number; ->p : Symbol(R.p, Decl(keyofAndIndexedAccess.ts, 435, 13)) +>p : Symbol(R.p, Decl(keyofAndIndexedAccess.ts, 434, 13)) } function f(p: K) { ->f : Symbol(f, Decl(keyofAndIndexedAccess.ts, 437, 1)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 439, 11)) ->R : Symbol(R, Decl(keyofAndIndexedAccess.ts, 431, 1)) ->p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 439, 30)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 439, 11)) +>f : Symbol(f, Decl(keyofAndIndexedAccess.ts, 436, 1)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 438, 11)) +>R : Symbol(R, Decl(keyofAndIndexedAccess.ts, 430, 1)) +>p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 438, 30)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 438, 11)) let a: any; ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 440, 7)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 439, 7)) a[p].add; // any ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 440, 7)) ->p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 439, 30)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 439, 7)) +>p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 438, 30)) } // Repro from #12651 type MethodDescriptor = { ->MethodDescriptor : Symbol(MethodDescriptor, Decl(keyofAndIndexedAccess.ts, 442, 1)) +>MethodDescriptor : Symbol(MethodDescriptor, Decl(keyofAndIndexedAccess.ts, 441, 1)) name: string; ->name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 446, 25)) +>name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 445, 25)) args: any[]; ->args : Symbol(args, Decl(keyofAndIndexedAccess.ts, 447, 14)) +>args : Symbol(args, Decl(keyofAndIndexedAccess.ts, 446, 14)) returnValue: any; ->returnValue : Symbol(returnValue, Decl(keyofAndIndexedAccess.ts, 448, 13)) +>returnValue : Symbol(returnValue, Decl(keyofAndIndexedAccess.ts, 447, 13)) } declare function dispatchMethod(name: M['name'], args: M['args']): M['returnValue']; ->dispatchMethod : Symbol(dispatchMethod, Decl(keyofAndIndexedAccess.ts, 450, 1)) ->M : Symbol(M, Decl(keyofAndIndexedAccess.ts, 452, 32)) ->MethodDescriptor : Symbol(MethodDescriptor, Decl(keyofAndIndexedAccess.ts, 442, 1)) ->name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 452, 60)) ->M : Symbol(M, Decl(keyofAndIndexedAccess.ts, 452, 32)) ->args : Symbol(args, Decl(keyofAndIndexedAccess.ts, 452, 76)) ->M : Symbol(M, Decl(keyofAndIndexedAccess.ts, 452, 32)) ->M : Symbol(M, Decl(keyofAndIndexedAccess.ts, 452, 32)) +>dispatchMethod : Symbol(dispatchMethod, Decl(keyofAndIndexedAccess.ts, 449, 1)) +>M : Symbol(M, Decl(keyofAndIndexedAccess.ts, 451, 32)) +>MethodDescriptor : Symbol(MethodDescriptor, Decl(keyofAndIndexedAccess.ts, 441, 1)) +>name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 451, 60)) +>M : Symbol(M, Decl(keyofAndIndexedAccess.ts, 451, 32)) +>args : Symbol(args, Decl(keyofAndIndexedAccess.ts, 451, 76)) +>M : Symbol(M, Decl(keyofAndIndexedAccess.ts, 451, 32)) +>M : Symbol(M, Decl(keyofAndIndexedAccess.ts, 451, 32)) type SomeMethodDescriptor = { ->SomeMethodDescriptor : Symbol(SomeMethodDescriptor, Decl(keyofAndIndexedAccess.ts, 452, 112)) +>SomeMethodDescriptor : Symbol(SomeMethodDescriptor, Decl(keyofAndIndexedAccess.ts, 451, 112)) name: "someMethod"; ->name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 454, 29)) +>name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 453, 29)) args: [string, number]; ->args : Symbol(args, Decl(keyofAndIndexedAccess.ts, 455, 20)) +>args : Symbol(args, Decl(keyofAndIndexedAccess.ts, 454, 20)) returnValue: string[]; ->returnValue : Symbol(returnValue, Decl(keyofAndIndexedAccess.ts, 456, 24)) +>returnValue : Symbol(returnValue, Decl(keyofAndIndexedAccess.ts, 455, 24)) } let result = dispatchMethod("someMethod", ["hello", 35]); ->result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 460, 3)) ->dispatchMethod : Symbol(dispatchMethod, Decl(keyofAndIndexedAccess.ts, 450, 1)) ->SomeMethodDescriptor : Symbol(SomeMethodDescriptor, Decl(keyofAndIndexedAccess.ts, 452, 112)) +>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 459, 3)) +>dispatchMethod : Symbol(dispatchMethod, Decl(keyofAndIndexedAccess.ts, 449, 1)) +>SomeMethodDescriptor : Symbol(SomeMethodDescriptor, Decl(keyofAndIndexedAccess.ts, 451, 112)) // Repro from #13073 type KeyTypes = "a" | "b" ->KeyTypes : Symbol(KeyTypes, Decl(keyofAndIndexedAccess.ts, 460, 79)) +>KeyTypes : Symbol(KeyTypes, Decl(keyofAndIndexedAccess.ts, 459, 79)) let MyThingy: { [key in KeyTypes]: string[] }; ->MyThingy : Symbol(MyThingy, Decl(keyofAndIndexedAccess.ts, 465, 3)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 465, 17)) ->KeyTypes : Symbol(KeyTypes, Decl(keyofAndIndexedAccess.ts, 460, 79)) +>MyThingy : Symbol(MyThingy, Decl(keyofAndIndexedAccess.ts, 464, 3)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 464, 17)) +>KeyTypes : Symbol(KeyTypes, Decl(keyofAndIndexedAccess.ts, 459, 79)) function addToMyThingy(key: S) { ->addToMyThingy : Symbol(addToMyThingy, Decl(keyofAndIndexedAccess.ts, 465, 46)) ->S : Symbol(S, Decl(keyofAndIndexedAccess.ts, 467, 23)) ->KeyTypes : Symbol(KeyTypes, Decl(keyofAndIndexedAccess.ts, 460, 79)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 467, 43)) ->S : Symbol(S, Decl(keyofAndIndexedAccess.ts, 467, 23)) +>addToMyThingy : Symbol(addToMyThingy, Decl(keyofAndIndexedAccess.ts, 464, 46)) +>S : Symbol(S, Decl(keyofAndIndexedAccess.ts, 466, 23)) +>KeyTypes : Symbol(KeyTypes, Decl(keyofAndIndexedAccess.ts, 459, 79)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 466, 43)) +>S : Symbol(S, Decl(keyofAndIndexedAccess.ts, 466, 23)) MyThingy[key].push("a"); >MyThingy[key].push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) ->MyThingy : Symbol(MyThingy, Decl(keyofAndIndexedAccess.ts, 465, 3)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 467, 43)) +>MyThingy : Symbol(MyThingy, Decl(keyofAndIndexedAccess.ts, 464, 3)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 466, 43)) >push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) } // Repro from #13102 type Handler = { ->Handler : Symbol(Handler, Decl(keyofAndIndexedAccess.ts, 469, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 473, 13)) +>Handler : Symbol(Handler, Decl(keyofAndIndexedAccess.ts, 468, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 472, 13)) onChange: (name: keyof T) => void; ->onChange : Symbol(onChange, Decl(keyofAndIndexedAccess.ts, 473, 19)) ->name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 474, 15)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 473, 13)) +>onChange : Symbol(onChange, Decl(keyofAndIndexedAccess.ts, 472, 19)) +>name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 473, 15)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 472, 13)) }; function onChangeGenericFunction(handler: Handler) { ->onChangeGenericFunction : Symbol(onChangeGenericFunction, Decl(keyofAndIndexedAccess.ts, 475, 2)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 477, 33)) ->handler : Symbol(handler, Decl(keyofAndIndexedAccess.ts, 477, 36)) ->Handler : Symbol(Handler, Decl(keyofAndIndexedAccess.ts, 469, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 477, 33)) ->preset : Symbol(preset, Decl(keyofAndIndexedAccess.ts, 477, 58)) +>onChangeGenericFunction : Symbol(onChangeGenericFunction, Decl(keyofAndIndexedAccess.ts, 474, 2)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 476, 33)) +>handler : Symbol(handler, Decl(keyofAndIndexedAccess.ts, 476, 36)) +>Handler : Symbol(Handler, Decl(keyofAndIndexedAccess.ts, 468, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 476, 33)) +>preset : Symbol(preset, Decl(keyofAndIndexedAccess.ts, 476, 58)) handler.onChange('preset') ->handler.onChange : Symbol(onChange, Decl(keyofAndIndexedAccess.ts, 473, 19)) ->handler : Symbol(handler, Decl(keyofAndIndexedAccess.ts, 477, 36)) ->onChange : Symbol(onChange, Decl(keyofAndIndexedAccess.ts, 473, 19)) +>handler.onChange : Symbol(onChange, Decl(keyofAndIndexedAccess.ts, 472, 19)) +>handler : Symbol(handler, Decl(keyofAndIndexedAccess.ts, 476, 36)) +>onChange : Symbol(onChange, Decl(keyofAndIndexedAccess.ts, 472, 19)) } // Repro from #13285 function updateIds, K extends string>( ->updateIds : Symbol(updateIds, Decl(keyofAndIndexedAccess.ts, 479, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 483, 19)) +>updateIds : Symbol(updateIds, Decl(keyofAndIndexedAccess.ts, 478, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 482, 19)) >Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 483, 47)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 483, 47)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 482, 47)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 482, 47)) obj: T, ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 483, 66)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 483, 19)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 482, 66)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 482, 19)) idFields: K[], ->idFields : Symbol(idFields, Decl(keyofAndIndexedAccess.ts, 484, 11)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 483, 47)) +>idFields : Symbol(idFields, Decl(keyofAndIndexedAccess.ts, 483, 11)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 482, 47)) idMapping: { [oldId: string]: string } ->idMapping : Symbol(idMapping, Decl(keyofAndIndexedAccess.ts, 485, 18)) ->oldId : Symbol(oldId, Decl(keyofAndIndexedAccess.ts, 486, 18)) +>idMapping : Symbol(idMapping, Decl(keyofAndIndexedAccess.ts, 484, 18)) +>oldId : Symbol(oldId, Decl(keyofAndIndexedAccess.ts, 485, 18)) ): Record { >Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 483, 47)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 482, 47)) for (const idField of idFields) { ->idField : Symbol(idField, Decl(keyofAndIndexedAccess.ts, 488, 14)) ->idFields : Symbol(idFields, Decl(keyofAndIndexedAccess.ts, 484, 11)) +>idField : Symbol(idField, Decl(keyofAndIndexedAccess.ts, 487, 14)) +>idFields : Symbol(idFields, Decl(keyofAndIndexedAccess.ts, 483, 11)) const newId = idMapping[obj[idField]]; ->newId : Symbol(newId, Decl(keyofAndIndexedAccess.ts, 489, 13)) ->idMapping : Symbol(idMapping, Decl(keyofAndIndexedAccess.ts, 485, 18)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 483, 66)) ->idField : Symbol(idField, Decl(keyofAndIndexedAccess.ts, 488, 14)) +>newId : Symbol(newId, Decl(keyofAndIndexedAccess.ts, 488, 13)) +>idMapping : Symbol(idMapping, Decl(keyofAndIndexedAccess.ts, 484, 18)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 482, 66)) +>idField : Symbol(idField, Decl(keyofAndIndexedAccess.ts, 487, 14)) if (newId) { ->newId : Symbol(newId, Decl(keyofAndIndexedAccess.ts, 489, 13)) +>newId : Symbol(newId, Decl(keyofAndIndexedAccess.ts, 488, 13)) obj[idField] = newId; ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 483, 66)) ->idField : Symbol(idField, Decl(keyofAndIndexedAccess.ts, 488, 14)) ->newId : Symbol(newId, Decl(keyofAndIndexedAccess.ts, 489, 13)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 482, 66)) +>idField : Symbol(idField, Decl(keyofAndIndexedAccess.ts, 487, 14)) +>newId : Symbol(newId, Decl(keyofAndIndexedAccess.ts, 488, 13)) } } return obj; ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 483, 66)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 482, 66)) } // Repro from #13285 function updateIds2( ->updateIds2 : Symbol(updateIds2, Decl(keyofAndIndexedAccess.ts, 495, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 499, 20)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 499, 33)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 499, 54)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 499, 20)) +>updateIds2 : Symbol(updateIds2, Decl(keyofAndIndexedAccess.ts, 494, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 498, 20)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 498, 33)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 498, 54)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 498, 20)) obj: T, ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 499, 74)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 499, 20)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 498, 74)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 498, 20)) key: K, ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 500, 11)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 499, 54)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 499, 11)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 498, 54)) stringMap: { [oldId: string]: string } ->stringMap : Symbol(stringMap, Decl(keyofAndIndexedAccess.ts, 501, 11)) ->oldId : Symbol(oldId, Decl(keyofAndIndexedAccess.ts, 502, 18)) +>stringMap : Symbol(stringMap, Decl(keyofAndIndexedAccess.ts, 500, 11)) +>oldId : Symbol(oldId, Decl(keyofAndIndexedAccess.ts, 501, 18)) ) { var x = obj[key]; ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 504, 7)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 499, 74)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 500, 11)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 503, 7)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 498, 74)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 499, 11)) stringMap[x]; // Should be OK. ->stringMap : Symbol(stringMap, Decl(keyofAndIndexedAccess.ts, 501, 11)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 504, 7)) +>stringMap : Symbol(stringMap, Decl(keyofAndIndexedAccess.ts, 500, 11)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 503, 7)) } // Repro from #13514 declare function head>(list: T): T[0]; ->head : Symbol(head, Decl(keyofAndIndexedAccess.ts, 506, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 510, 22)) +>head : Symbol(head, Decl(keyofAndIndexedAccess.ts, 505, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 509, 22)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->list : Symbol(list, Decl(keyofAndIndexedAccess.ts, 510, 44)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 510, 22)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 510, 22)) +>list : Symbol(list, Decl(keyofAndIndexedAccess.ts, 509, 44)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 509, 22)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 509, 22)) // Repro from #13604 class A { ->A : Symbol(A, Decl(keyofAndIndexedAccess.ts, 510, 59)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 514, 8)) +>A : Symbol(A, Decl(keyofAndIndexedAccess.ts, 509, 59)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 513, 8)) props: T & { foo: string }; ->props : Symbol(A.props, Decl(keyofAndIndexedAccess.ts, 514, 12)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 514, 8)) ->foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 515, 13)) +>props : Symbol(A.props, Decl(keyofAndIndexedAccess.ts, 513, 12)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 513, 8)) +>foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 514, 13)) } class B extends A<{ x: number}> { ->B : Symbol(B, Decl(keyofAndIndexedAccess.ts, 516, 1)) ->A : Symbol(A, Decl(keyofAndIndexedAccess.ts, 510, 59)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 518, 19)) +>B : Symbol(B, Decl(keyofAndIndexedAccess.ts, 515, 1)) +>A : Symbol(A, Decl(keyofAndIndexedAccess.ts, 509, 59)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 517, 19)) f(p: this["props"]) { ->f : Symbol(B.f, Decl(keyofAndIndexedAccess.ts, 518, 33)) ->p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 519, 3)) +>f : Symbol(B.f, Decl(keyofAndIndexedAccess.ts, 517, 33)) +>p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 518, 3)) p.x; ->p.x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 518, 19)) ->p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 519, 3)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 518, 19)) +>p.x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 517, 19)) +>p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 518, 3)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 517, 19)) } } // Repro from #13749 class Form { ->Form : Symbol(Form, Decl(keyofAndIndexedAccess.ts, 522, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 526, 11)) +>Form : Symbol(Form, Decl(keyofAndIndexedAccess.ts, 521, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 525, 11)) private childFormFactories: {[K in keyof T]: (v: T[K]) => Form} ->childFormFactories : Symbol(Form.childFormFactories, Decl(keyofAndIndexedAccess.ts, 526, 15)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 527, 34)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 526, 11)) ->v : Symbol(v, Decl(keyofAndIndexedAccess.ts, 527, 50)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 526, 11)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 527, 34)) ->Form : Symbol(Form, Decl(keyofAndIndexedAccess.ts, 522, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 526, 11)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 527, 34)) +>childFormFactories : Symbol(Form.childFormFactories, Decl(keyofAndIndexedAccess.ts, 525, 15)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 526, 34)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 525, 11)) +>v : Symbol(v, Decl(keyofAndIndexedAccess.ts, 526, 50)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 525, 11)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 526, 34)) +>Form : Symbol(Form, Decl(keyofAndIndexedAccess.ts, 521, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 525, 11)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 526, 34)) public set(prop: K, value: T[K]) { ->set : Symbol(Form.set, Decl(keyofAndIndexedAccess.ts, 527, 73)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 529, 15)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 526, 11)) ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 529, 34)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 529, 15)) ->value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 529, 42)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 526, 11)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 529, 15)) +>set : Symbol(Form.set, Decl(keyofAndIndexedAccess.ts, 526, 73)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 528, 15)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 525, 11)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 528, 34)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 528, 15)) +>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 528, 42)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 525, 11)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 528, 15)) this.childFormFactories[prop](value) ->this.childFormFactories : Symbol(Form.childFormFactories, Decl(keyofAndIndexedAccess.ts, 526, 15)) ->this : Symbol(Form, Decl(keyofAndIndexedAccess.ts, 522, 1)) ->childFormFactories : Symbol(Form.childFormFactories, Decl(keyofAndIndexedAccess.ts, 526, 15)) ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 529, 34)) ->value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 529, 42)) +>this.childFormFactories : Symbol(Form.childFormFactories, Decl(keyofAndIndexedAccess.ts, 525, 15)) +>this : Symbol(Form, Decl(keyofAndIndexedAccess.ts, 521, 1)) +>childFormFactories : Symbol(Form.childFormFactories, Decl(keyofAndIndexedAccess.ts, 525, 15)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 528, 34)) +>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 528, 42)) } } // Repro from #13787 class SampleClass

{ ->SampleClass : Symbol(SampleClass, Decl(keyofAndIndexedAccess.ts, 532, 1)) ->P : Symbol(P, Decl(keyofAndIndexedAccess.ts, 536, 18)) +>SampleClass : Symbol(SampleClass, Decl(keyofAndIndexedAccess.ts, 531, 1)) +>P : Symbol(P, Decl(keyofAndIndexedAccess.ts, 535, 18)) public props: Readonly

; ->props : Symbol(SampleClass.props, Decl(keyofAndIndexedAccess.ts, 536, 22)) +>props : Symbol(SampleClass.props, Decl(keyofAndIndexedAccess.ts, 535, 22)) >Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --)) ->P : Symbol(P, Decl(keyofAndIndexedAccess.ts, 536, 18)) +>P : Symbol(P, Decl(keyofAndIndexedAccess.ts, 535, 18)) constructor(props: P) { ->props : Symbol(props, Decl(keyofAndIndexedAccess.ts, 538, 16)) ->P : Symbol(P, Decl(keyofAndIndexedAccess.ts, 536, 18)) +>props : Symbol(props, Decl(keyofAndIndexedAccess.ts, 537, 16)) +>P : Symbol(P, Decl(keyofAndIndexedAccess.ts, 535, 18)) this.props = Object.freeze(props); ->this.props : Symbol(SampleClass.props, Decl(keyofAndIndexedAccess.ts, 536, 22)) ->this : Symbol(SampleClass, Decl(keyofAndIndexedAccess.ts, 532, 1)) ->props : Symbol(SampleClass.props, Decl(keyofAndIndexedAccess.ts, 536, 22)) +>this.props : Symbol(SampleClass.props, Decl(keyofAndIndexedAccess.ts, 535, 22)) +>this : Symbol(SampleClass, Decl(keyofAndIndexedAccess.ts, 531, 1)) +>props : Symbol(SampleClass.props, Decl(keyofAndIndexedAccess.ts, 535, 22)) >Object.freeze : Symbol(ObjectConstructor.freeze, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >freeze : Symbol(ObjectConstructor.freeze, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->props : Symbol(props, Decl(keyofAndIndexedAccess.ts, 538, 16)) +>props : Symbol(props, Decl(keyofAndIndexedAccess.ts, 537, 16)) } } interface Foo { ->Foo : Symbol(Foo, Decl(keyofAndIndexedAccess.ts, 541, 1)) +>Foo : Symbol(Foo, Decl(keyofAndIndexedAccess.ts, 540, 1)) foo: string; ->foo : Symbol(Foo.foo, Decl(keyofAndIndexedAccess.ts, 543, 15)) +>foo : Symbol(Foo.foo, Decl(keyofAndIndexedAccess.ts, 542, 15)) } declare function merge(obj1: T, obj2: U): T & U; ->merge : Symbol(merge, Decl(keyofAndIndexedAccess.ts, 545, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 547, 23)) ->U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 547, 25)) ->obj1 : Symbol(obj1, Decl(keyofAndIndexedAccess.ts, 547, 29)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 547, 23)) ->obj2 : Symbol(obj2, Decl(keyofAndIndexedAccess.ts, 547, 37)) ->U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 547, 25)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 547, 23)) ->U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 547, 25)) +>merge : Symbol(merge, Decl(keyofAndIndexedAccess.ts, 544, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 546, 23)) +>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 546, 25)) +>obj1 : Symbol(obj1, Decl(keyofAndIndexedAccess.ts, 546, 29)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 546, 23)) +>obj2 : Symbol(obj2, Decl(keyofAndIndexedAccess.ts, 546, 37)) +>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 546, 25)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 546, 23)) +>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 546, 25)) class AnotherSampleClass extends SampleClass { ->AnotherSampleClass : Symbol(AnotherSampleClass, Decl(keyofAndIndexedAccess.ts, 547, 54)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 549, 25)) ->SampleClass : Symbol(SampleClass, Decl(keyofAndIndexedAccess.ts, 532, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 549, 25)) ->Foo : Symbol(Foo, Decl(keyofAndIndexedAccess.ts, 541, 1)) +>AnotherSampleClass : Symbol(AnotherSampleClass, Decl(keyofAndIndexedAccess.ts, 546, 54)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 548, 25)) +>SampleClass : Symbol(SampleClass, Decl(keyofAndIndexedAccess.ts, 531, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 548, 25)) +>Foo : Symbol(Foo, Decl(keyofAndIndexedAccess.ts, 540, 1)) constructor(props: T) { ->props : Symbol(props, Decl(keyofAndIndexedAccess.ts, 550, 16)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 549, 25)) +>props : Symbol(props, Decl(keyofAndIndexedAccess.ts, 549, 16)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 548, 25)) const foo: Foo = { foo: "bar" }; ->foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 551, 13)) ->Foo : Symbol(Foo, Decl(keyofAndIndexedAccess.ts, 541, 1)) ->foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 551, 26)) +>foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 550, 13)) +>Foo : Symbol(Foo, Decl(keyofAndIndexedAccess.ts, 540, 1)) +>foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 550, 26)) super(merge(props, foo)); ->super : Symbol(SampleClass, Decl(keyofAndIndexedAccess.ts, 532, 1)) ->merge : Symbol(merge, Decl(keyofAndIndexedAccess.ts, 545, 1)) ->props : Symbol(props, Decl(keyofAndIndexedAccess.ts, 550, 16)) ->foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 551, 13)) +>super : Symbol(SampleClass, Decl(keyofAndIndexedAccess.ts, 531, 1)) +>merge : Symbol(merge, Decl(keyofAndIndexedAccess.ts, 544, 1)) +>props : Symbol(props, Decl(keyofAndIndexedAccess.ts, 549, 16)) +>foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 550, 13)) } public brokenMethod() { ->brokenMethod : Symbol(AnotherSampleClass.brokenMethod, Decl(keyofAndIndexedAccess.ts, 553, 5)) +>brokenMethod : Symbol(AnotherSampleClass.brokenMethod, Decl(keyofAndIndexedAccess.ts, 552, 5)) this.props.foo.concat; >this.props.foo.concat : Symbol(String.concat, Decl(lib.es5.d.ts, --, --)) ->this.props.foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 543, 15)) ->this.props : Symbol(SampleClass.props, Decl(keyofAndIndexedAccess.ts, 536, 22)) ->this : Symbol(AnotherSampleClass, Decl(keyofAndIndexedAccess.ts, 547, 54)) ->props : Symbol(SampleClass.props, Decl(keyofAndIndexedAccess.ts, 536, 22)) ->foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 543, 15)) +>this.props.foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 542, 15)) +>this.props : Symbol(SampleClass.props, Decl(keyofAndIndexedAccess.ts, 535, 22)) +>this : Symbol(AnotherSampleClass, Decl(keyofAndIndexedAccess.ts, 546, 54)) +>props : Symbol(SampleClass.props, Decl(keyofAndIndexedAccess.ts, 535, 22)) +>foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 542, 15)) >concat : Symbol(String.concat, Decl(lib.es5.d.ts, --, --)) } } new AnotherSampleClass({}); ->AnotherSampleClass : Symbol(AnotherSampleClass, Decl(keyofAndIndexedAccess.ts, 547, 54)) +>AnotherSampleClass : Symbol(AnotherSampleClass, Decl(keyofAndIndexedAccess.ts, 546, 54)) // Positive repro from #17166 function f3>(t: T, k: K, tk: T[K]): void { ->f3 : Symbol(f3, Decl(keyofAndIndexedAccess.ts, 559, 27)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 562, 12)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 562, 14)) +>f3 : Symbol(f3, Decl(keyofAndIndexedAccess.ts, 558, 27)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 561, 12)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 561, 14)) >Extract : Symbol(Extract, Decl(lib.es5.d.ts, --, --)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 562, 12)) ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 562, 51)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 562, 12)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 562, 56)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 562, 14)) ->tk : Symbol(tk, Decl(keyofAndIndexedAccess.ts, 562, 62)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 562, 12)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 562, 14)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 561, 12)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 561, 51)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 561, 12)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 561, 56)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 561, 14)) +>tk : Symbol(tk, Decl(keyofAndIndexedAccess.ts, 561, 62)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 561, 12)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 561, 14)) for (let key in t) { ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 563, 12)) ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 562, 51)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 562, 12)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 561, 51)) key = k // ok, K ==> keyof T ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 563, 12)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 562, 56)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 562, 12)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 561, 56)) t[key] = tk; // ok, T[K] ==> T[keyof T] ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 562, 51)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 563, 12)) ->tk : Symbol(tk, Decl(keyofAndIndexedAccess.ts, 562, 62)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 561, 51)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 562, 12)) +>tk : Symbol(tk, Decl(keyofAndIndexedAccess.ts, 561, 62)) } } // # 21185 type Predicates = { ->Predicates : Symbol(Predicates, Decl(keyofAndIndexedAccess.ts, 567, 1)) ->TaggedRecord : Symbol(TaggedRecord, Decl(keyofAndIndexedAccess.ts, 570, 16)) +>Predicates : Symbol(Predicates, Decl(keyofAndIndexedAccess.ts, 566, 1)) +>TaggedRecord : Symbol(TaggedRecord, Decl(keyofAndIndexedAccess.ts, 569, 16)) [T in keyof TaggedRecord]: (variant: TaggedRecord[keyof TaggedRecord]) => variant is TaggedRecord[T] ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 571, 3)) ->TaggedRecord : Symbol(TaggedRecord, Decl(keyofAndIndexedAccess.ts, 570, 16)) ->variant : Symbol(variant, Decl(keyofAndIndexedAccess.ts, 571, 30)) ->TaggedRecord : Symbol(TaggedRecord, Decl(keyofAndIndexedAccess.ts, 570, 16)) ->TaggedRecord : Symbol(TaggedRecord, Decl(keyofAndIndexedAccess.ts, 570, 16)) ->variant : Symbol(variant, Decl(keyofAndIndexedAccess.ts, 571, 30)) ->TaggedRecord : Symbol(TaggedRecord, Decl(keyofAndIndexedAccess.ts, 570, 16)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 571, 3)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 570, 3)) +>TaggedRecord : Symbol(TaggedRecord, Decl(keyofAndIndexedAccess.ts, 569, 16)) +>variant : Symbol(variant, Decl(keyofAndIndexedAccess.ts, 570, 30)) +>TaggedRecord : Symbol(TaggedRecord, Decl(keyofAndIndexedAccess.ts, 569, 16)) +>TaggedRecord : Symbol(TaggedRecord, Decl(keyofAndIndexedAccess.ts, 569, 16)) +>variant : Symbol(variant, Decl(keyofAndIndexedAccess.ts, 570, 30)) +>TaggedRecord : Symbol(TaggedRecord, Decl(keyofAndIndexedAccess.ts, 569, 16)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 570, 3)) } // Repros from #23592 type Example = { [K in keyof T]: T[K]["prop"] }; ->Example : Symbol(Example, Decl(keyofAndIndexedAccess.ts, 572, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 576, 13)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 576, 26)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 576, 13)) ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 576, 42)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 576, 63)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 576, 13)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 576, 13)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 576, 63)) +>Example : Symbol(Example, Decl(keyofAndIndexedAccess.ts, 571, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 575, 13)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 575, 26)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 575, 13)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 575, 42)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 575, 63)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 575, 13)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 575, 13)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 575, 63)) type Result = Example<{ a: { prop: string }; b: { prop: number } }>; ->Result : Symbol(Result, Decl(keyofAndIndexedAccess.ts, 576, 93)) ->Example : Symbol(Example, Decl(keyofAndIndexedAccess.ts, 572, 1)) ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 577, 23)) ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 577, 28)) ->b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 577, 44)) ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 577, 49)) +>Result : Symbol(Result, Decl(keyofAndIndexedAccess.ts, 575, 93)) +>Example : Symbol(Example, Decl(keyofAndIndexedAccess.ts, 571, 1)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 576, 23)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 576, 28)) +>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 576, 44)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 576, 49)) type Helper2 = { [K in keyof T]: Extract }; ->Helper2 : Symbol(Helper2, Decl(keyofAndIndexedAccess.ts, 577, 68)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 579, 13)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 579, 21)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 579, 13)) +>Helper2 : Symbol(Helper2, Decl(keyofAndIndexedAccess.ts, 576, 68)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 578, 13)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 578, 21)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 578, 13)) >Extract : Symbol(Extract, Decl(lib.es5.d.ts, --, --)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 579, 13)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 579, 21)) ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 579, 51)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 578, 13)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 578, 21)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 578, 51)) type Example2 = { [K in keyof Helper2]: Helper2[K]["prop"] }; ->Example2 : Symbol(Example2, Decl(keyofAndIndexedAccess.ts, 579, 67)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 580, 14)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 580, 22)) ->Helper2 : Symbol(Helper2, Decl(keyofAndIndexedAccess.ts, 577, 68)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 580, 14)) ->Helper2 : Symbol(Helper2, Decl(keyofAndIndexedAccess.ts, 577, 68)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 580, 14)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 580, 22)) +>Example2 : Symbol(Example2, Decl(keyofAndIndexedAccess.ts, 578, 67)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 579, 14)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 579, 22)) +>Helper2 : Symbol(Helper2, Decl(keyofAndIndexedAccess.ts, 576, 68)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 579, 14)) +>Helper2 : Symbol(Helper2, Decl(keyofAndIndexedAccess.ts, 576, 68)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 579, 14)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 579, 22)) type Result2 = Example2<{ 1: { prop: string }; 2: { prop: number } }>; ->Result2 : Symbol(Result2, Decl(keyofAndIndexedAccess.ts, 580, 70)) ->Example2 : Symbol(Example2, Decl(keyofAndIndexedAccess.ts, 579, 67)) ->1 : Symbol(1, Decl(keyofAndIndexedAccess.ts, 581, 25)) ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 581, 30)) ->2 : Symbol(2, Decl(keyofAndIndexedAccess.ts, 581, 46)) ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 581, 51)) +>Result2 : Symbol(Result2, Decl(keyofAndIndexedAccess.ts, 579, 70)) +>Example2 : Symbol(Example2, Decl(keyofAndIndexedAccess.ts, 578, 67)) +>1 : Symbol(1, Decl(keyofAndIndexedAccess.ts, 580, 25)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 580, 30)) +>2 : Symbol(2, Decl(keyofAndIndexedAccess.ts, 580, 46)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 580, 51)) // Repro from #23618 type DBBoolTable = { [k in K]: 0 | 1 } ->DBBoolTable : Symbol(DBBoolTable, Decl(keyofAndIndexedAccess.ts, 581, 70)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 585, 17)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 585, 40)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 585, 17)) +>DBBoolTable : Symbol(DBBoolTable, Decl(keyofAndIndexedAccess.ts, 580, 70)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 584, 17)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 584, 40)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 584, 17)) enum Flag { ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 585, 56)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 584, 56)) FLAG_1 = "flag_1", ->FLAG_1 : Symbol(Flag.FLAG_1, Decl(keyofAndIndexedAccess.ts, 586, 11)) +>FLAG_1 : Symbol(Flag.FLAG_1, Decl(keyofAndIndexedAccess.ts, 585, 11)) FLAG_2 = "flag_2" ->FLAG_2 : Symbol(Flag.FLAG_2, Decl(keyofAndIndexedAccess.ts, 587, 22)) +>FLAG_2 : Symbol(Flag.FLAG_2, Decl(keyofAndIndexedAccess.ts, 586, 22)) } type SimpleDBRecord = { staticField: number } & DBBoolTable ->SimpleDBRecord : Symbol(SimpleDBRecord, Decl(keyofAndIndexedAccess.ts, 589, 1)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 591, 20)) ->staticField : Symbol(staticField, Decl(keyofAndIndexedAccess.ts, 591, 44)) ->DBBoolTable : Symbol(DBBoolTable, Decl(keyofAndIndexedAccess.ts, 581, 70)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 591, 20)) +>SimpleDBRecord : Symbol(SimpleDBRecord, Decl(keyofAndIndexedAccess.ts, 588, 1)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 590, 20)) +>staticField : Symbol(staticField, Decl(keyofAndIndexedAccess.ts, 590, 44)) +>DBBoolTable : Symbol(DBBoolTable, Decl(keyofAndIndexedAccess.ts, 580, 70)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 590, 20)) function getFlagsFromSimpleRecord(record: SimpleDBRecord, flags: Flag[]) { ->getFlagsFromSimpleRecord : Symbol(getFlagsFromSimpleRecord, Decl(keyofAndIndexedAccess.ts, 591, 86)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 592, 34)) ->record : Symbol(record, Decl(keyofAndIndexedAccess.ts, 592, 55)) ->SimpleDBRecord : Symbol(SimpleDBRecord, Decl(keyofAndIndexedAccess.ts, 589, 1)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 592, 34)) ->flags : Symbol(flags, Decl(keyofAndIndexedAccess.ts, 592, 84)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 592, 34)) +>getFlagsFromSimpleRecord : Symbol(getFlagsFromSimpleRecord, Decl(keyofAndIndexedAccess.ts, 590, 86)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 591, 34)) +>record : Symbol(record, Decl(keyofAndIndexedAccess.ts, 591, 55)) +>SimpleDBRecord : Symbol(SimpleDBRecord, Decl(keyofAndIndexedAccess.ts, 588, 1)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 591, 34)) +>flags : Symbol(flags, Decl(keyofAndIndexedAccess.ts, 591, 84)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 591, 34)) return record[flags[0]]; ->record : Symbol(record, Decl(keyofAndIndexedAccess.ts, 592, 55)) ->flags : Symbol(flags, Decl(keyofAndIndexedAccess.ts, 592, 84)) +>record : Symbol(record, Decl(keyofAndIndexedAccess.ts, 591, 55)) +>flags : Symbol(flags, Decl(keyofAndIndexedAccess.ts, 591, 84)) } type DynamicDBRecord = ({ dynamicField: number } | { dynamicField: string }) & DBBoolTable ->DynamicDBRecord : Symbol(DynamicDBRecord, Decl(keyofAndIndexedAccess.ts, 594, 1)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 596, 21)) ->dynamicField : Symbol(dynamicField, Decl(keyofAndIndexedAccess.ts, 596, 46)) ->dynamicField : Symbol(dynamicField, Decl(keyofAndIndexedAccess.ts, 596, 73)) ->DBBoolTable : Symbol(DBBoolTable, Decl(keyofAndIndexedAccess.ts, 581, 70)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 596, 21)) +>DynamicDBRecord : Symbol(DynamicDBRecord, Decl(keyofAndIndexedAccess.ts, 593, 1)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 595, 21)) +>dynamicField : Symbol(dynamicField, Decl(keyofAndIndexedAccess.ts, 595, 46)) +>dynamicField : Symbol(dynamicField, Decl(keyofAndIndexedAccess.ts, 595, 73)) +>DBBoolTable : Symbol(DBBoolTable, Decl(keyofAndIndexedAccess.ts, 580, 70)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 595, 21)) function getFlagsFromDynamicRecord(record: DynamicDBRecord, flags: Flag[]) { ->getFlagsFromDynamicRecord : Symbol(getFlagsFromDynamicRecord, Decl(keyofAndIndexedAccess.ts, 596, 117)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 597, 35)) ->record : Symbol(record, Decl(keyofAndIndexedAccess.ts, 597, 56)) ->DynamicDBRecord : Symbol(DynamicDBRecord, Decl(keyofAndIndexedAccess.ts, 594, 1)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 597, 35)) ->flags : Symbol(flags, Decl(keyofAndIndexedAccess.ts, 597, 86)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 597, 35)) +>getFlagsFromDynamicRecord : Symbol(getFlagsFromDynamicRecord, Decl(keyofAndIndexedAccess.ts, 595, 117)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 596, 35)) +>record : Symbol(record, Decl(keyofAndIndexedAccess.ts, 596, 56)) +>DynamicDBRecord : Symbol(DynamicDBRecord, Decl(keyofAndIndexedAccess.ts, 593, 1)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 596, 35)) +>flags : Symbol(flags, Decl(keyofAndIndexedAccess.ts, 596, 86)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 596, 35)) return record[flags[0]]; ->record : Symbol(record, Decl(keyofAndIndexedAccess.ts, 597, 56)) ->flags : Symbol(flags, Decl(keyofAndIndexedAccess.ts, 597, 86)) +>record : Symbol(record, Decl(keyofAndIndexedAccess.ts, 596, 56)) +>flags : Symbol(flags, Decl(keyofAndIndexedAccess.ts, 596, 86)) } // Repro from #21368 interface I { ->I : Symbol(I, Decl(keyofAndIndexedAccess.ts, 599, 1)) +>I : Symbol(I, Decl(keyofAndIndexedAccess.ts, 598, 1)) foo: string; ->foo : Symbol(I.foo, Decl(keyofAndIndexedAccess.ts, 603, 13)) +>foo : Symbol(I.foo, Decl(keyofAndIndexedAccess.ts, 602, 13)) } declare function take(p: T): void; ->take : Symbol(take, Decl(keyofAndIndexedAccess.ts, 605, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 607, 22)) ->p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 607, 25)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 607, 22)) +>take : Symbol(take, Decl(keyofAndIndexedAccess.ts, 604, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 606, 22)) +>p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 606, 25)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 606, 22)) function fn(o: T, k: K) { ->fn : Symbol(fn, Decl(keyofAndIndexedAccess.ts, 607, 37)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 609, 12)) ->I : Symbol(I, Decl(keyofAndIndexedAccess.ts, 599, 1)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 609, 24)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 609, 12)) ->o : Symbol(o, Decl(keyofAndIndexedAccess.ts, 609, 44)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 609, 12)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 609, 49)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 609, 24)) +>fn : Symbol(fn, Decl(keyofAndIndexedAccess.ts, 606, 37)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 608, 12)) +>I : Symbol(I, Decl(keyofAndIndexedAccess.ts, 598, 1)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 608, 24)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 608, 12)) +>o : Symbol(o, Decl(keyofAndIndexedAccess.ts, 608, 44)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 608, 12)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 608, 49)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 608, 24)) take<{} | null | undefined>(o[k]); ->take : Symbol(take, Decl(keyofAndIndexedAccess.ts, 605, 1)) ->o : Symbol(o, Decl(keyofAndIndexedAccess.ts, 609, 44)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 609, 49)) +>take : Symbol(take, Decl(keyofAndIndexedAccess.ts, 604, 1)) +>o : Symbol(o, Decl(keyofAndIndexedAccess.ts, 608, 44)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 608, 49)) take(o[k]); ->take : Symbol(take, Decl(keyofAndIndexedAccess.ts, 605, 1)) ->o : Symbol(o, Decl(keyofAndIndexedAccess.ts, 609, 44)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 609, 49)) +>take : Symbol(take, Decl(keyofAndIndexedAccess.ts, 604, 1)) +>o : Symbol(o, Decl(keyofAndIndexedAccess.ts, 608, 44)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 608, 49)) } // Repro from #23133 class Unbounded { ->Unbounded : Symbol(Unbounded, Decl(keyofAndIndexedAccess.ts, 612, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 616, 16)) +>Unbounded : Symbol(Unbounded, Decl(keyofAndIndexedAccess.ts, 611, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 615, 16)) foo(x: T[keyof T]) { ->foo : Symbol(Unbounded.foo, Decl(keyofAndIndexedAccess.ts, 616, 20)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 617, 8)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 616, 16)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 616, 16)) +>foo : Symbol(Unbounded.foo, Decl(keyofAndIndexedAccess.ts, 615, 20)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 616, 8)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 615, 16)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 615, 16)) let y: {} | undefined | null = x; ->y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 618, 11)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 617, 8)) +>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 617, 11)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 616, 8)) } } // Repro from #23940 interface I7 { ->I7 : Symbol(I7, Decl(keyofAndIndexedAccess.ts, 620, 1)) +>I7 : Symbol(I7, Decl(keyofAndIndexedAccess.ts, 619, 1)) x: any; ->x : Symbol(I7.x, Decl(keyofAndIndexedAccess.ts, 624, 14)) +>x : Symbol(I7.x, Decl(keyofAndIndexedAccess.ts, 623, 14)) } type Foo7 = T; ->Foo7 : Symbol(Foo7, Decl(keyofAndIndexedAccess.ts, 626, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 627, 10)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 627, 10)) +>Foo7 : Symbol(Foo7, Decl(keyofAndIndexedAccess.ts, 625, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 626, 10)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 626, 10)) declare function f7(type: K): Foo7; ->f7 : Symbol(f7, Decl(keyofAndIndexedAccess.ts, 627, 32)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 628, 20)) ->I7 : Symbol(I7, Decl(keyofAndIndexedAccess.ts, 620, 1)) ->type : Symbol(type, Decl(keyofAndIndexedAccess.ts, 628, 40)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 628, 20)) ->Foo7 : Symbol(Foo7, Decl(keyofAndIndexedAccess.ts, 626, 1)) ->I7 : Symbol(I7, Decl(keyofAndIndexedAccess.ts, 620, 1)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 628, 20)) +>f7 : Symbol(f7, Decl(keyofAndIndexedAccess.ts, 626, 32)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 627, 20)) +>I7 : Symbol(I7, Decl(keyofAndIndexedAccess.ts, 619, 1)) +>type : Symbol(type, Decl(keyofAndIndexedAccess.ts, 627, 40)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 627, 20)) +>Foo7 : Symbol(Foo7, Decl(keyofAndIndexedAccess.ts, 625, 1)) +>I7 : Symbol(I7, Decl(keyofAndIndexedAccess.ts, 619, 1)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 627, 20)) // Repro from #21770 type Dict = { [key in T]: number }; ->Dict : Symbol(Dict, Decl(keyofAndIndexedAccess.ts, 628, 62)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 632, 10)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 632, 33)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 632, 10)) +>Dict : Symbol(Dict, Decl(keyofAndIndexedAccess.ts, 627, 62)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 631, 10)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 631, 33)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 631, 10)) type DictDict = { [key in V]: Dict }; ->DictDict : Symbol(DictDict, Decl(keyofAndIndexedAccess.ts, 632, 53)) ->V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 633, 14)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 633, 31)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 633, 55)) ->V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 633, 14)) ->Dict : Symbol(Dict, Decl(keyofAndIndexedAccess.ts, 628, 62)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 633, 31)) +>DictDict : Symbol(DictDict, Decl(keyofAndIndexedAccess.ts, 631, 53)) +>V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 632, 14)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 632, 31)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 632, 55)) +>V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 632, 14)) +>Dict : Symbol(Dict, Decl(keyofAndIndexedAccess.ts, 627, 62)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 632, 31)) function ff1(dd: DictDict, k1: V, k2: T): number { ->ff1 : Symbol(ff1, Decl(keyofAndIndexedAccess.ts, 633, 76)) ->V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 635, 13)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 635, 30)) ->dd : Symbol(dd, Decl(keyofAndIndexedAccess.ts, 635, 49)) ->DictDict : Symbol(DictDict, Decl(keyofAndIndexedAccess.ts, 632, 53)) ->V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 635, 13)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 635, 30)) ->k1 : Symbol(k1, Decl(keyofAndIndexedAccess.ts, 635, 68)) ->V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 635, 13)) ->k2 : Symbol(k2, Decl(keyofAndIndexedAccess.ts, 635, 75)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 635, 30)) +>ff1 : Symbol(ff1, Decl(keyofAndIndexedAccess.ts, 632, 76)) +>V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 634, 13)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 634, 30)) +>dd : Symbol(dd, Decl(keyofAndIndexedAccess.ts, 634, 49)) +>DictDict : Symbol(DictDict, Decl(keyofAndIndexedAccess.ts, 631, 53)) +>V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 634, 13)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 634, 30)) +>k1 : Symbol(k1, Decl(keyofAndIndexedAccess.ts, 634, 68)) +>V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 634, 13)) +>k2 : Symbol(k2, Decl(keyofAndIndexedAccess.ts, 634, 75)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 634, 30)) return dd[k1][k2]; ->dd : Symbol(dd, Decl(keyofAndIndexedAccess.ts, 635, 49)) ->k1 : Symbol(k1, Decl(keyofAndIndexedAccess.ts, 635, 68)) ->k2 : Symbol(k2, Decl(keyofAndIndexedAccess.ts, 635, 75)) +>dd : Symbol(dd, Decl(keyofAndIndexedAccess.ts, 634, 49)) +>k1 : Symbol(k1, Decl(keyofAndIndexedAccess.ts, 634, 68)) +>k2 : Symbol(k2, Decl(keyofAndIndexedAccess.ts, 634, 75)) } function ff2(dd: DictDict, k1: V, k2: T): number { ->ff2 : Symbol(ff2, Decl(keyofAndIndexedAccess.ts, 637, 1)) ->V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 639, 13)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 639, 30)) ->dd : Symbol(dd, Decl(keyofAndIndexedAccess.ts, 639, 49)) ->DictDict : Symbol(DictDict, Decl(keyofAndIndexedAccess.ts, 632, 53)) ->V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 639, 13)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 639, 30)) ->k1 : Symbol(k1, Decl(keyofAndIndexedAccess.ts, 639, 68)) ->V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 639, 13)) ->k2 : Symbol(k2, Decl(keyofAndIndexedAccess.ts, 639, 75)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 639, 30)) +>ff2 : Symbol(ff2, Decl(keyofAndIndexedAccess.ts, 636, 1)) +>V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 638, 13)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 638, 30)) +>dd : Symbol(dd, Decl(keyofAndIndexedAccess.ts, 638, 49)) +>DictDict : Symbol(DictDict, Decl(keyofAndIndexedAccess.ts, 631, 53)) +>V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 638, 13)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 638, 30)) +>k1 : Symbol(k1, Decl(keyofAndIndexedAccess.ts, 638, 68)) +>V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 638, 13)) +>k2 : Symbol(k2, Decl(keyofAndIndexedAccess.ts, 638, 75)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 638, 30)) const d: Dict = dd[k1]; ->d : Symbol(d, Decl(keyofAndIndexedAccess.ts, 640, 9)) ->Dict : Symbol(Dict, Decl(keyofAndIndexedAccess.ts, 628, 62)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 639, 30)) ->dd : Symbol(dd, Decl(keyofAndIndexedAccess.ts, 639, 49)) ->k1 : Symbol(k1, Decl(keyofAndIndexedAccess.ts, 639, 68)) +>d : Symbol(d, Decl(keyofAndIndexedAccess.ts, 639, 9)) +>Dict : Symbol(Dict, Decl(keyofAndIndexedAccess.ts, 627, 62)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 638, 30)) +>dd : Symbol(dd, Decl(keyofAndIndexedAccess.ts, 638, 49)) +>k1 : Symbol(k1, Decl(keyofAndIndexedAccess.ts, 638, 68)) return d[k2]; ->d : Symbol(d, Decl(keyofAndIndexedAccess.ts, 640, 9)) ->k2 : Symbol(k2, Decl(keyofAndIndexedAccess.ts, 639, 75)) +>d : Symbol(d, Decl(keyofAndIndexedAccess.ts, 639, 9)) +>k2 : Symbol(k2, Decl(keyofAndIndexedAccess.ts, 638, 75)) } // Repro from #26409 const cf1 = (t: T, k: K) => ->cf1 : Symbol(cf1, Decl(keyofAndIndexedAccess.ts, 646, 5)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 646, 13)) ->P : Symbol(P, Decl(keyofAndIndexedAccess.ts, 646, 26)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 646, 65)) ->cool : Symbol(cool, Decl(keyofAndIndexedAccess.ts, 646, 48)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 646, 65)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 646, 13)) ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 646, 85)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 646, 13)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 646, 90)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 646, 65)) +>cf1 : Symbol(cf1, Decl(keyofAndIndexedAccess.ts, 645, 5)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 645, 13)) +>P : Symbol(P, Decl(keyofAndIndexedAccess.ts, 645, 26)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 645, 65)) +>cool : Symbol(cool, Decl(keyofAndIndexedAccess.ts, 645, 48)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 645, 65)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 645, 13)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 645, 85)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 645, 13)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 645, 90)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 645, 65)) { const s: string = t[k]; ->s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 648, 9)) ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 646, 85)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 646, 90)) +>s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 647, 9)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 645, 85)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 645, 90)) t.cool; ->t.cool : Symbol(cool, Decl(keyofAndIndexedAccess.ts, 646, 48)) ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 646, 85)) ->cool : Symbol(cool, Decl(keyofAndIndexedAccess.ts, 646, 48)) +>t.cool : Symbol(cool, Decl(keyofAndIndexedAccess.ts, 645, 48)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 645, 85)) +>cool : Symbol(cool, Decl(keyofAndIndexedAccess.ts, 645, 48)) }; const cf2 = (t: T, k: K) => ->cf2 : Symbol(cf2, Decl(keyofAndIndexedAccess.ts, 652, 5)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 652, 13)) ->P : Symbol(P, Decl(keyofAndIndexedAccess.ts, 652, 26)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 652, 54)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 652, 54)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 652, 13)) ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 652, 74)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 652, 13)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 652, 79)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 652, 54)) +>cf2 : Symbol(cf2, Decl(keyofAndIndexedAccess.ts, 651, 5)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 651, 13)) +>P : Symbol(P, Decl(keyofAndIndexedAccess.ts, 651, 26)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 651, 54)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 651, 54)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 651, 13)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 651, 74)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 651, 13)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 651, 79)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 651, 54)) { const s: string = t[k]; ->s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 654, 9)) ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 652, 74)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 652, 79)) +>s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 653, 9)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 651, 74)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 651, 79)) t.cool; >t.cool : Symbol(cool) ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 652, 74)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 651, 74)) >cool : Symbol(cool) }; diff --git a/tests/baselines/reference/keyofAndIndexedAccess.types b/tests/baselines/reference/keyofAndIndexedAccess.types index 025ecc7a41e..9a14549db4f 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.types +++ b/tests/baselines/reference/keyofAndIndexedAccess.types @@ -145,7 +145,7 @@ type Q30 = [string, number][0]; // string type Q31 = [string, number][1]; // number >Q31 : number -type Q32 = [string, number][2]; // string | number +type Q32 = [string, number][number]; // string | number >Q32 : string | number type Q33 = [string, number][E.A]; // string @@ -156,15 +156,11 @@ type Q34 = [string, number][E.B]; // number >Q34 : number >E : any -type Q35 = [string, number][E.C]; // string | number ->Q35 : string | number ->E : any +type Q35 = [string, number]["0"]; // string +>Q35 : string -type Q36 = [string, number]["0"]; // string ->Q36 : string - -type Q37 = [string, number]["1"]; // string ->Q37 : number +type Q36 = [string, number]["1"]; // string +>Q36 : number type Q40 = (Shape | Options)["visible"]; // boolean | "yes" | "no" >Q40 : boolean | "yes" | "no" diff --git a/tests/baselines/reference/literalTypesAndTypeAssertions.types b/tests/baselines/reference/literalTypesAndTypeAssertions.types index 1730c0ac420..be204673ad3 100644 --- a/tests/baselines/reference/literalTypesAndTypeAssertions.types +++ b/tests/baselines/reference/literalTypesAndTypeAssertions.types @@ -44,7 +44,7 @@ let { b = "foo" as "foo" } = { b: "bar" }; >"bar" : "bar" let { c = "foo" } = { c: "bar" as "bar" }; ->c : "foo" | "bar" +>c : string >"foo" : "foo" >{ c: "bar" as "bar" } : { c?: "bar"; } >c : "bar" diff --git a/tests/baselines/reference/tupleLengthCheck.errors.txt b/tests/baselines/reference/tupleLengthCheck.errors.txt index f90adbf3525..1c6fe909135 100644 --- a/tests/baselines/reference/tupleLengthCheck.errors.txt +++ b/tests/baselines/reference/tupleLengthCheck.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/types/tuple/tupleLengthCheck.ts(5,14): error TS2733: Index '2' is out-of-bounds in tuple of length 2. -tests/cases/conformance/types/tuple/tupleLengthCheck.ts(6,14): error TS2733: Index '1000' is out-of-bounds in tuple of length 2. +tests/cases/conformance/types/tuple/tupleLengthCheck.ts(5,14): error TS2339: Property '2' does not exist on type '[number, string]'. +tests/cases/conformance/types/tuple/tupleLengthCheck.ts(6,14): error TS2339: Property '1000' does not exist on type '[number, string]'. ==== tests/cases/conformance/types/tuple/tupleLengthCheck.ts (2 errors) ==== @@ -9,10 +9,10 @@ tests/cases/conformance/types/tuple/tupleLengthCheck.ts(6,14): error TS2733: Ind const a1 = a[1] const a2 = a[2] ~ -!!! error TS2733: Index '2' is out-of-bounds in tuple of length 2. +!!! error TS2339: Property '2' does not exist on type '[number, string]'. const a3 = a[1000] ~~~~ -!!! error TS2733: Index '1000' is out-of-bounds in tuple of length 2. +!!! error TS2339: Property '1000' does not exist on type '[number, string]'. const a4 = rest[1] const a5 = rest[2] diff --git a/tests/baselines/reference/tupleLengthCheck.types b/tests/baselines/reference/tupleLengthCheck.types index be4372c669c..67ccb006a81 100644 --- a/tests/baselines/reference/tupleLengthCheck.types +++ b/tests/baselines/reference/tupleLengthCheck.types @@ -12,14 +12,14 @@ const a1 = a[1] >1 : 1 const a2 = a[2] ->a2 : string | number ->a[2] : string | number +>a2 : undefined +>a[2] : undefined >a : [number, string] >2 : 2 const a3 = a[1000] ->a3 : string | number ->a[1000] : string | number +>a3 : undefined +>a[1000] : undefined >a : [number, string] >1000 : 1000 diff --git a/tests/baselines/reference/tupleTypes.errors.txt b/tests/baselines/reference/tupleTypes.errors.txt index 4543eb202da..95daf5ce0ef 100644 --- a/tests/baselines/reference/tupleTypes.errors.txt +++ b/tests/baselines/reference/tupleTypes.errors.txt @@ -1,4 +1,5 @@ -tests/cases/compiler/tupleTypes.ts(11,12): error TS2733: Index '2' is out-of-bounds in tuple of length 2. +tests/cases/compiler/tupleTypes.ts(11,12): error TS2339: Property '2' does not exist on type '[number, string]'. +tests/cases/compiler/tupleTypes.ts(12,5): error TS2403: Subsequent variable declarations must have the same type. Variable 't2' must be of type 'undefined', but here has type 'string | number'. tests/cases/compiler/tupleTypes.ts(14,1): error TS2322: Type '[]' is not assignable to type '[number, string]'. Property '0' is missing in type '[]'. tests/cases/compiler/tupleTypes.ts(15,1): error TS2322: Type '[number]' is not assignable to type '[number, string]'. @@ -8,7 +9,8 @@ tests/cases/compiler/tupleTypes.ts(17,15): error TS2322: Type 'number' is not as tests/cases/compiler/tupleTypes.ts(18,1): error TS2322: Type '[number, string, number]' is not assignable to type '[number, string]'. Types of property 'length' are incompatible. Type '3' is not assignable to type '2'. -tests/cases/compiler/tupleTypes.ts(35,14): error TS2733: Index '2' is out-of-bounds in tuple of length 2. +tests/cases/compiler/tupleTypes.ts(35,14): error TS2339: Property '2' does not exist on type '[number, string]'. +tests/cases/compiler/tupleTypes.ts(36,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'tt2' must be of type 'undefined', but here has type 'string | number'. tests/cases/compiler/tupleTypes.ts(41,1): error TS2322: Type '[]' is not assignable to type '[number, string]'. tests/cases/compiler/tupleTypes.ts(47,1): error TS2322: Type '[number, string]' is not assignable to type 'number[]'. Type 'string | number' is not assignable to type 'number'. @@ -22,7 +24,7 @@ tests/cases/compiler/tupleTypes.ts(51,1): error TS2322: Type '[number, {}]' is n Type '{}' is not assignable to type 'string'. -==== tests/cases/compiler/tupleTypes.ts (12 errors) ==== +==== tests/cases/compiler/tupleTypes.ts (14 errors) ==== var v1: []; // Error var v2: [number]; var v3: [number, string]; @@ -35,8 +37,10 @@ tests/cases/compiler/tupleTypes.ts(51,1): error TS2322: Type '[number, {}]' is n var t1: string; var t2 = t[2]; // number|string ~ -!!! error TS2733: Index '2' is out-of-bounds in tuple of length 2. +!!! error TS2339: Property '2' does not exist on type '[number, string]'. var t2: number|string; + ~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 't2' must be of type 'undefined', but here has type 'string | number'. t = []; // Error ~ @@ -75,8 +79,10 @@ tests/cases/compiler/tupleTypes.ts(51,1): error TS2322: Type '[number, {}]' is n var tt1: string; var tt2 = tt[2]; ~ -!!! error TS2733: Index '2' is out-of-bounds in tuple of length 2. +!!! error TS2339: Property '2' does not exist on type '[number, string]'. var tt2: number | string; + ~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'tt2' must be of type 'undefined', but here has type 'string | number'. tt = tuple2(1, undefined); tt = [1, undefined]; diff --git a/tests/baselines/reference/tupleTypes.types b/tests/baselines/reference/tupleTypes.types index 45fec41112c..12eaf588b98 100644 --- a/tests/baselines/reference/tupleTypes.types +++ b/tests/baselines/reference/tupleTypes.types @@ -33,13 +33,13 @@ var t1: string; >t1 : string var t2 = t[2]; // number|string ->t2 : string | number ->t[2] : string | number +>t2 : undefined +>t[2] : undefined >t : [number, string] >2 : 2 var t2: number|string; ->t2 : string | number +>t2 : undefined t = []; // Error >t = [] : [] @@ -144,13 +144,13 @@ var tt1: string; >tt1 : string var tt2 = tt[2]; ->tt2 : string | number ->tt[2] : string | number +>tt2 : undefined +>tt[2] : undefined >tt : [number, string] >2 : 2 var tt2: number | string; ->tt2 : string | number +>tt2 : undefined tt = tuple2(1, undefined); >tt = tuple2(1, undefined) : [number, any] diff --git a/tests/baselines/reference/unionsOfTupleTypes1.errors.txt b/tests/baselines/reference/unionsOfTupleTypes1.errors.txt new file mode 100644 index 00000000000..d9cad5f1b11 --- /dev/null +++ b/tests/baselines/reference/unionsOfTupleTypes1.errors.txt @@ -0,0 +1,90 @@ +tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts(8,15): error TS2339: Property '2' does not exist on type '[string, number]'. +tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts(13,15): error TS2339: Property '2' does not exist on type 'T2'. +tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts(27,20): error TS2493: Tuple type '[string, number]' with length '2' cannot be assigned to tuple with length '3'. +tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts(28,20): error TS2460: Type 'T2' has no property '2'. +tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts(31,16): error TS2493: Tuple type '[string, number]' with length '2' cannot be assigned to tuple with length '3'. +tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts(32,16): error TS2460: Type 'T2' has no property '2'. +tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts(37,18): error TS2339: Property '2' does not exist on type '[string, number]'. +tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts(41,18): error TS2339: Property '2' does not exist on type 'T2'. + + +==== tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts (8 errors) ==== + type T1 = [string, number]; + type T2 = [boolean] | [string, number]; + type T3 = [string, ...number[]]; + type T4 = [boolean] | [string, ...number[]]; + + type T10 = T1[0]; // string + type T11 = T1[1]; // number + type T12 = T1[2]; // undefined + ~ +!!! error TS2339: Property '2' does not exist on type '[string, number]'. + type T1N = T1[number]; // string | number + + type T20 = T2[0]; // string | boolean + type T21 = T2[1]; // number | undefined + type T22 = T2[2]; // undefined + ~ +!!! error TS2339: Property '2' does not exist on type 'T2'. + type T2N = T2[number]; // string | number | boolean + + type T30 = T3[0]; // string + type T31 = T3[1]; // number + type T32 = T3[2]; // number + type T3N = T3[number]; // string | number + + type T40 = T4[0]; // string | boolean + type T41 = T4[1]; // number | undefined + type T42 = T4[2]; // number | undefined + type T4N = T4[number]; // string | number | boolean + + function f1(t1: T1, t2: T2, t3: T3, t4: T4, x: number) { + let [d10, d11, d12] = t1; // string, number + ~~~ +!!! error TS2493: Tuple type '[string, number]' with length '2' cannot be assigned to tuple with length '3'. + let [d20, d21, d22] = t2; // string | boolean, number | undefined + ~~~ +!!! error TS2460: Type 'T2' has no property '2'. + let [d30, d31, d32] = t3; // string, number, number + let [d40, d41, d42] = t4; // string | boolean, number | undefined, number | undefined + [d10, d11, d12] = t1; + ~~~ +!!! error TS2493: Tuple type '[string, number]' with length '2' cannot be assigned to tuple with length '3'. + [d20, d21, d22] = t2; + ~~~ +!!! error TS2460: Type 'T2' has no property '2'. + [d30, d31, d32] = t3; + [d40, d41, d42] = t4; + let t10 = t1[0]; // string + let t11 = t1[1]; // number + let t12 = t1[2]; // undefined + ~ +!!! error TS2339: Property '2' does not exist on type '[string, number]'. + let t1x = t1[x]; // string | number + let t20 = t2[0]; // string | boolean + let t21 = t2[1]; // number | undefined + let t22 = t2[2]; // undefined + ~ +!!! error TS2339: Property '2' does not exist on type 'T2'. + let t2x = t2[x]; // string | number | boolean + let t30 = t3[0]; // string + let t31 = t3[1]; // number + let t32 = t3[2]; // number + let t3x = t3[x]; // string | number + let t40 = t4[0]; // string | boolean + let t41 = t4[1]; // number | undefined + let t42 = t4[2]; // number | undefined + let t4x = t4[x]; // string | number | boolean + t1[1] = 42; + t2[1] = 42; + t3[1] = 42; + t4[1] = 42; + } + + // Repro from #27543 + + type Unioned = [string] | [string, number]; + const ex: Unioned = ["hi"] as Unioned; + + const [x, y] = ex; + \ No newline at end of file diff --git a/tests/baselines/reference/unionsOfTupleTypes1.js b/tests/baselines/reference/unionsOfTupleTypes1.js new file mode 100644 index 00000000000..de21e1153d0 --- /dev/null +++ b/tests/baselines/reference/unionsOfTupleTypes1.js @@ -0,0 +1,99 @@ +//// [unionsOfTupleTypes1.ts] +type T1 = [string, number]; +type T2 = [boolean] | [string, number]; +type T3 = [string, ...number[]]; +type T4 = [boolean] | [string, ...number[]]; + +type T10 = T1[0]; // string +type T11 = T1[1]; // number +type T12 = T1[2]; // undefined +type T1N = T1[number]; // string | number + +type T20 = T2[0]; // string | boolean +type T21 = T2[1]; // number | undefined +type T22 = T2[2]; // undefined +type T2N = T2[number]; // string | number | boolean + +type T30 = T3[0]; // string +type T31 = T3[1]; // number +type T32 = T3[2]; // number +type T3N = T3[number]; // string | number + +type T40 = T4[0]; // string | boolean +type T41 = T4[1]; // number | undefined +type T42 = T4[2]; // number | undefined +type T4N = T4[number]; // string | number | boolean + +function f1(t1: T1, t2: T2, t3: T3, t4: T4, x: number) { + let [d10, d11, d12] = t1; // string, number + let [d20, d21, d22] = t2; // string | boolean, number | undefined + let [d30, d31, d32] = t3; // string, number, number + let [d40, d41, d42] = t4; // string | boolean, number | undefined, number | undefined + [d10, d11, d12] = t1; + [d20, d21, d22] = t2; + [d30, d31, d32] = t3; + [d40, d41, d42] = t4; + let t10 = t1[0]; // string + let t11 = t1[1]; // number + let t12 = t1[2]; // undefined + let t1x = t1[x]; // string | number + let t20 = t2[0]; // string | boolean + let t21 = t2[1]; // number | undefined + let t22 = t2[2]; // undefined + let t2x = t2[x]; // string | number | boolean + let t30 = t3[0]; // string + let t31 = t3[1]; // number + let t32 = t3[2]; // number + let t3x = t3[x]; // string | number + let t40 = t4[0]; // string | boolean + let t41 = t4[1]; // number | undefined + let t42 = t4[2]; // number | undefined + let t4x = t4[x]; // string | number | boolean + t1[1] = 42; + t2[1] = 42; + t3[1] = 42; + t4[1] = 42; +} + +// Repro from #27543 + +type Unioned = [string] | [string, number]; +const ex: Unioned = ["hi"] as Unioned; + +const [x, y] = ex; + + +//// [unionsOfTupleTypes1.js] +"use strict"; +function f1(t1, t2, t3, t4, x) { + var d10 = t1[0], d11 = t1[1], d12 = t1[2]; // string, number + var d20 = t2[0], d21 = t2[1], d22 = t2[2]; // string | boolean, number | undefined + var d30 = t3[0], d31 = t3[1], d32 = t3[2]; // string, number, number + var d40 = t4[0], d41 = t4[1], d42 = t4[2]; // string | boolean, number | undefined, number | undefined + d10 = t1[0], d11 = t1[1], d12 = t1[2]; + d20 = t2[0], d21 = t2[1], d22 = t2[2]; + d30 = t3[0], d31 = t3[1], d32 = t3[2]; + d40 = t4[0], d41 = t4[1], d42 = t4[2]; + var t10 = t1[0]; // string + var t11 = t1[1]; // number + var t12 = t1[2]; // undefined + var t1x = t1[x]; // string | number + var t20 = t2[0]; // string | boolean + var t21 = t2[1]; // number | undefined + var t22 = t2[2]; // undefined + var t2x = t2[x]; // string | number | boolean + var t30 = t3[0]; // string + var t31 = t3[1]; // number + var t32 = t3[2]; // number + var t3x = t3[x]; // string | number + var t40 = t4[0]; // string | boolean + var t41 = t4[1]; // number | undefined + var t42 = t4[2]; // number | undefined + var t4x = t4[x]; // string | number | boolean + t1[1] = 42; + t2[1] = 42; + t3[1] = 42; + t4[1] = 42; +} +var ex = ["hi"]; +var x = ex[0], y = ex[1]; diff --git a/tests/baselines/reference/unionsOfTupleTypes1.symbols b/tests/baselines/reference/unionsOfTupleTypes1.symbols new file mode 100644 index 00000000000..8d9b9185e54 --- /dev/null +++ b/tests/baselines/reference/unionsOfTupleTypes1.symbols @@ -0,0 +1,241 @@ +=== tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts === +type T1 = [string, number]; +>T1 : Symbol(T1, Decl(unionsOfTupleTypes1.ts, 0, 0)) + +type T2 = [boolean] | [string, number]; +>T2 : Symbol(T2, Decl(unionsOfTupleTypes1.ts, 0, 27)) + +type T3 = [string, ...number[]]; +>T3 : Symbol(T3, Decl(unionsOfTupleTypes1.ts, 1, 39)) + +type T4 = [boolean] | [string, ...number[]]; +>T4 : Symbol(T4, Decl(unionsOfTupleTypes1.ts, 2, 32)) + +type T10 = T1[0]; // string +>T10 : Symbol(T10, Decl(unionsOfTupleTypes1.ts, 3, 44)) +>T1 : Symbol(T1, Decl(unionsOfTupleTypes1.ts, 0, 0)) + +type T11 = T1[1]; // number +>T11 : Symbol(T11, Decl(unionsOfTupleTypes1.ts, 5, 17)) +>T1 : Symbol(T1, Decl(unionsOfTupleTypes1.ts, 0, 0)) + +type T12 = T1[2]; // undefined +>T12 : Symbol(T12, Decl(unionsOfTupleTypes1.ts, 6, 17)) +>T1 : Symbol(T1, Decl(unionsOfTupleTypes1.ts, 0, 0)) + +type T1N = T1[number]; // string | number +>T1N : Symbol(T1N, Decl(unionsOfTupleTypes1.ts, 7, 17)) +>T1 : Symbol(T1, Decl(unionsOfTupleTypes1.ts, 0, 0)) + +type T20 = T2[0]; // string | boolean +>T20 : Symbol(T20, Decl(unionsOfTupleTypes1.ts, 8, 22)) +>T2 : Symbol(T2, Decl(unionsOfTupleTypes1.ts, 0, 27)) + +type T21 = T2[1]; // number | undefined +>T21 : Symbol(T21, Decl(unionsOfTupleTypes1.ts, 10, 17)) +>T2 : Symbol(T2, Decl(unionsOfTupleTypes1.ts, 0, 27)) + +type T22 = T2[2]; // undefined +>T22 : Symbol(T22, Decl(unionsOfTupleTypes1.ts, 11, 17)) +>T2 : Symbol(T2, Decl(unionsOfTupleTypes1.ts, 0, 27)) + +type T2N = T2[number]; // string | number | boolean +>T2N : Symbol(T2N, Decl(unionsOfTupleTypes1.ts, 12, 17)) +>T2 : Symbol(T2, Decl(unionsOfTupleTypes1.ts, 0, 27)) + +type T30 = T3[0]; // string +>T30 : Symbol(T30, Decl(unionsOfTupleTypes1.ts, 13, 22)) +>T3 : Symbol(T3, Decl(unionsOfTupleTypes1.ts, 1, 39)) + +type T31 = T3[1]; // number +>T31 : Symbol(T31, Decl(unionsOfTupleTypes1.ts, 15, 17)) +>T3 : Symbol(T3, Decl(unionsOfTupleTypes1.ts, 1, 39)) + +type T32 = T3[2]; // number +>T32 : Symbol(T32, Decl(unionsOfTupleTypes1.ts, 16, 17)) +>T3 : Symbol(T3, Decl(unionsOfTupleTypes1.ts, 1, 39)) + +type T3N = T3[number]; // string | number +>T3N : Symbol(T3N, Decl(unionsOfTupleTypes1.ts, 17, 17)) +>T3 : Symbol(T3, Decl(unionsOfTupleTypes1.ts, 1, 39)) + +type T40 = T4[0]; // string | boolean +>T40 : Symbol(T40, Decl(unionsOfTupleTypes1.ts, 18, 22)) +>T4 : Symbol(T4, Decl(unionsOfTupleTypes1.ts, 2, 32)) + +type T41 = T4[1]; // number | undefined +>T41 : Symbol(T41, Decl(unionsOfTupleTypes1.ts, 20, 17)) +>T4 : Symbol(T4, Decl(unionsOfTupleTypes1.ts, 2, 32)) + +type T42 = T4[2]; // number | undefined +>T42 : Symbol(T42, Decl(unionsOfTupleTypes1.ts, 21, 17)) +>T4 : Symbol(T4, Decl(unionsOfTupleTypes1.ts, 2, 32)) + +type T4N = T4[number]; // string | number | boolean +>T4N : Symbol(T4N, Decl(unionsOfTupleTypes1.ts, 22, 17)) +>T4 : Symbol(T4, Decl(unionsOfTupleTypes1.ts, 2, 32)) + +function f1(t1: T1, t2: T2, t3: T3, t4: T4, x: number) { +>f1 : Symbol(f1, Decl(unionsOfTupleTypes1.ts, 23, 22)) +>t1 : Symbol(t1, Decl(unionsOfTupleTypes1.ts, 25, 12)) +>T1 : Symbol(T1, Decl(unionsOfTupleTypes1.ts, 0, 0)) +>t2 : Symbol(t2, Decl(unionsOfTupleTypes1.ts, 25, 19)) +>T2 : Symbol(T2, Decl(unionsOfTupleTypes1.ts, 0, 27)) +>t3 : Symbol(t3, Decl(unionsOfTupleTypes1.ts, 25, 27)) +>T3 : Symbol(T3, Decl(unionsOfTupleTypes1.ts, 1, 39)) +>t4 : Symbol(t4, Decl(unionsOfTupleTypes1.ts, 25, 35)) +>T4 : Symbol(T4, Decl(unionsOfTupleTypes1.ts, 2, 32)) +>x : Symbol(x, Decl(unionsOfTupleTypes1.ts, 25, 43)) + + let [d10, d11, d12] = t1; // string, number +>d10 : Symbol(d10, Decl(unionsOfTupleTypes1.ts, 26, 9)) +>d11 : Symbol(d11, Decl(unionsOfTupleTypes1.ts, 26, 13)) +>d12 : Symbol(d12, Decl(unionsOfTupleTypes1.ts, 26, 18)) +>t1 : Symbol(t1, Decl(unionsOfTupleTypes1.ts, 25, 12)) + + let [d20, d21, d22] = t2; // string | boolean, number | undefined +>d20 : Symbol(d20, Decl(unionsOfTupleTypes1.ts, 27, 9)) +>d21 : Symbol(d21, Decl(unionsOfTupleTypes1.ts, 27, 13)) +>d22 : Symbol(d22, Decl(unionsOfTupleTypes1.ts, 27, 18)) +>t2 : Symbol(t2, Decl(unionsOfTupleTypes1.ts, 25, 19)) + + let [d30, d31, d32] = t3; // string, number, number +>d30 : Symbol(d30, Decl(unionsOfTupleTypes1.ts, 28, 9)) +>d31 : Symbol(d31, Decl(unionsOfTupleTypes1.ts, 28, 13)) +>d32 : Symbol(d32, Decl(unionsOfTupleTypes1.ts, 28, 18)) +>t3 : Symbol(t3, Decl(unionsOfTupleTypes1.ts, 25, 27)) + + let [d40, d41, d42] = t4; // string | boolean, number | undefined, number | undefined +>d40 : Symbol(d40, Decl(unionsOfTupleTypes1.ts, 29, 9)) +>d41 : Symbol(d41, Decl(unionsOfTupleTypes1.ts, 29, 13)) +>d42 : Symbol(d42, Decl(unionsOfTupleTypes1.ts, 29, 18)) +>t4 : Symbol(t4, Decl(unionsOfTupleTypes1.ts, 25, 35)) + + [d10, d11, d12] = t1; +>d10 : Symbol(d10, Decl(unionsOfTupleTypes1.ts, 26, 9)) +>d11 : Symbol(d11, Decl(unionsOfTupleTypes1.ts, 26, 13)) +>d12 : Symbol(d12, Decl(unionsOfTupleTypes1.ts, 26, 18)) +>t1 : Symbol(t1, Decl(unionsOfTupleTypes1.ts, 25, 12)) + + [d20, d21, d22] = t2; +>d20 : Symbol(d20, Decl(unionsOfTupleTypes1.ts, 27, 9)) +>d21 : Symbol(d21, Decl(unionsOfTupleTypes1.ts, 27, 13)) +>d22 : Symbol(d22, Decl(unionsOfTupleTypes1.ts, 27, 18)) +>t2 : Symbol(t2, Decl(unionsOfTupleTypes1.ts, 25, 19)) + + [d30, d31, d32] = t3; +>d30 : Symbol(d30, Decl(unionsOfTupleTypes1.ts, 28, 9)) +>d31 : Symbol(d31, Decl(unionsOfTupleTypes1.ts, 28, 13)) +>d32 : Symbol(d32, Decl(unionsOfTupleTypes1.ts, 28, 18)) +>t3 : Symbol(t3, Decl(unionsOfTupleTypes1.ts, 25, 27)) + + [d40, d41, d42] = t4; +>d40 : Symbol(d40, Decl(unionsOfTupleTypes1.ts, 29, 9)) +>d41 : Symbol(d41, Decl(unionsOfTupleTypes1.ts, 29, 13)) +>d42 : Symbol(d42, Decl(unionsOfTupleTypes1.ts, 29, 18)) +>t4 : Symbol(t4, Decl(unionsOfTupleTypes1.ts, 25, 35)) + + let t10 = t1[0]; // string +>t10 : Symbol(t10, Decl(unionsOfTupleTypes1.ts, 34, 7)) +>t1 : Symbol(t1, Decl(unionsOfTupleTypes1.ts, 25, 12)) +>0 : Symbol(0) + + let t11 = t1[1]; // number +>t11 : Symbol(t11, Decl(unionsOfTupleTypes1.ts, 35, 7)) +>t1 : Symbol(t1, Decl(unionsOfTupleTypes1.ts, 25, 12)) +>1 : Symbol(1) + + let t12 = t1[2]; // undefined +>t12 : Symbol(t12, Decl(unionsOfTupleTypes1.ts, 36, 7)) +>t1 : Symbol(t1, Decl(unionsOfTupleTypes1.ts, 25, 12)) + + let t1x = t1[x]; // string | number +>t1x : Symbol(t1x, Decl(unionsOfTupleTypes1.ts, 37, 7)) +>t1 : Symbol(t1, Decl(unionsOfTupleTypes1.ts, 25, 12)) +>x : Symbol(x, Decl(unionsOfTupleTypes1.ts, 25, 43)) + + let t20 = t2[0]; // string | boolean +>t20 : Symbol(t20, Decl(unionsOfTupleTypes1.ts, 38, 7)) +>t2 : Symbol(t2, Decl(unionsOfTupleTypes1.ts, 25, 19)) +>0 : Symbol(0) + + let t21 = t2[1]; // number | undefined +>t21 : Symbol(t21, Decl(unionsOfTupleTypes1.ts, 39, 7)) +>t2 : Symbol(t2, Decl(unionsOfTupleTypes1.ts, 25, 19)) +>1 : Symbol(1) + + let t22 = t2[2]; // undefined +>t22 : Symbol(t22, Decl(unionsOfTupleTypes1.ts, 40, 7)) +>t2 : Symbol(t2, Decl(unionsOfTupleTypes1.ts, 25, 19)) + + let t2x = t2[x]; // string | number | boolean +>t2x : Symbol(t2x, Decl(unionsOfTupleTypes1.ts, 41, 7)) +>t2 : Symbol(t2, Decl(unionsOfTupleTypes1.ts, 25, 19)) +>x : Symbol(x, Decl(unionsOfTupleTypes1.ts, 25, 43)) + + let t30 = t3[0]; // string +>t30 : Symbol(t30, Decl(unionsOfTupleTypes1.ts, 42, 7)) +>t3 : Symbol(t3, Decl(unionsOfTupleTypes1.ts, 25, 27)) +>0 : Symbol(0) + + let t31 = t3[1]; // number +>t31 : Symbol(t31, Decl(unionsOfTupleTypes1.ts, 43, 7)) +>t3 : Symbol(t3, Decl(unionsOfTupleTypes1.ts, 25, 27)) + + let t32 = t3[2]; // number +>t32 : Symbol(t32, Decl(unionsOfTupleTypes1.ts, 44, 7)) +>t3 : Symbol(t3, Decl(unionsOfTupleTypes1.ts, 25, 27)) + + let t3x = t3[x]; // string | number +>t3x : Symbol(t3x, Decl(unionsOfTupleTypes1.ts, 45, 7)) +>t3 : Symbol(t3, Decl(unionsOfTupleTypes1.ts, 25, 27)) +>x : Symbol(x, Decl(unionsOfTupleTypes1.ts, 25, 43)) + + let t40 = t4[0]; // string | boolean +>t40 : Symbol(t40, Decl(unionsOfTupleTypes1.ts, 46, 7)) +>t4 : Symbol(t4, Decl(unionsOfTupleTypes1.ts, 25, 35)) +>0 : Symbol(0) + + let t41 = t4[1]; // number | undefined +>t41 : Symbol(t41, Decl(unionsOfTupleTypes1.ts, 47, 7)) +>t4 : Symbol(t4, Decl(unionsOfTupleTypes1.ts, 25, 35)) + + let t42 = t4[2]; // number | undefined +>t42 : Symbol(t42, Decl(unionsOfTupleTypes1.ts, 48, 7)) +>t4 : Symbol(t4, Decl(unionsOfTupleTypes1.ts, 25, 35)) + + let t4x = t4[x]; // string | number | boolean +>t4x : Symbol(t4x, Decl(unionsOfTupleTypes1.ts, 49, 7)) +>t4 : Symbol(t4, Decl(unionsOfTupleTypes1.ts, 25, 35)) +>x : Symbol(x, Decl(unionsOfTupleTypes1.ts, 25, 43)) + + t1[1] = 42; +>t1 : Symbol(t1, Decl(unionsOfTupleTypes1.ts, 25, 12)) +>1 : Symbol(1) + + t2[1] = 42; +>t2 : Symbol(t2, Decl(unionsOfTupleTypes1.ts, 25, 19)) +>1 : Symbol(1) + + t3[1] = 42; +>t3 : Symbol(t3, Decl(unionsOfTupleTypes1.ts, 25, 27)) + + t4[1] = 42; +>t4 : Symbol(t4, Decl(unionsOfTupleTypes1.ts, 25, 35)) +} + +// Repro from #27543 + +type Unioned = [string] | [string, number]; +>Unioned : Symbol(Unioned, Decl(unionsOfTupleTypes1.ts, 54, 1)) + +const ex: Unioned = ["hi"] as Unioned; +>ex : Symbol(ex, Decl(unionsOfTupleTypes1.ts, 59, 5)) +>Unioned : Symbol(Unioned, Decl(unionsOfTupleTypes1.ts, 54, 1)) +>Unioned : Symbol(Unioned, Decl(unionsOfTupleTypes1.ts, 54, 1)) + +const [x, y] = ex; +>x : Symbol(x, Decl(unionsOfTupleTypes1.ts, 61, 7)) +>y : Symbol(y, Decl(unionsOfTupleTypes1.ts, 61, 9)) +>ex : Symbol(ex, Decl(unionsOfTupleTypes1.ts, 59, 5)) + diff --git a/tests/baselines/reference/unionsOfTupleTypes1.types b/tests/baselines/reference/unionsOfTupleTypes1.types new file mode 100644 index 00000000000..e44114f5a6a --- /dev/null +++ b/tests/baselines/reference/unionsOfTupleTypes1.types @@ -0,0 +1,266 @@ +=== tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts === +type T1 = [string, number]; +>T1 : [string, number] + +type T2 = [boolean] | [string, number]; +>T2 : T2 + +type T3 = [string, ...number[]]; +>T3 : [string, ...number[]] + +type T4 = [boolean] | [string, ...number[]]; +>T4 : T4 + +type T10 = T1[0]; // string +>T10 : string + +type T11 = T1[1]; // number +>T11 : number + +type T12 = T1[2]; // undefined +>T12 : undefined + +type T1N = T1[number]; // string | number +>T1N : string | number + +type T20 = T2[0]; // string | boolean +>T20 : string | boolean + +type T21 = T2[1]; // number | undefined +>T21 : number | undefined + +type T22 = T2[2]; // undefined +>T22 : undefined + +type T2N = T2[number]; // string | number | boolean +>T2N : string | number | boolean + +type T30 = T3[0]; // string +>T30 : string + +type T31 = T3[1]; // number +>T31 : number + +type T32 = T3[2]; // number +>T32 : number + +type T3N = T3[number]; // string | number +>T3N : string | number + +type T40 = T4[0]; // string | boolean +>T40 : string | boolean + +type T41 = T4[1]; // number | undefined +>T41 : number | undefined + +type T42 = T4[2]; // number | undefined +>T42 : number | undefined + +type T4N = T4[number]; // string | number | boolean +>T4N : string | number | boolean + +function f1(t1: T1, t2: T2, t3: T3, t4: T4, x: number) { +>f1 : (t1: [string, number], t2: T2, t3: [string, ...number[]], t4: T4, x: number) => void +>t1 : [string, number] +>t2 : T2 +>t3 : [string, ...number[]] +>t4 : T4 +>x : number + + let [d10, d11, d12] = t1; // string, number +>d10 : string +>d11 : number +>d12 : any +>t1 : [string, number] + + let [d20, d21, d22] = t2; // string | boolean, number | undefined +>d20 : string | boolean +>d21 : number | undefined +>d22 : any +>t2 : T2 + + let [d30, d31, d32] = t3; // string, number, number +>d30 : string +>d31 : number +>d32 : number +>t3 : [string, ...number[]] + + let [d40, d41, d42] = t4; // string | boolean, number | undefined, number | undefined +>d40 : string | boolean +>d41 : number | undefined +>d42 : number | undefined +>t4 : T4 + + [d10, d11, d12] = t1; +>[d10, d11, d12] = t1 : [string, number] +>[d10, d11, d12] : [string, number, any] +>d10 : string +>d11 : number +>d12 : any +>t1 : [string, number] + + [d20, d21, d22] = t2; +>[d20, d21, d22] = t2 : T2 +>[d20, d21, d22] : [string | boolean, number | undefined, any] +>d20 : string | boolean +>d21 : number | undefined +>d22 : any +>t2 : T2 + + [d30, d31, d32] = t3; +>[d30, d31, d32] = t3 : [string, ...number[]] +>[d30, d31, d32] : [string, number, number] +>d30 : string +>d31 : number +>d32 : number +>t3 : [string, ...number[]] + + [d40, d41, d42] = t4; +>[d40, d41, d42] = t4 : T4 +>[d40, d41, d42] : [string | boolean, number | undefined, number | undefined] +>d40 : string | boolean +>d41 : number | undefined +>d42 : number | undefined +>t4 : T4 + + let t10 = t1[0]; // string +>t10 : string +>t1[0] : string +>t1 : [string, number] +>0 : 0 + + let t11 = t1[1]; // number +>t11 : number +>t1[1] : number +>t1 : [string, number] +>1 : 1 + + let t12 = t1[2]; // undefined +>t12 : undefined +>t1[2] : undefined +>t1 : [string, number] +>2 : 2 + + let t1x = t1[x]; // string | number +>t1x : string | number +>t1[x] : string | number +>t1 : [string, number] +>x : number + + let t20 = t2[0]; // string | boolean +>t20 : string | boolean +>t2[0] : string | boolean +>t2 : T2 +>0 : 0 + + let t21 = t2[1]; // number | undefined +>t21 : number | undefined +>t2[1] : number | undefined +>t2 : T2 +>1 : 1 + + let t22 = t2[2]; // undefined +>t22 : undefined +>t2[2] : undefined +>t2 : T2 +>2 : 2 + + let t2x = t2[x]; // string | number | boolean +>t2x : string | number | boolean +>t2[x] : string | number | boolean +>t2 : T2 +>x : number + + let t30 = t3[0]; // string +>t30 : string +>t3[0] : string +>t3 : [string, ...number[]] +>0 : 0 + + let t31 = t3[1]; // number +>t31 : number +>t3[1] : number +>t3 : [string, ...number[]] +>1 : 1 + + let t32 = t3[2]; // number +>t32 : number +>t3[2] : number +>t3 : [string, ...number[]] +>2 : 2 + + let t3x = t3[x]; // string | number +>t3x : string | number +>t3[x] : string | number +>t3 : [string, ...number[]] +>x : number + + let t40 = t4[0]; // string | boolean +>t40 : string | boolean +>t4[0] : string | boolean +>t4 : T4 +>0 : 0 + + let t41 = t4[1]; // number | undefined +>t41 : number | undefined +>t4[1] : number | undefined +>t4 : T4 +>1 : 1 + + let t42 = t4[2]; // number | undefined +>t42 : number | undefined +>t4[2] : number | undefined +>t4 : T4 +>2 : 2 + + let t4x = t4[x]; // string | number | boolean +>t4x : string | number | boolean +>t4[x] : string | number | boolean +>t4 : T4 +>x : number + + t1[1] = 42; +>t1[1] = 42 : 42 +>t1[1] : number +>t1 : [string, number] +>1 : 1 +>42 : 42 + + t2[1] = 42; +>t2[1] = 42 : 42 +>t2[1] : number | undefined +>t2 : T2 +>1 : 1 +>42 : 42 + + t3[1] = 42; +>t3[1] = 42 : 42 +>t3[1] : number +>t3 : [string, ...number[]] +>1 : 1 +>42 : 42 + + t4[1] = 42; +>t4[1] = 42 : 42 +>t4[1] : number | undefined +>t4 : T4 +>1 : 1 +>42 : 42 +} + +// Repro from #27543 + +type Unioned = [string] | [string, number]; +>Unioned : Unioned + +const ex: Unioned = ["hi"] as Unioned; +>ex : Unioned +>["hi"] as Unioned : Unioned +>["hi"] : [string] +>"hi" : "hi" + +const [x, y] = ex; +>x : string +>y : number | undefined +>ex : Unioned + diff --git a/tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts b/tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts index 4a69af307af..cf05bdfed81 100644 --- a/tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts +++ b/tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts @@ -63,12 +63,11 @@ type Q21 = Shape[WIDTH_OR_HEIGHT]; // number type Q30 = [string, number][0]; // string type Q31 = [string, number][1]; // number -type Q32 = [string, number][2]; // string | number +type Q32 = [string, number][number]; // string | number type Q33 = [string, number][E.A]; // string type Q34 = [string, number][E.B]; // number -type Q35 = [string, number][E.C]; // string | number -type Q36 = [string, number]["0"]; // string -type Q37 = [string, number]["1"]; // string +type Q35 = [string, number]["0"]; // string +type Q36 = [string, number]["1"]; // string type Q40 = (Shape | Options)["visible"]; // boolean | "yes" | "no" type Q41 = (Shape & Options)["visible"]; // true & "yes" | true & "no" | false & "yes" | false & "no" diff --git a/tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts b/tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts new file mode 100644 index 00000000000..9eae78919a4 --- /dev/null +++ b/tests/cases/conformance/types/tuple/unionsOfTupleTypes1.ts @@ -0,0 +1,64 @@ +// @strict: true + +type T1 = [string, number]; +type T2 = [boolean] | [string, number]; +type T3 = [string, ...number[]]; +type T4 = [boolean] | [string, ...number[]]; + +type T10 = T1[0]; // string +type T11 = T1[1]; // number +type T12 = T1[2]; // undefined +type T1N = T1[number]; // string | number + +type T20 = T2[0]; // string | boolean +type T21 = T2[1]; // number | undefined +type T22 = T2[2]; // undefined +type T2N = T2[number]; // string | number | boolean + +type T30 = T3[0]; // string +type T31 = T3[1]; // number +type T32 = T3[2]; // number +type T3N = T3[number]; // string | number + +type T40 = T4[0]; // string | boolean +type T41 = T4[1]; // number | undefined +type T42 = T4[2]; // number | undefined +type T4N = T4[number]; // string | number | boolean + +function f1(t1: T1, t2: T2, t3: T3, t4: T4, x: number) { + let [d10, d11, d12] = t1; // string, number + let [d20, d21, d22] = t2; // string | boolean, number | undefined + let [d30, d31, d32] = t3; // string, number, number + let [d40, d41, d42] = t4; // string | boolean, number | undefined, number | undefined + [d10, d11, d12] = t1; + [d20, d21, d22] = t2; + [d30, d31, d32] = t3; + [d40, d41, d42] = t4; + let t10 = t1[0]; // string + let t11 = t1[1]; // number + let t12 = t1[2]; // undefined + let t1x = t1[x]; // string | number + let t20 = t2[0]; // string | boolean + let t21 = t2[1]; // number | undefined + let t22 = t2[2]; // undefined + let t2x = t2[x]; // string | number | boolean + let t30 = t3[0]; // string + let t31 = t3[1]; // number + let t32 = t3[2]; // number + let t3x = t3[x]; // string | number + let t40 = t4[0]; // string | boolean + let t41 = t4[1]; // number | undefined + let t42 = t4[2]; // number | undefined + let t4x = t4[x]; // string | number | boolean + t1[1] = 42; + t2[1] = 42; + t3[1] = 42; + t4[1] = 42; +} + +// Repro from #27543 + +type Unioned = [string] | [string, number]; +const ex: Unioned = ["hi"] as Unioned; + +const [x, y] = ex;