fetch actual parameter name of indexer when printing literal type
This commit is contained in:
parent
57e1cf984a
commit
b9bda98256
|
@ -1307,6 +1307,17 @@ module ts {
|
|||
buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, SymbolFlags.Value);
|
||||
}
|
||||
|
||||
function getIndexerParameterName(type: ObjectType, indexKind: IndexKind, fallbackName: string): string {
|
||||
var declaration = <SignatureDeclaration>getIndexDeclarationOfSymbol(type.symbol, indexKind);
|
||||
if (!declaration) {
|
||||
// declaration might not be found if indexer was added from the contextual type.
|
||||
// in this case use fallback name
|
||||
return fallbackName;
|
||||
}
|
||||
Debug.assert(declaration.parameters.length !== 0);
|
||||
return declarationNameToString(declaration.parameters[0].name);
|
||||
}
|
||||
|
||||
function writeLiteralType(type: ObjectType, flags: TypeFormatFlags) {
|
||||
var resolved = resolveObjectOrUnionTypeMembers(type);
|
||||
if (!resolved.properties.length && !resolved.stringIndexType && !resolved.numberIndexType) {
|
||||
|
@ -1359,7 +1370,8 @@ module ts {
|
|||
if (resolved.stringIndexType) {
|
||||
// [x: string]:
|
||||
writePunctuation(writer, SyntaxKind.OpenBracketToken);
|
||||
writer.writeParameter("x");
|
||||
resolved.symbol
|
||||
writer.writeParameter(getIndexerParameterName(resolved, IndexKind.String, /*fallbackName*/"x"));
|
||||
writePunctuation(writer, SyntaxKind.ColonToken);
|
||||
writeSpace(writer);
|
||||
writeKeyword(writer, SyntaxKind.StringKeyword);
|
||||
|
@ -1373,7 +1385,7 @@ module ts {
|
|||
if (resolved.numberIndexType) {
|
||||
// [x: number]:
|
||||
writePunctuation(writer, SyntaxKind.OpenBracketToken);
|
||||
writer.writeParameter("x");
|
||||
writer.writeParameter(getIndexerParameterName(resolved, IndexKind.Number, /*fallbackName*/"x"));
|
||||
writePunctuation(writer, SyntaxKind.ColonToken);
|
||||
writeSpace(writer);
|
||||
writeKeyword(writer, SyntaxKind.NumberKeyword);
|
||||
|
|
|
@ -32,8 +32,8 @@ function foo(animals: IAnimal[]) { }
|
|||
>IAnimal : IAnimal
|
||||
|
||||
function bar(animals: { [n: number]: IAnimal }) { }
|
||||
>bar : (animals: { [x: number]: IAnimal; }) => void
|
||||
>animals : { [x: number]: IAnimal; }
|
||||
>bar : (animals: { [n: number]: IAnimal; }) => void
|
||||
>animals : { [n: number]: IAnimal; }
|
||||
>n : number
|
||||
>IAnimal : IAnimal
|
||||
|
||||
|
@ -53,7 +53,7 @@ foo([
|
|||
]); // Legal because of the contextual type IAnimal provided by the parameter
|
||||
bar([
|
||||
>bar([ new Giraffe(), new Elephant()]) : void
|
||||
>bar : (animals: { [x: number]: IAnimal; }) => void
|
||||
>bar : (animals: { [n: number]: IAnimal; }) => void
|
||||
>[ new Giraffe(), new Elephant()] : (Giraffe | Elephant)[]
|
||||
|
||||
new Giraffe(),
|
||||
|
@ -81,6 +81,6 @@ foo(arr); // ok because arr is Array<Giraffe|Elephant> not {}[]
|
|||
|
||||
bar(arr); // ok because arr is Array<Giraffe|Elephant> not {}[]
|
||||
>bar(arr) : void
|
||||
>bar : (animals: { [x: number]: IAnimal; }) => void
|
||||
>bar : (animals: { [n: number]: IAnimal; }) => void
|
||||
>arr : (Giraffe | Elephant)[]
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ var classTypeArray: Array<typeof C>; // Should OK, not be a parse error
|
|||
|
||||
// Contextual type C with numeric index signature makes array literal of EveryType E of type BCT(E,C)[]
|
||||
var context1: { [n: number]: { a: string; b: number; }; } = [{ a: '', b: 0, c: '' }, { a: "", b: 3, c: 0 }];
|
||||
>context1 : { [x: number]: { a: string; b: number; }; }
|
||||
>context1 : { [n: number]: { a: string; b: number; }; }
|
||||
>n : number
|
||||
>a : string
|
||||
>b : number
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
tests/cases/compiler/assignmentCompat1.ts(4,1): error TS2322: Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }'.
|
||||
Property 'one' is missing in type '{ [x: string]: any; }'.
|
||||
tests/cases/compiler/assignmentCompat1.ts(5,1): error TS2322: Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }'.
|
||||
tests/cases/compiler/assignmentCompat1.ts(4,1): error TS2322: Type '{ [index: string]: any; }' is not assignable to type '{ one: number; }'.
|
||||
Property 'one' is missing in type '{ [index: string]: any; }'.
|
||||
tests/cases/compiler/assignmentCompat1.ts(5,1): error TS2322: Type '{ one: number; }' is not assignable to type '{ [index: string]: any; }'.
|
||||
Index signature is missing in type '{ one: number; }'.
|
||||
|
||||
|
||||
|
@ -10,9 +10,9 @@ tests/cases/compiler/assignmentCompat1.ts(5,1): error TS2322: Type '{ one: numbe
|
|||
|
||||
x = y;
|
||||
~
|
||||
!!! error TS2322: Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }'.
|
||||
!!! error TS2322: Property 'one' is missing in type '{ [x: string]: any; }'.
|
||||
!!! error TS2322: Type '{ [index: string]: any; }' is not assignable to type '{ one: number; }'.
|
||||
!!! error TS2322: Property 'one' is missing in type '{ [index: string]: any; }'.
|
||||
y = x;
|
||||
~
|
||||
!!! error TS2322: Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }'.
|
||||
!!! error TS2322: Type '{ one: number; }' is not assignable to type '{ [index: string]: any; }'.
|
||||
!!! error TS2322: Index signature is missing in type '{ one: number; }'.
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/compiler/assignmentCompatability35.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: number]: number; }'.
|
||||
tests/cases/compiler/assignmentCompatability35.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [index: number]: number; }'.
|
||||
Index signature is missing in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
|
||||
|
||||
|
@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability35.ts(9,1): error TS2322: Type 'inte
|
|||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: number]: number; }'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [index: number]: number; }'.
|
||||
!!! error TS2322: Index signature is missing in type 'interfaceWithPublicAndOptional<number, string>'.
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/compiler/assignmentCompatability36.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: string]: any; }'.
|
||||
tests/cases/compiler/assignmentCompatability36.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [index: string]: any; }'.
|
||||
Index signature is missing in type 'interfaceWithPublicAndOptional<number, string>'.
|
||||
|
||||
|
||||
|
@ -13,5 +13,5 @@ tests/cases/compiler/assignmentCompatability36.ts(9,1): error TS2322: Type 'inte
|
|||
}
|
||||
__test2__.__val__aa = __test1__.__val__obj4
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [x: string]: any; }'.
|
||||
!!! error TS2322: Type 'interfaceWithPublicAndOptional<number, string>' is not assignable to type '{ [index: string]: any; }'.
|
||||
!!! error TS2322: Index signature is missing in type 'interfaceWithPublicAndOptional<number, string>'.
|
|
@ -1,6 +1,6 @@
|
|||
tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts(15,5): error TS2322: Type '{}' is not assignable to type '{ [x: number]: Foo; }'.
|
||||
tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts(15,5): error TS2322: Type '{}' is not assignable to type '{ [n: number]: Foo; }'.
|
||||
Index signature is missing in type '{}'.
|
||||
tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts(19,5): error TS2322: Type '() => void' is not assignable to type '{ [x: number]: Bar; }'.
|
||||
tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignature.ts(19,5): error TS2322: Type '() => void' is not assignable to type '{ [n: number]: Bar; }'.
|
||||
Index signature is missing in type '() => void'.
|
||||
|
||||
|
||||
|
@ -21,14 +21,14 @@ tests/cases/conformance/types/members/augmentedTypeAssignmentCompatIndexSignatur
|
|||
|
||||
var v1: {
|
||||
~~
|
||||
!!! error TS2322: Type '{}' is not assignable to type '{ [x: number]: Foo; }'.
|
||||
!!! error TS2322: Type '{}' is not assignable to type '{ [n: number]: Foo; }'.
|
||||
!!! error TS2322: Index signature is missing in type '{}'.
|
||||
[n: number]: Foo
|
||||
} = o; // Should be allowed
|
||||
|
||||
var v2: {
|
||||
~~
|
||||
!!! error TS2322: Type '() => void' is not assignable to type '{ [x: number]: Bar; }'.
|
||||
!!! error TS2322: Type '() => void' is not assignable to type '{ [n: number]: Bar; }'.
|
||||
!!! error TS2322: Index signature is missing in type '() => void'.
|
||||
[n: number]: Bar
|
||||
} = f; // Should be allowed
|
|
@ -3,8 +3,8 @@ function method() {
|
|||
>method : () => void
|
||||
|
||||
var dictionary = <{ [index: string]: string; }>{};
|
||||
>dictionary : { [x: string]: string; }
|
||||
><{ [index: string]: string; }>{} : { [x: string]: string; }
|
||||
>dictionary : { [index: string]: string; }
|
||||
><{ [index: string]: string; }>{} : { [index: string]: string; }
|
||||
>index : string
|
||||
>{} : { [x: string]: undefined; }
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ var arr: Contextual[] = [e]; // Ellement[]
|
|||
>e : Ellement
|
||||
|
||||
var obj: { [s: string]: Contextual } = { s: e }; // { s: Ellement; [s: string]: Ellement }
|
||||
>obj : { [x: string]: Contextual; }
|
||||
>obj : { [s: string]: Contextual; }
|
||||
>s : string
|
||||
>Contextual : Contextual
|
||||
>{ s: e } : { [x: string]: Ellement; s: Ellement; }
|
||||
|
|
|
@ -1,67 +1,67 @@
|
|||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(26,12): error TS2365: Operator '<' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(27,12): error TS2365: Operator '<' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(28,12): error TS2365: Operator '<' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(29,12): error TS2365: Operator '<' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(31,12): error TS2365: Operator '<' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(32,12): error TS2365: Operator '<' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(33,12): error TS2365: Operator '<' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(34,12): error TS2365: Operator '<' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(37,12): error TS2365: Operator '>' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(38,12): error TS2365: Operator '>' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(39,12): error TS2365: Operator '>' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(40,12): error TS2365: Operator '>' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(42,12): error TS2365: Operator '>' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(43,12): error TS2365: Operator '>' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(44,12): error TS2365: Operator '>' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(45,12): error TS2365: Operator '>' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(48,12): error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(49,12): error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(50,12): error TS2365: Operator '<=' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(51,12): error TS2365: Operator '<=' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(53,12): error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(54,12): error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(55,12): error TS2365: Operator '<=' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(56,12): error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(59,12): error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(60,12): error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(61,12): error TS2365: Operator '>=' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(62,12): error TS2365: Operator '>=' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(64,12): error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(65,12): error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(66,12): error TS2365: Operator '>=' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(67,12): error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(70,12): error TS2365: Operator '==' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(71,12): error TS2365: Operator '==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(72,12): error TS2365: Operator '==' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(73,12): error TS2365: Operator '==' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(75,12): error TS2365: Operator '==' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(76,12): error TS2365: Operator '==' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(77,12): error TS2365: Operator '==' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(78,12): error TS2365: Operator '==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(81,12): error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(82,12): error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(83,12): error TS2365: Operator '!=' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(84,12): error TS2365: Operator '!=' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(86,12): error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(87,12): error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(88,12): error TS2365: Operator '!=' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(89,12): error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(92,12): error TS2365: Operator '===' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(93,12): error TS2365: Operator '===' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(94,12): error TS2365: Operator '===' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(95,12): error TS2365: Operator '===' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(97,12): error TS2365: Operator '===' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(98,12): error TS2365: Operator '===' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(99,12): error TS2365: Operator '===' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(100,12): error TS2365: Operator '===' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(103,12): error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(104,12): error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(105,12): error TS2365: Operator '!==' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(106,12): error TS2365: Operator '!==' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(108,12): error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(109,12): error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(110,12): error TS2365: Operator '!==' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(111,12): error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(26,12): error TS2365: Operator '<' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: number; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(27,12): error TS2365: Operator '<' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(28,12): error TS2365: Operator '<' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: number]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(29,12): error TS2365: Operator '<' cannot be applied to types '{ [index: number]: Derived; }' and '{ [index: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(31,12): error TS2365: Operator '<' cannot be applied to types '{ [b: string]: number; }' and '{ [a: string]: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(32,12): error TS2365: Operator '<' cannot be applied to types '{ [index: string]: C; }' and '{ [index: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(33,12): error TS2365: Operator '<' cannot be applied to types '{ [index: number]: C; }' and '{ [index: number]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(34,12): error TS2365: Operator '<' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: number]: Derived; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(37,12): error TS2365: Operator '>' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: number; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(38,12): error TS2365: Operator '>' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(39,12): error TS2365: Operator '>' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: number]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(40,12): error TS2365: Operator '>' cannot be applied to types '{ [index: number]: Derived; }' and '{ [index: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(42,12): error TS2365: Operator '>' cannot be applied to types '{ [b: string]: number; }' and '{ [a: string]: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(43,12): error TS2365: Operator '>' cannot be applied to types '{ [index: string]: C; }' and '{ [index: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(44,12): error TS2365: Operator '>' cannot be applied to types '{ [index: number]: C; }' and '{ [index: number]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(45,12): error TS2365: Operator '>' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: number]: Derived; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(48,12): error TS2365: Operator '<=' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: number; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(49,12): error TS2365: Operator '<=' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(50,12): error TS2365: Operator '<=' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: number]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(51,12): error TS2365: Operator '<=' cannot be applied to types '{ [index: number]: Derived; }' and '{ [index: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(53,12): error TS2365: Operator '<=' cannot be applied to types '{ [b: string]: number; }' and '{ [a: string]: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(54,12): error TS2365: Operator '<=' cannot be applied to types '{ [index: string]: C; }' and '{ [index: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(55,12): error TS2365: Operator '<=' cannot be applied to types '{ [index: number]: C; }' and '{ [index: number]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(56,12): error TS2365: Operator '<=' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: number]: Derived; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(59,12): error TS2365: Operator '>=' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: number; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(60,12): error TS2365: Operator '>=' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(61,12): error TS2365: Operator '>=' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: number]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(62,12): error TS2365: Operator '>=' cannot be applied to types '{ [index: number]: Derived; }' and '{ [index: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(64,12): error TS2365: Operator '>=' cannot be applied to types '{ [b: string]: number; }' and '{ [a: string]: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(65,12): error TS2365: Operator '>=' cannot be applied to types '{ [index: string]: C; }' and '{ [index: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(66,12): error TS2365: Operator '>=' cannot be applied to types '{ [index: number]: C; }' and '{ [index: number]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(67,12): error TS2365: Operator '>=' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: number]: Derived; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(70,12): error TS2365: Operator '==' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: number; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(71,12): error TS2365: Operator '==' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(72,12): error TS2365: Operator '==' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: number]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(73,12): error TS2365: Operator '==' cannot be applied to types '{ [index: number]: Derived; }' and '{ [index: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(75,12): error TS2365: Operator '==' cannot be applied to types '{ [b: string]: number; }' and '{ [a: string]: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(76,12): error TS2365: Operator '==' cannot be applied to types '{ [index: string]: C; }' and '{ [index: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(77,12): error TS2365: Operator '==' cannot be applied to types '{ [index: number]: C; }' and '{ [index: number]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(78,12): error TS2365: Operator '==' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: number]: Derived; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(81,12): error TS2365: Operator '!=' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: number; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(82,12): error TS2365: Operator '!=' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(83,12): error TS2365: Operator '!=' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: number]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(84,12): error TS2365: Operator '!=' cannot be applied to types '{ [index: number]: Derived; }' and '{ [index: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(86,12): error TS2365: Operator '!=' cannot be applied to types '{ [b: string]: number; }' and '{ [a: string]: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(87,12): error TS2365: Operator '!=' cannot be applied to types '{ [index: string]: C; }' and '{ [index: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(88,12): error TS2365: Operator '!=' cannot be applied to types '{ [index: number]: C; }' and '{ [index: number]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(89,12): error TS2365: Operator '!=' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: number]: Derived; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(92,12): error TS2365: Operator '===' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: number; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(93,12): error TS2365: Operator '===' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(94,12): error TS2365: Operator '===' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: number]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(95,12): error TS2365: Operator '===' cannot be applied to types '{ [index: number]: Derived; }' and '{ [index: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(97,12): error TS2365: Operator '===' cannot be applied to types '{ [b: string]: number; }' and '{ [a: string]: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(98,12): error TS2365: Operator '===' cannot be applied to types '{ [index: string]: C; }' and '{ [index: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(99,12): error TS2365: Operator '===' cannot be applied to types '{ [index: number]: C; }' and '{ [index: number]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(100,12): error TS2365: Operator '===' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: number]: Derived; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(103,12): error TS2365: Operator '!==' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: number; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(104,12): error TS2365: Operator '!==' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(105,12): error TS2365: Operator '!==' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: number]: C; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(106,12): error TS2365: Operator '!==' cannot be applied to types '{ [index: number]: Derived; }' and '{ [index: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(108,12): error TS2365: Operator '!==' cannot be applied to types '{ [b: string]: number; }' and '{ [a: string]: string; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(109,12): error TS2365: Operator '!==' cannot be applied to types '{ [index: string]: C; }' and '{ [index: string]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(110,12): error TS2365: Operator '!==' cannot be applied to types '{ [index: number]: C; }' and '{ [index: number]: Base; }'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts(111,12): error TS2365: Operator '!==' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: number]: Derived; }'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNoRelationshipObjectsOnIndexSignature.ts (64 errors) ====
|
||||
|
@ -92,215 +92,215 @@ tests/cases/conformance/expressions/binaryOperators/comparisonOperator/compariso
|
|||
// operator <
|
||||
var r1a1 = a1 < b1;
|
||||
~~~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'.
|
||||
!!! error TS2365: Operator '<' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: number; }'.
|
||||
var r1a2 = a2 < b2;
|
||||
~~~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'.
|
||||
!!! error TS2365: Operator '<' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: C; }'.
|
||||
var r1a3 = a3 < b3;
|
||||
~~~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'.
|
||||
!!! error TS2365: Operator '<' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: number]: C; }'.
|
||||
var r1a4 = a4 < b4;
|
||||
~~~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'.
|
||||
!!! error TS2365: Operator '<' cannot be applied to types '{ [index: number]: Derived; }' and '{ [index: string]: Base; }'.
|
||||
|
||||
var r1b1 = b1 < a1;
|
||||
~~~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'.
|
||||
!!! error TS2365: Operator '<' cannot be applied to types '{ [b: string]: number; }' and '{ [a: string]: string; }'.
|
||||
var r1b2 = b2 < a2;
|
||||
~~~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'.
|
||||
!!! error TS2365: Operator '<' cannot be applied to types '{ [index: string]: C; }' and '{ [index: string]: Base; }'.
|
||||
var r1b3 = b3 < a3;
|
||||
~~~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'.
|
||||
!!! error TS2365: Operator '<' cannot be applied to types '{ [index: number]: C; }' and '{ [index: number]: Base; }'.
|
||||
var r1b4 = b4 < a4;
|
||||
~~~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'.
|
||||
!!! error TS2365: Operator '<' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: number]: Derived; }'.
|
||||
|
||||
// operator >
|
||||
var r2a1 = a1 > b1;
|
||||
~~~~~~~
|
||||
!!! error TS2365: Operator '>' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'.
|
||||
!!! error TS2365: Operator '>' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: number; }'.
|
||||
var r2a2 = a2 > b2;
|
||||
~~~~~~~
|
||||
!!! error TS2365: Operator '>' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'.
|
||||
!!! error TS2365: Operator '>' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: C; }'.
|
||||
var r2a3 = a3 > b3;
|
||||
~~~~~~~
|
||||
!!! error TS2365: Operator '>' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'.
|
||||
!!! error TS2365: Operator '>' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: number]: C; }'.
|
||||
var r2a4 = a4 > b4;
|
||||
~~~~~~~
|
||||
!!! error TS2365: Operator '>' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'.
|
||||
!!! error TS2365: Operator '>' cannot be applied to types '{ [index: number]: Derived; }' and '{ [index: string]: Base; }'.
|
||||
|
||||
var r2b1 = b1 > a1;
|
||||
~~~~~~~
|
||||
!!! error TS2365: Operator '>' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'.
|
||||
!!! error TS2365: Operator '>' cannot be applied to types '{ [b: string]: number; }' and '{ [a: string]: string; }'.
|
||||
var r2b2 = b2 > a2;
|
||||
~~~~~~~
|
||||
!!! error TS2365: Operator '>' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'.
|
||||
!!! error TS2365: Operator '>' cannot be applied to types '{ [index: string]: C; }' and '{ [index: string]: Base; }'.
|
||||
var r2b3 = b3 > a3;
|
||||
~~~~~~~
|
||||
!!! error TS2365: Operator '>' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'.
|
||||
!!! error TS2365: Operator '>' cannot be applied to types '{ [index: number]: C; }' and '{ [index: number]: Base; }'.
|
||||
var r2b4 = b4 > a4;
|
||||
~~~~~~~
|
||||
!!! error TS2365: Operator '>' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'.
|
||||
!!! error TS2365: Operator '>' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: number]: Derived; }'.
|
||||
|
||||
// operator <=
|
||||
var r3a1 = a1 <= b1;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'.
|
||||
!!! error TS2365: Operator '<=' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: number; }'.
|
||||
var r3a2 = a2 <= b2;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'.
|
||||
!!! error TS2365: Operator '<=' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: C; }'.
|
||||
var r3a3 = a3 <= b3;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '<=' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'.
|
||||
!!! error TS2365: Operator '<=' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: number]: C; }'.
|
||||
var r3a4 = a4 <= b4;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '<=' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'.
|
||||
!!! error TS2365: Operator '<=' cannot be applied to types '{ [index: number]: Derived; }' and '{ [index: string]: Base; }'.
|
||||
|
||||
var r3b1 = b1 <= a1;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'.
|
||||
!!! error TS2365: Operator '<=' cannot be applied to types '{ [b: string]: number; }' and '{ [a: string]: string; }'.
|
||||
var r3b2 = b2 <= a2;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'.
|
||||
!!! error TS2365: Operator '<=' cannot be applied to types '{ [index: string]: C; }' and '{ [index: string]: Base; }'.
|
||||
var r3b3 = b3 <= a3;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '<=' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'.
|
||||
!!! error TS2365: Operator '<=' cannot be applied to types '{ [index: number]: C; }' and '{ [index: number]: Base; }'.
|
||||
var r3b4 = b4 <= a4;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '<=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'.
|
||||
!!! error TS2365: Operator '<=' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: number]: Derived; }'.
|
||||
|
||||
// operator >=
|
||||
var r4a1 = a1 >= b1;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'.
|
||||
!!! error TS2365: Operator '>=' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: number; }'.
|
||||
var r4a2 = a2 >= b2;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'.
|
||||
!!! error TS2365: Operator '>=' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: C; }'.
|
||||
var r4a3 = a3 >= b3;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '>=' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'.
|
||||
!!! error TS2365: Operator '>=' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: number]: C; }'.
|
||||
var r4a4 = a4 >= b4;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '>=' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'.
|
||||
!!! error TS2365: Operator '>=' cannot be applied to types '{ [index: number]: Derived; }' and '{ [index: string]: Base; }'.
|
||||
|
||||
var r4b1 = b1 >= a1;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'.
|
||||
!!! error TS2365: Operator '>=' cannot be applied to types '{ [b: string]: number; }' and '{ [a: string]: string; }'.
|
||||
var r4b2 = b2 >= a2;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'.
|
||||
!!! error TS2365: Operator '>=' cannot be applied to types '{ [index: string]: C; }' and '{ [index: string]: Base; }'.
|
||||
var r4b3 = b3 >= a3;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '>=' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'.
|
||||
!!! error TS2365: Operator '>=' cannot be applied to types '{ [index: number]: C; }' and '{ [index: number]: Base; }'.
|
||||
var r4b4 = b4 >= a4;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '>=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'.
|
||||
!!! error TS2365: Operator '>=' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: number]: Derived; }'.
|
||||
|
||||
// operator ==
|
||||
var r5a1 = a1 == b1;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '==' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'.
|
||||
!!! error TS2365: Operator '==' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: number; }'.
|
||||
var r5a2 = a2 == b2;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'.
|
||||
!!! error TS2365: Operator '==' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: C; }'.
|
||||
var r5a3 = a3 == b3;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '==' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'.
|
||||
!!! error TS2365: Operator '==' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: number]: C; }'.
|
||||
var r5a4 = a4 == b4;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '==' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'.
|
||||
!!! error TS2365: Operator '==' cannot be applied to types '{ [index: number]: Derived; }' and '{ [index: string]: Base; }'.
|
||||
|
||||
var r5b1 = b1 == a1;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '==' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'.
|
||||
!!! error TS2365: Operator '==' cannot be applied to types '{ [b: string]: number; }' and '{ [a: string]: string; }'.
|
||||
var r5b2 = b2 == a2;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '==' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'.
|
||||
!!! error TS2365: Operator '==' cannot be applied to types '{ [index: string]: C; }' and '{ [index: string]: Base; }'.
|
||||
var r5b3 = b3 == a3;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '==' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'.
|
||||
!!! error TS2365: Operator '==' cannot be applied to types '{ [index: number]: C; }' and '{ [index: number]: Base; }'.
|
||||
var r5b4 = b4 == a4;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'.
|
||||
!!! error TS2365: Operator '==' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: number]: Derived; }'.
|
||||
|
||||
// operator !=
|
||||
var r6a1 = a1 != b1;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'.
|
||||
!!! error TS2365: Operator '!=' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: number; }'.
|
||||
var r6a2 = a2 != b2;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'.
|
||||
!!! error TS2365: Operator '!=' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: C; }'.
|
||||
var r6a3 = a3 != b3;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '!=' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'.
|
||||
!!! error TS2365: Operator '!=' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: number]: C; }'.
|
||||
var r6a4 = a4 != b4;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '!=' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'.
|
||||
!!! error TS2365: Operator '!=' cannot be applied to types '{ [index: number]: Derived; }' and '{ [index: string]: Base; }'.
|
||||
|
||||
var r6b1 = b1 != a1;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'.
|
||||
!!! error TS2365: Operator '!=' cannot be applied to types '{ [b: string]: number; }' and '{ [a: string]: string; }'.
|
||||
var r6b2 = b2 != a2;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'.
|
||||
!!! error TS2365: Operator '!=' cannot be applied to types '{ [index: string]: C; }' and '{ [index: string]: Base; }'.
|
||||
var r6b3 = b3 != a3;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '!=' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'.
|
||||
!!! error TS2365: Operator '!=' cannot be applied to types '{ [index: number]: C; }' and '{ [index: number]: Base; }'.
|
||||
var r6b4 = b4 != a4;
|
||||
~~~~~~~~
|
||||
!!! error TS2365: Operator '!=' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'.
|
||||
!!! error TS2365: Operator '!=' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: number]: Derived; }'.
|
||||
|
||||
// operator ===
|
||||
var r7a1 = a1 === b1;
|
||||
~~~~~~~~~
|
||||
!!! error TS2365: Operator '===' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'.
|
||||
!!! error TS2365: Operator '===' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: number; }'.
|
||||
var r7a2 = a2 === b2;
|
||||
~~~~~~~~~
|
||||
!!! error TS2365: Operator '===' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'.
|
||||
!!! error TS2365: Operator '===' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: C; }'.
|
||||
var r7a3 = a3 === b3;
|
||||
~~~~~~~~~
|
||||
!!! error TS2365: Operator '===' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'.
|
||||
!!! error TS2365: Operator '===' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: number]: C; }'.
|
||||
var r7a4 = a4 === b4;
|
||||
~~~~~~~~~
|
||||
!!! error TS2365: Operator '===' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'.
|
||||
!!! error TS2365: Operator '===' cannot be applied to types '{ [index: number]: Derived; }' and '{ [index: string]: Base; }'.
|
||||
|
||||
var r7b1 = b1 === a1;
|
||||
~~~~~~~~~
|
||||
!!! error TS2365: Operator '===' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'.
|
||||
!!! error TS2365: Operator '===' cannot be applied to types '{ [b: string]: number; }' and '{ [a: string]: string; }'.
|
||||
var r7b2 = b2 === a2;
|
||||
~~~~~~~~~
|
||||
!!! error TS2365: Operator '===' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'.
|
||||
!!! error TS2365: Operator '===' cannot be applied to types '{ [index: string]: C; }' and '{ [index: string]: Base; }'.
|
||||
var r7b3 = b3 === a3;
|
||||
~~~~~~~~~
|
||||
!!! error TS2365: Operator '===' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'.
|
||||
!!! error TS2365: Operator '===' cannot be applied to types '{ [index: number]: C; }' and '{ [index: number]: Base; }'.
|
||||
var r7b4 = b4 === a4;
|
||||
~~~~~~~~~
|
||||
!!! error TS2365: Operator '===' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'.
|
||||
!!! error TS2365: Operator '===' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: number]: Derived; }'.
|
||||
|
||||
// operator !==
|
||||
var r8a1 = a1 !== b1;
|
||||
~~~~~~~~~
|
||||
!!! error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: string; }' and '{ [x: string]: number; }'.
|
||||
!!! error TS2365: Operator '!==' cannot be applied to types '{ [a: string]: string; }' and '{ [b: string]: number; }'.
|
||||
var r8a2 = a2 !== b2;
|
||||
~~~~~~~~~
|
||||
!!! error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: string]: C; }'.
|
||||
!!! error TS2365: Operator '!==' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: string]: C; }'.
|
||||
var r8a3 = a3 !== b3;
|
||||
~~~~~~~~~
|
||||
!!! error TS2365: Operator '!==' cannot be applied to types '{ [x: number]: Base; }' and '{ [x: number]: C; }'.
|
||||
!!! error TS2365: Operator '!==' cannot be applied to types '{ [index: number]: Base; }' and '{ [index: number]: C; }'.
|
||||
var r8a4 = a4 !== b4;
|
||||
~~~~~~~~~
|
||||
!!! error TS2365: Operator '!==' cannot be applied to types '{ [x: number]: Derived; }' and '{ [x: string]: Base; }'.
|
||||
!!! error TS2365: Operator '!==' cannot be applied to types '{ [index: number]: Derived; }' and '{ [index: string]: Base; }'.
|
||||
|
||||
var r8b1 = b1 !== a1;
|
||||
~~~~~~~~~
|
||||
!!! error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: number; }' and '{ [x: string]: string; }'.
|
||||
!!! error TS2365: Operator '!==' cannot be applied to types '{ [b: string]: number; }' and '{ [a: string]: string; }'.
|
||||
var r8b2 = b2 !== a2;
|
||||
~~~~~~~~~
|
||||
!!! error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: C; }' and '{ [x: string]: Base; }'.
|
||||
!!! error TS2365: Operator '!==' cannot be applied to types '{ [index: string]: C; }' and '{ [index: string]: Base; }'.
|
||||
var r8b3 = b3 !== a3;
|
||||
~~~~~~~~~
|
||||
!!! error TS2365: Operator '!==' cannot be applied to types '{ [x: number]: C; }' and '{ [x: number]: Base; }'.
|
||||
!!! error TS2365: Operator '!==' cannot be applied to types '{ [index: number]: C; }' and '{ [index: number]: Base; }'.
|
||||
var r8b4 = b4 !== a4;
|
||||
~~~~~~~~~
|
||||
!!! error TS2365: Operator '!==' cannot be applied to types '{ [x: string]: Base; }' and '{ [x: number]: Derived; }'.
|
||||
!!! error TS2365: Operator '!==' cannot be applied to types '{ [index: string]: Base; }' and '{ [index: number]: Derived; }'.
|
|
@ -15,38 +15,38 @@ class Derived extends Base {
|
|||
}
|
||||
|
||||
var a1: { [a: string]: string };
|
||||
>a1 : { [x: string]: string; }
|
||||
>a1 : { [a: string]: string; }
|
||||
>a : string
|
||||
|
||||
var b1: { [b: string]: string };
|
||||
>b1 : { [x: string]: string; }
|
||||
>b1 : { [b: string]: string; }
|
||||
>b : string
|
||||
|
||||
var a2: { [index: string]: Base };
|
||||
>a2 : { [x: string]: Base; }
|
||||
>a2 : { [index: string]: Base; }
|
||||
>index : string
|
||||
>Base : Base
|
||||
|
||||
var b2: { [index: string]: Derived };
|
||||
>b2 : { [x: string]: Derived; }
|
||||
>b2 : { [index: string]: Derived; }
|
||||
>index : string
|
||||
>Derived : Derived
|
||||
|
||||
var a3: { [index: number]: string };
|
||||
>a3 : { [x: number]: string; }
|
||||
>a3 : { [index: number]: string; }
|
||||
>index : number
|
||||
|
||||
var b3: { [index: number]: string };
|
||||
>b3 : { [x: number]: string; }
|
||||
>b3 : { [index: number]: string; }
|
||||
>index : number
|
||||
|
||||
var a4: { [index: number]: Base };
|
||||
>a4 : { [x: number]: Base; }
|
||||
>a4 : { [index: number]: Base; }
|
||||
>index : number
|
||||
>Base : Base
|
||||
|
||||
var b4: { [index: string]: Derived };
|
||||
>b4 : { [x: string]: Derived; }
|
||||
>b4 : { [index: string]: Derived; }
|
||||
>index : string
|
||||
>Derived : Derived
|
||||
|
||||
|
@ -54,391 +54,391 @@ var b4: { [index: string]: Derived };
|
|||
var r1a1 = a1 < b1;
|
||||
>r1a1 : boolean
|
||||
>a1 < b1 : boolean
|
||||
>a1 : { [x: string]: string; }
|
||||
>b1 : { [x: string]: string; }
|
||||
>a1 : { [a: string]: string; }
|
||||
>b1 : { [b: string]: string; }
|
||||
|
||||
var r1a1 = a2 < b2;
|
||||
>r1a1 : boolean
|
||||
>a2 < b2 : boolean
|
||||
>a2 : { [x: string]: Base; }
|
||||
>b2 : { [x: string]: Derived; }
|
||||
>a2 : { [index: string]: Base; }
|
||||
>b2 : { [index: string]: Derived; }
|
||||
|
||||
var r1a1 = a3 < b3;
|
||||
>r1a1 : boolean
|
||||
>a3 < b3 : boolean
|
||||
>a3 : { [x: number]: string; }
|
||||
>b3 : { [x: number]: string; }
|
||||
>a3 : { [index: number]: string; }
|
||||
>b3 : { [index: number]: string; }
|
||||
|
||||
var r1a1 = a4 < b4;
|
||||
>r1a1 : boolean
|
||||
>a4 < b4 : boolean
|
||||
>a4 : { [x: number]: Base; }
|
||||
>b4 : { [x: string]: Derived; }
|
||||
>a4 : { [index: number]: Base; }
|
||||
>b4 : { [index: string]: Derived; }
|
||||
|
||||
var r1b1 = b1 < a1;
|
||||
>r1b1 : boolean
|
||||
>b1 < a1 : boolean
|
||||
>b1 : { [x: string]: string; }
|
||||
>a1 : { [x: string]: string; }
|
||||
>b1 : { [b: string]: string; }
|
||||
>a1 : { [a: string]: string; }
|
||||
|
||||
var r1b1 = b2 < a2;
|
||||
>r1b1 : boolean
|
||||
>b2 < a2 : boolean
|
||||
>b2 : { [x: string]: Derived; }
|
||||
>a2 : { [x: string]: Base; }
|
||||
>b2 : { [index: string]: Derived; }
|
||||
>a2 : { [index: string]: Base; }
|
||||
|
||||
var r1b1 = b3 < a3;
|
||||
>r1b1 : boolean
|
||||
>b3 < a3 : boolean
|
||||
>b3 : { [x: number]: string; }
|
||||
>a3 : { [x: number]: string; }
|
||||
>b3 : { [index: number]: string; }
|
||||
>a3 : { [index: number]: string; }
|
||||
|
||||
var r1b1 = b4 < a4;
|
||||
>r1b1 : boolean
|
||||
>b4 < a4 : boolean
|
||||
>b4 : { [x: string]: Derived; }
|
||||
>a4 : { [x: number]: Base; }
|
||||
>b4 : { [index: string]: Derived; }
|
||||
>a4 : { [index: number]: Base; }
|
||||
|
||||
// operator >
|
||||
var r2a1 = a1 > b1;
|
||||
>r2a1 : boolean
|
||||
>a1 > b1 : boolean
|
||||
>a1 : { [x: string]: string; }
|
||||
>b1 : { [x: string]: string; }
|
||||
>a1 : { [a: string]: string; }
|
||||
>b1 : { [b: string]: string; }
|
||||
|
||||
var r2a1 = a2 > b2;
|
||||
>r2a1 : boolean
|
||||
>a2 > b2 : boolean
|
||||
>a2 : { [x: string]: Base; }
|
||||
>b2 : { [x: string]: Derived; }
|
||||
>a2 : { [index: string]: Base; }
|
||||
>b2 : { [index: string]: Derived; }
|
||||
|
||||
var r2a1 = a3 > b3;
|
||||
>r2a1 : boolean
|
||||
>a3 > b3 : boolean
|
||||
>a3 : { [x: number]: string; }
|
||||
>b3 : { [x: number]: string; }
|
||||
>a3 : { [index: number]: string; }
|
||||
>b3 : { [index: number]: string; }
|
||||
|
||||
var r2a1 = a4 > b4;
|
||||
>r2a1 : boolean
|
||||
>a4 > b4 : boolean
|
||||
>a4 : { [x: number]: Base; }
|
||||
>b4 : { [x: string]: Derived; }
|
||||
>a4 : { [index: number]: Base; }
|
||||
>b4 : { [index: string]: Derived; }
|
||||
|
||||
var r2b1 = b1 > a1;
|
||||
>r2b1 : boolean
|
||||
>b1 > a1 : boolean
|
||||
>b1 : { [x: string]: string; }
|
||||
>a1 : { [x: string]: string; }
|
||||
>b1 : { [b: string]: string; }
|
||||
>a1 : { [a: string]: string; }
|
||||
|
||||
var r2b1 = b2 > a2;
|
||||
>r2b1 : boolean
|
||||
>b2 > a2 : boolean
|
||||
>b2 : { [x: string]: Derived; }
|
||||
>a2 : { [x: string]: Base; }
|
||||
>b2 : { [index: string]: Derived; }
|
||||
>a2 : { [index: string]: Base; }
|
||||
|
||||
var r2b1 = b3 > a3;
|
||||
>r2b1 : boolean
|
||||
>b3 > a3 : boolean
|
||||
>b3 : { [x: number]: string; }
|
||||
>a3 : { [x: number]: string; }
|
||||
>b3 : { [index: number]: string; }
|
||||
>a3 : { [index: number]: string; }
|
||||
|
||||
var r2b1 = b4 > a4;
|
||||
>r2b1 : boolean
|
||||
>b4 > a4 : boolean
|
||||
>b4 : { [x: string]: Derived; }
|
||||
>a4 : { [x: number]: Base; }
|
||||
>b4 : { [index: string]: Derived; }
|
||||
>a4 : { [index: number]: Base; }
|
||||
|
||||
// operator <=
|
||||
var r3a1 = a1 <= b1;
|
||||
>r3a1 : boolean
|
||||
>a1 <= b1 : boolean
|
||||
>a1 : { [x: string]: string; }
|
||||
>b1 : { [x: string]: string; }
|
||||
>a1 : { [a: string]: string; }
|
||||
>b1 : { [b: string]: string; }
|
||||
|
||||
var r3a1 = a2 <= b2;
|
||||
>r3a1 : boolean
|
||||
>a2 <= b2 : boolean
|
||||
>a2 : { [x: string]: Base; }
|
||||
>b2 : { [x: string]: Derived; }
|
||||
>a2 : { [index: string]: Base; }
|
||||
>b2 : { [index: string]: Derived; }
|
||||
|
||||
var r3a1 = a3 <= b3;
|
||||
>r3a1 : boolean
|
||||
>a3 <= b3 : boolean
|
||||
>a3 : { [x: number]: string; }
|
||||
>b3 : { [x: number]: string; }
|
||||
>a3 : { [index: number]: string; }
|
||||
>b3 : { [index: number]: string; }
|
||||
|
||||
var r3a1 = a4 <= b4;
|
||||
>r3a1 : boolean
|
||||
>a4 <= b4 : boolean
|
||||
>a4 : { [x: number]: Base; }
|
||||
>b4 : { [x: string]: Derived; }
|
||||
>a4 : { [index: number]: Base; }
|
||||
>b4 : { [index: string]: Derived; }
|
||||
|
||||
var r3b1 = b1 <= a1;
|
||||
>r3b1 : boolean
|
||||
>b1 <= a1 : boolean
|
||||
>b1 : { [x: string]: string; }
|
||||
>a1 : { [x: string]: string; }
|
||||
>b1 : { [b: string]: string; }
|
||||
>a1 : { [a: string]: string; }
|
||||
|
||||
var r3b1 = b2 <= a2;
|
||||
>r3b1 : boolean
|
||||
>b2 <= a2 : boolean
|
||||
>b2 : { [x: string]: Derived; }
|
||||
>a2 : { [x: string]: Base; }
|
||||
>b2 : { [index: string]: Derived; }
|
||||
>a2 : { [index: string]: Base; }
|
||||
|
||||
var r3b1 = b3 <= a3;
|
||||
>r3b1 : boolean
|
||||
>b3 <= a3 : boolean
|
||||
>b3 : { [x: number]: string; }
|
||||
>a3 : { [x: number]: string; }
|
||||
>b3 : { [index: number]: string; }
|
||||
>a3 : { [index: number]: string; }
|
||||
|
||||
var r3b1 = b4 <= a4;
|
||||
>r3b1 : boolean
|
||||
>b4 <= a4 : boolean
|
||||
>b4 : { [x: string]: Derived; }
|
||||
>a4 : { [x: number]: Base; }
|
||||
>b4 : { [index: string]: Derived; }
|
||||
>a4 : { [index: number]: Base; }
|
||||
|
||||
// operator >=
|
||||
var r4a1 = a1 >= b1;
|
||||
>r4a1 : boolean
|
||||
>a1 >= b1 : boolean
|
||||
>a1 : { [x: string]: string; }
|
||||
>b1 : { [x: string]: string; }
|
||||
>a1 : { [a: string]: string; }
|
||||
>b1 : { [b: string]: string; }
|
||||
|
||||
var r4a1 = a2 >= b2;
|
||||
>r4a1 : boolean
|
||||
>a2 >= b2 : boolean
|
||||
>a2 : { [x: string]: Base; }
|
||||
>b2 : { [x: string]: Derived; }
|
||||
>a2 : { [index: string]: Base; }
|
||||
>b2 : { [index: string]: Derived; }
|
||||
|
||||
var r4a1 = a3 >= b3;
|
||||
>r4a1 : boolean
|
||||
>a3 >= b3 : boolean
|
||||
>a3 : { [x: number]: string; }
|
||||
>b3 : { [x: number]: string; }
|
||||
>a3 : { [index: number]: string; }
|
||||
>b3 : { [index: number]: string; }
|
||||
|
||||
var r4a1 = a4 >= b4;
|
||||
>r4a1 : boolean
|
||||
>a4 >= b4 : boolean
|
||||
>a4 : { [x: number]: Base; }
|
||||
>b4 : { [x: string]: Derived; }
|
||||
>a4 : { [index: number]: Base; }
|
||||
>b4 : { [index: string]: Derived; }
|
||||
|
||||
var r4b1 = b1 >= a1;
|
||||
>r4b1 : boolean
|
||||
>b1 >= a1 : boolean
|
||||
>b1 : { [x: string]: string; }
|
||||
>a1 : { [x: string]: string; }
|
||||
>b1 : { [b: string]: string; }
|
||||
>a1 : { [a: string]: string; }
|
||||
|
||||
var r4b1 = b2 >= a2;
|
||||
>r4b1 : boolean
|
||||
>b2 >= a2 : boolean
|
||||
>b2 : { [x: string]: Derived; }
|
||||
>a2 : { [x: string]: Base; }
|
||||
>b2 : { [index: string]: Derived; }
|
||||
>a2 : { [index: string]: Base; }
|
||||
|
||||
var r4b1 = b3 >= a3;
|
||||
>r4b1 : boolean
|
||||
>b3 >= a3 : boolean
|
||||
>b3 : { [x: number]: string; }
|
||||
>a3 : { [x: number]: string; }
|
||||
>b3 : { [index: number]: string; }
|
||||
>a3 : { [index: number]: string; }
|
||||
|
||||
var r4b1 = b4 >= a4;
|
||||
>r4b1 : boolean
|
||||
>b4 >= a4 : boolean
|
||||
>b4 : { [x: string]: Derived; }
|
||||
>a4 : { [x: number]: Base; }
|
||||
>b4 : { [index: string]: Derived; }
|
||||
>a4 : { [index: number]: Base; }
|
||||
|
||||
// operator ==
|
||||
var r5a1 = a1 == b1;
|
||||
>r5a1 : boolean
|
||||
>a1 == b1 : boolean
|
||||
>a1 : { [x: string]: string; }
|
||||
>b1 : { [x: string]: string; }
|
||||
>a1 : { [a: string]: string; }
|
||||
>b1 : { [b: string]: string; }
|
||||
|
||||
var r5a1 = a2 == b2;
|
||||
>r5a1 : boolean
|
||||
>a2 == b2 : boolean
|
||||
>a2 : { [x: string]: Base; }
|
||||
>b2 : { [x: string]: Derived; }
|
||||
>a2 : { [index: string]: Base; }
|
||||
>b2 : { [index: string]: Derived; }
|
||||
|
||||
var r5a1 = a3 == b3;
|
||||
>r5a1 : boolean
|
||||
>a3 == b3 : boolean
|
||||
>a3 : { [x: number]: string; }
|
||||
>b3 : { [x: number]: string; }
|
||||
>a3 : { [index: number]: string; }
|
||||
>b3 : { [index: number]: string; }
|
||||
|
||||
var r5a1 = a4 == b4;
|
||||
>r5a1 : boolean
|
||||
>a4 == b4 : boolean
|
||||
>a4 : { [x: number]: Base; }
|
||||
>b4 : { [x: string]: Derived; }
|
||||
>a4 : { [index: number]: Base; }
|
||||
>b4 : { [index: string]: Derived; }
|
||||
|
||||
var r5b1 = b1 == a1;
|
||||
>r5b1 : boolean
|
||||
>b1 == a1 : boolean
|
||||
>b1 : { [x: string]: string; }
|
||||
>a1 : { [x: string]: string; }
|
||||
>b1 : { [b: string]: string; }
|
||||
>a1 : { [a: string]: string; }
|
||||
|
||||
var r5b1 = b2 == a2;
|
||||
>r5b1 : boolean
|
||||
>b2 == a2 : boolean
|
||||
>b2 : { [x: string]: Derived; }
|
||||
>a2 : { [x: string]: Base; }
|
||||
>b2 : { [index: string]: Derived; }
|
||||
>a2 : { [index: string]: Base; }
|
||||
|
||||
var r5b1 = b3 == a3;
|
||||
>r5b1 : boolean
|
||||
>b3 == a3 : boolean
|
||||
>b3 : { [x: number]: string; }
|
||||
>a3 : { [x: number]: string; }
|
||||
>b3 : { [index: number]: string; }
|
||||
>a3 : { [index: number]: string; }
|
||||
|
||||
var r5b1 = b4 == a4;
|
||||
>r5b1 : boolean
|
||||
>b4 == a4 : boolean
|
||||
>b4 : { [x: string]: Derived; }
|
||||
>a4 : { [x: number]: Base; }
|
||||
>b4 : { [index: string]: Derived; }
|
||||
>a4 : { [index: number]: Base; }
|
||||
|
||||
// operator !=
|
||||
var r6a1 = a1 != b1;
|
||||
>r6a1 : boolean
|
||||
>a1 != b1 : boolean
|
||||
>a1 : { [x: string]: string; }
|
||||
>b1 : { [x: string]: string; }
|
||||
>a1 : { [a: string]: string; }
|
||||
>b1 : { [b: string]: string; }
|
||||
|
||||
var r6a1 = a2 != b2;
|
||||
>r6a1 : boolean
|
||||
>a2 != b2 : boolean
|
||||
>a2 : { [x: string]: Base; }
|
||||
>b2 : { [x: string]: Derived; }
|
||||
>a2 : { [index: string]: Base; }
|
||||
>b2 : { [index: string]: Derived; }
|
||||
|
||||
var r6a1 = a3 != b3;
|
||||
>r6a1 : boolean
|
||||
>a3 != b3 : boolean
|
||||
>a3 : { [x: number]: string; }
|
||||
>b3 : { [x: number]: string; }
|
||||
>a3 : { [index: number]: string; }
|
||||
>b3 : { [index: number]: string; }
|
||||
|
||||
var r6a1 = a4 != b4;
|
||||
>r6a1 : boolean
|
||||
>a4 != b4 : boolean
|
||||
>a4 : { [x: number]: Base; }
|
||||
>b4 : { [x: string]: Derived; }
|
||||
>a4 : { [index: number]: Base; }
|
||||
>b4 : { [index: string]: Derived; }
|
||||
|
||||
var r6b1 = b1 != a1;
|
||||
>r6b1 : boolean
|
||||
>b1 != a1 : boolean
|
||||
>b1 : { [x: string]: string; }
|
||||
>a1 : { [x: string]: string; }
|
||||
>b1 : { [b: string]: string; }
|
||||
>a1 : { [a: string]: string; }
|
||||
|
||||
var r6b1 = b2 != a2;
|
||||
>r6b1 : boolean
|
||||
>b2 != a2 : boolean
|
||||
>b2 : { [x: string]: Derived; }
|
||||
>a2 : { [x: string]: Base; }
|
||||
>b2 : { [index: string]: Derived; }
|
||||
>a2 : { [index: string]: Base; }
|
||||
|
||||
var r6b1 = b3 != a3;
|
||||
>r6b1 : boolean
|
||||
>b3 != a3 : boolean
|
||||
>b3 : { [x: number]: string; }
|
||||
>a3 : { [x: number]: string; }
|
||||
>b3 : { [index: number]: string; }
|
||||
>a3 : { [index: number]: string; }
|
||||
|
||||
var r6b1 = b4 != a4;
|
||||
>r6b1 : boolean
|
||||
>b4 != a4 : boolean
|
||||
>b4 : { [x: string]: Derived; }
|
||||
>a4 : { [x: number]: Base; }
|
||||
>b4 : { [index: string]: Derived; }
|
||||
>a4 : { [index: number]: Base; }
|
||||
|
||||
// operator ===
|
||||
var r7a1 = a1 === b1;
|
||||
>r7a1 : boolean
|
||||
>a1 === b1 : boolean
|
||||
>a1 : { [x: string]: string; }
|
||||
>b1 : { [x: string]: string; }
|
||||
>a1 : { [a: string]: string; }
|
||||
>b1 : { [b: string]: string; }
|
||||
|
||||
var r7a1 = a2 === b2;
|
||||
>r7a1 : boolean
|
||||
>a2 === b2 : boolean
|
||||
>a2 : { [x: string]: Base; }
|
||||
>b2 : { [x: string]: Derived; }
|
||||
>a2 : { [index: string]: Base; }
|
||||
>b2 : { [index: string]: Derived; }
|
||||
|
||||
var r7a1 = a3 === b3;
|
||||
>r7a1 : boolean
|
||||
>a3 === b3 : boolean
|
||||
>a3 : { [x: number]: string; }
|
||||
>b3 : { [x: number]: string; }
|
||||
>a3 : { [index: number]: string; }
|
||||
>b3 : { [index: number]: string; }
|
||||
|
||||
var r7a1 = a4 === b4;
|
||||
>r7a1 : boolean
|
||||
>a4 === b4 : boolean
|
||||
>a4 : { [x: number]: Base; }
|
||||
>b4 : { [x: string]: Derived; }
|
||||
>a4 : { [index: number]: Base; }
|
||||
>b4 : { [index: string]: Derived; }
|
||||
|
||||
var r7b1 = b1 === a1;
|
||||
>r7b1 : boolean
|
||||
>b1 === a1 : boolean
|
||||
>b1 : { [x: string]: string; }
|
||||
>a1 : { [x: string]: string; }
|
||||
>b1 : { [b: string]: string; }
|
||||
>a1 : { [a: string]: string; }
|
||||
|
||||
var r7b1 = b2 === a2;
|
||||
>r7b1 : boolean
|
||||
>b2 === a2 : boolean
|
||||
>b2 : { [x: string]: Derived; }
|
||||
>a2 : { [x: string]: Base; }
|
||||
>b2 : { [index: string]: Derived; }
|
||||
>a2 : { [index: string]: Base; }
|
||||
|
||||
var r7b1 = b3 === a3;
|
||||
>r7b1 : boolean
|
||||
>b3 === a3 : boolean
|
||||
>b3 : { [x: number]: string; }
|
||||
>a3 : { [x: number]: string; }
|
||||
>b3 : { [index: number]: string; }
|
||||
>a3 : { [index: number]: string; }
|
||||
|
||||
var r7b1 = b4 === a4;
|
||||
>r7b1 : boolean
|
||||
>b4 === a4 : boolean
|
||||
>b4 : { [x: string]: Derived; }
|
||||
>a4 : { [x: number]: Base; }
|
||||
>b4 : { [index: string]: Derived; }
|
||||
>a4 : { [index: number]: Base; }
|
||||
|
||||
// operator !==
|
||||
var r8a1 = a1 !== b1;
|
||||
>r8a1 : boolean
|
||||
>a1 !== b1 : boolean
|
||||
>a1 : { [x: string]: string; }
|
||||
>b1 : { [x: string]: string; }
|
||||
>a1 : { [a: string]: string; }
|
||||
>b1 : { [b: string]: string; }
|
||||
|
||||
var r8a1 = a2 !== b2;
|
||||
>r8a1 : boolean
|
||||
>a2 !== b2 : boolean
|
||||
>a2 : { [x: string]: Base; }
|
||||
>b2 : { [x: string]: Derived; }
|
||||
>a2 : { [index: string]: Base; }
|
||||
>b2 : { [index: string]: Derived; }
|
||||
|
||||
var r8a1 = a3 !== b3;
|
||||
>r8a1 : boolean
|
||||
>a3 !== b3 : boolean
|
||||
>a3 : { [x: number]: string; }
|
||||
>b3 : { [x: number]: string; }
|
||||
>a3 : { [index: number]: string; }
|
||||
>b3 : { [index: number]: string; }
|
||||
|
||||
var r8a1 = a4 !== b4;
|
||||
>r8a1 : boolean
|
||||
>a4 !== b4 : boolean
|
||||
>a4 : { [x: number]: Base; }
|
||||
>b4 : { [x: string]: Derived; }
|
||||
>a4 : { [index: number]: Base; }
|
||||
>b4 : { [index: string]: Derived; }
|
||||
|
||||
var r8b1 = b1 !== a1;
|
||||
>r8b1 : boolean
|
||||
>b1 !== a1 : boolean
|
||||
>b1 : { [x: string]: string; }
|
||||
>a1 : { [x: string]: string; }
|
||||
>b1 : { [b: string]: string; }
|
||||
>a1 : { [a: string]: string; }
|
||||
|
||||
var r8b1 = b2 !== a2;
|
||||
>r8b1 : boolean
|
||||
>b2 !== a2 : boolean
|
||||
>b2 : { [x: string]: Derived; }
|
||||
>a2 : { [x: string]: Base; }
|
||||
>b2 : { [index: string]: Derived; }
|
||||
>a2 : { [index: string]: Base; }
|
||||
|
||||
var r8b1 = b3 !== a3;
|
||||
>r8b1 : boolean
|
||||
>b3 !== a3 : boolean
|
||||
>b3 : { [x: number]: string; }
|
||||
>a3 : { [x: number]: string; }
|
||||
>b3 : { [index: number]: string; }
|
||||
>a3 : { [index: number]: string; }
|
||||
|
||||
var r8b1 = b4 !== a4;
|
||||
>r8b1 : boolean
|
||||
>b4 !== a4 : boolean
|
||||
>b4 : { [x: string]: Derived; }
|
||||
>a4 : { [x: number]: Base; }
|
||||
>b4 : { [index: string]: Derived; }
|
||||
>a4 : { [index: number]: Base; }
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ var x: any;
|
|||
>x : any
|
||||
|
||||
var obj: { [s: string]: number } = { p: "", q: x };
|
||||
>obj : { [x: string]: number; }
|
||||
>obj : { [s: string]: number; }
|
||||
>s : string
|
||||
>{ p: "", q: x } : { [x: string]: any; p: string; q: any; }
|
||||
>p : string
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
tests/cases/compiler/contextualTypingOfObjectLiterals.ts(4,1): error TS2322: Type '{ x: string; }' is not assignable to type '{ [x: string]: string; }'.
|
||||
Index signature is missing in type '{ x: string; }'.
|
||||
tests/cases/compiler/contextualTypingOfObjectLiterals.ts(10,3): error TS2345: Argument of type '{ x: string; }' is not assignable to parameter of type '{ [x: string]: string; }'.
|
||||
tests/cases/compiler/contextualTypingOfObjectLiterals.ts(10,3): error TS2345: Argument of type '{ x: string; }' is not assignable to parameter of type '{ [s: string]: string; }'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/contextualTypingOfObjectLiterals.ts (2 errors) ====
|
||||
|
@ -18,4 +18,4 @@ tests/cases/compiler/contextualTypingOfObjectLiterals.ts(10,3): error TS2345: Ar
|
|||
f(obj1); // Ok
|
||||
f(obj2); // Error - indexer doesn't match
|
||||
~~~~
|
||||
!!! error TS2345: Argument of type '{ x: string; }' is not assignable to parameter of type '{ [x: string]: string; }'.
|
||||
!!! error TS2345: Argument of type '{ x: string; }' is not assignable to parameter of type '{ [s: string]: string; }'.
|
|
@ -17,7 +17,7 @@ module m {
|
|||
|
||||
// Object literal with everything
|
||||
var x: {
|
||||
>x : { (a: number): c; (a: string): g<string>; new (a: number): c; new (a: string): m.c; [x: string]: c; [x: number]: c; a: c; b: g<string>; m1(): g<number>; m2(a: string, b?: number, ...c: c[]): string; }
|
||||
>x : { (a: number): c; (a: string): g<string>; new (a: number): c; new (a: string): m.c; [n: string]: c; [n: number]: c; a: c; b: g<string>; m1(): g<number>; m2(a: string, b?: number, ...c: c[]): string; }
|
||||
|
||||
// Call signatures
|
||||
(a: number): c;
|
||||
|
|
|
@ -22,7 +22,7 @@ var moduleATyped: IHasVisualizationModel = moduleA;
|
|||
>moduleA : typeof moduleA
|
||||
|
||||
var moduleMap: { [key: string]: IHasVisualizationModel } = {
|
||||
>moduleMap : { [x: string]: IHasVisualizationModel; }
|
||||
>moduleMap : { [key: string]: IHasVisualizationModel; }
|
||||
>key : string
|
||||
>IHasVisualizationModel : IHasVisualizationModel
|
||||
>{ "moduleA": moduleA, "moduleB": moduleB} : { [x: string]: typeof moduleA; "moduleA": typeof moduleA; "moduleB": typeof moduleB; }
|
||||
|
@ -42,7 +42,7 @@ var visModel = new moduleMap[moduleName].VisualizationModel();
|
|||
>new moduleMap[moduleName].VisualizationModel() : Backbone.Model
|
||||
>moduleMap[moduleName].VisualizationModel : typeof Backbone.Model
|
||||
>moduleMap[moduleName] : IHasVisualizationModel
|
||||
>moduleMap : { [x: string]: IHasVisualizationModel; }
|
||||
>moduleMap : { [key: string]: IHasVisualizationModel; }
|
||||
>moduleName : string
|
||||
>VisualizationModel : typeof Backbone.Model
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ var x8: Array<Base> = [d1, d2];
|
|||
>d2 : Derived2
|
||||
|
||||
var x9: { [n: number]: Base; } = [d1, d2];
|
||||
>x9 : { [x: number]: Base; }
|
||||
>x9 : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>[d1, d2] : (Derived1 | Derived2)[]
|
||||
|
@ -210,7 +210,7 @@ class x20 { member: Array<Base> = [d1, d2] }
|
|||
|
||||
class x21 { member: { [n: number]: Base; } = [d1, d2] }
|
||||
>x21 : x21
|
||||
>member : { [x: number]: Base; }
|
||||
>member : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>[d1, d2] : (Derived1 | Derived2)[]
|
||||
|
@ -326,7 +326,7 @@ class x32 { private member: Array<Base> = [d1, d2] }
|
|||
|
||||
class x33 { private member: { [n: number]: Base; } = [d1, d2] }
|
||||
>x33 : x33
|
||||
>member : { [x: number]: Base; }
|
||||
>member : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>[d1, d2] : (Derived1 | Derived2)[]
|
||||
|
@ -442,7 +442,7 @@ class x44 { public member: Array<Base> = [d1, d2] }
|
|||
|
||||
class x45 { public member: { [n: number]: Base; } = [d1, d2] }
|
||||
>x45 : x45
|
||||
>member : { [x: number]: Base; }
|
||||
>member : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>[d1, d2] : (Derived1 | Derived2)[]
|
||||
|
@ -558,7 +558,7 @@ class x56 { static member: Array<Base> = [d1, d2] }
|
|||
|
||||
class x57 { static member: { [n: number]: Base; } = [d1, d2] }
|
||||
>x57 : x57
|
||||
>member : { [x: number]: Base; }
|
||||
>member : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>[d1, d2] : (Derived1 | Derived2)[]
|
||||
|
@ -674,7 +674,7 @@ class x68 { private static member: Array<Base> = [d1, d2] }
|
|||
|
||||
class x69 { private static member: { [n: number]: Base; } = [d1, d2] }
|
||||
>x69 : x69
|
||||
>member : { [x: number]: Base; }
|
||||
>member : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>[d1, d2] : (Derived1 | Derived2)[]
|
||||
|
@ -790,7 +790,7 @@ class x80 { public static member: Array<Base> = [d1, d2] }
|
|||
|
||||
class x81 { public static member: { [n: number]: Base; } = [d1, d2] }
|
||||
>x81 : x81
|
||||
>member : { [x: number]: Base; }
|
||||
>member : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>[d1, d2] : (Derived1 | Derived2)[]
|
||||
|
@ -906,7 +906,7 @@ class x92 { constructor(parm: Array<Base> = [d1, d2]) { } }
|
|||
|
||||
class x93 { constructor(parm: { [n: number]: Base; } = [d1, d2]) { } }
|
||||
>x93 : x93
|
||||
>parm : { [x: number]: Base; }
|
||||
>parm : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>[d1, d2] : (Derived1 | Derived2)[]
|
||||
|
@ -1022,7 +1022,7 @@ class x104 { constructor(public parm: Array<Base> = [d1, d2]) { } }
|
|||
|
||||
class x105 { constructor(public parm: { [n: number]: Base; } = [d1, d2]) { } }
|
||||
>x105 : x105
|
||||
>parm : { [x: number]: Base; }
|
||||
>parm : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>[d1, d2] : (Derived1 | Derived2)[]
|
||||
|
@ -1138,7 +1138,7 @@ class x116 { constructor(private parm: Array<Base> = [d1, d2]) { } }
|
|||
|
||||
class x117 { constructor(private parm: { [n: number]: Base; } = [d1, d2]) { } }
|
||||
>x117 : x117
|
||||
>parm : { [x: number]: Base; }
|
||||
>parm : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>[d1, d2] : (Derived1 | Derived2)[]
|
||||
|
@ -1253,8 +1253,8 @@ function x128(parm: Array<Base> = [d1, d2]) { }
|
|||
>d2 : Derived2
|
||||
|
||||
function x129(parm: { [n: number]: Base; } = [d1, d2]) { }
|
||||
>x129 : (parm?: { [x: number]: Base; }) => void
|
||||
>parm : { [x: number]: Base; }
|
||||
>x129 : (parm?: { [n: number]: Base; }) => void
|
||||
>parm : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>[d1, d2] : (Derived1 | Derived2)[]
|
||||
|
@ -1361,7 +1361,7 @@ function x140(): Array<Base> { return [d1, d2]; }
|
|||
>d2 : Derived2
|
||||
|
||||
function x141(): { [n: number]: Base; } { return [d1, d2]; }
|
||||
>x141 : () => { [x: number]: Base; }
|
||||
>x141 : () => { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>[d1, d2] : (Derived1 | Derived2)[]
|
||||
|
@ -1497,7 +1497,7 @@ function x152(): Array<Base> { return [d1, d2]; return [d1, d2]; }
|
|||
>d2 : Derived2
|
||||
|
||||
function x153(): { [n: number]: Base; } { return [d1, d2]; return [d1, d2]; }
|
||||
>x153 : () => { [x: number]: Base; }
|
||||
>x153 : () => { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>[d1, d2] : (Derived1 | Derived2)[]
|
||||
|
@ -1628,7 +1628,7 @@ var x164: () => Array<Base> = () => { return [d1, d2]; };
|
|||
>d2 : Derived2
|
||||
|
||||
var x165: () => { [n: number]: Base; } = () => { return [d1, d2]; };
|
||||
>x165 : () => { [x: number]: Base; }
|
||||
>x165 : () => { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>() => { return [d1, d2]; } : () => (Derived1 | Derived2)[]
|
||||
|
@ -1744,7 +1744,7 @@ var x176: () => Array<Base> = function() { return [d1, d2]; };
|
|||
>d2 : Derived2
|
||||
|
||||
var x177: () => { [n: number]: Base; } = function() { return [d1, d2]; };
|
||||
>x177 : () => { [x: number]: Base; }
|
||||
>x177 : () => { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>function() { return [d1, d2]; } : () => (Derived1 | Derived2)[]
|
||||
|
@ -1861,7 +1861,7 @@ module x188 { var t: Array<Base> = [d1, d2]; }
|
|||
|
||||
module x189 { var t: { [n: number]: Base; } = [d1, d2]; }
|
||||
>x189 : typeof x189
|
||||
>t : { [x: number]: Base; }
|
||||
>t : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>[d1, d2] : (Derived1 | Derived2)[]
|
||||
|
@ -1977,7 +1977,7 @@ module x200 { export var t: Array<Base> = [d1, d2]; }
|
|||
|
||||
module x201 { export var t: { [n: number]: Base; } = [d1, d2]; }
|
||||
>x201 : typeof x201
|
||||
>t : { [x: number]: Base; }
|
||||
>t : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>[d1, d2] : (Derived1 | Derived2)[]
|
||||
|
@ -2074,8 +2074,8 @@ var x212 = <Array<Base>>[d1, d2];
|
|||
>d2 : Derived2
|
||||
|
||||
var x213 = <{ [n: number]: Base; }>[d1, d2];
|
||||
>x213 : { [x: number]: Base; }
|
||||
><{ [n: number]: Base; }>[d1, d2] : { [x: number]: Base; }
|
||||
>x213 : { [n: number]: Base; }
|
||||
><{ [n: number]: Base; }>[d1, d2] : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>[d1, d2] : (Derived1 | Derived2)[]
|
||||
|
@ -2180,10 +2180,10 @@ var x222 = (<Array<Base>>undefined) || [d1, d2];
|
|||
>d2 : Derived2
|
||||
|
||||
var x223 = (<{ [n: number]: Base; }>undefined) || [d1, d2];
|
||||
>x223 : { [x: number]: Base; }
|
||||
>(<{ [n: number]: Base; }>undefined) || [d1, d2] : { [x: number]: Base; }
|
||||
>(<{ [n: number]: Base; }>undefined) : { [x: number]: Base; }
|
||||
><{ [n: number]: Base; }>undefined : { [x: number]: Base; }
|
||||
>x223 : { [n: number]: Base; }
|
||||
>(<{ [n: number]: Base; }>undefined) || [d1, d2] : { [n: number]: Base; }
|
||||
>(<{ [n: number]: Base; }>undefined) : { [n: number]: Base; }
|
||||
><{ [n: number]: Base; }>undefined : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>undefined : undefined
|
||||
|
@ -2287,11 +2287,11 @@ var x232: Array<Base>; x232 = [d1, d2];
|
|||
>d2 : Derived2
|
||||
|
||||
var x233: { [n: number]: Base; }; x233 = [d1, d2];
|
||||
>x233 : { [x: number]: Base; }
|
||||
>x233 : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>x233 = [d1, d2] : (Derived1 | Derived2)[]
|
||||
>x233 : { [x: number]: Base; }
|
||||
>x233 : { [n: number]: Base; }
|
||||
>[d1, d2] : (Derived1 | Derived2)[]
|
||||
>d1 : Derived1
|
||||
>d2 : Derived2
|
||||
|
@ -2423,8 +2423,8 @@ var x244: { n: Array<Base>; } = { n: [d1, d2] };
|
|||
>d2 : Derived2
|
||||
|
||||
var x245: { n: { [n: number]: Base; }; } = { n: [d1, d2] };
|
||||
>x245 : { n: { [x: number]: Base; }; }
|
||||
>n : { [x: number]: Base; }
|
||||
>x245 : { n: { [n: number]: Base; }; }
|
||||
>n : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>{ n: [d1, d2] } : { n: (Derived1 | Derived2)[]; }
|
||||
|
@ -2519,7 +2519,7 @@ var x256: Array<Base>[] = [[d1, d2]];
|
|||
>d2 : Derived2
|
||||
|
||||
var x257: { [n: number]: Base; }[] = [[d1, d2]];
|
||||
>x257 : { [x: number]: Base; }[]
|
||||
>x257 : { [n: number]: Base; }[]
|
||||
>n : number
|
||||
>Base : Base
|
||||
>[[d1, d2]] : (Derived1 | Derived2)[][]
|
||||
|
@ -2613,7 +2613,7 @@ var x266: Array<Base> = [d1, d2] || undefined;
|
|||
>undefined : undefined
|
||||
|
||||
var x267: { [n: number]: Base; } = [d1, d2] || undefined;
|
||||
>x267 : { [x: number]: Base; }
|
||||
>x267 : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>[d1, d2] || undefined : (Derived1 | Derived2)[]
|
||||
|
@ -2696,7 +2696,7 @@ var x274: Array<Base> = undefined || [d1, d2];
|
|||
>d2 : Derived2
|
||||
|
||||
var x275: { [n: number]: Base; } = undefined || [d1, d2];
|
||||
>x275 : { [x: number]: Base; }
|
||||
>x275 : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>undefined || [d1, d2] : (Derived1 | Derived2)[]
|
||||
|
@ -2797,7 +2797,7 @@ var x282: Array<Base> = [d1, d2] || [d1, d2];
|
|||
>d2 : Derived2
|
||||
|
||||
var x283: { [n: number]: Base; } = [d1, d2] || [d1, d2];
|
||||
>x283 : { [x: number]: Base; }
|
||||
>x283 : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>[d1, d2] || [d1, d2] : (Derived1 | Derived2)[]
|
||||
|
@ -2930,7 +2930,7 @@ var x292: Array<Base> = true ? [d1, d2] : [d1, d2];
|
|||
>d2 : Derived2
|
||||
|
||||
var x293: { [n: number]: Base; } = true ? [d1, d2] : [d1, d2];
|
||||
>x293 : { [x: number]: Base; }
|
||||
>x293 : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>true ? [d1, d2] : [d1, d2] : (Derived1 | Derived2)[]
|
||||
|
@ -3073,7 +3073,7 @@ var x304: Array<Base> = true ? undefined : [d1, d2];
|
|||
>d2 : Derived2
|
||||
|
||||
var x305: { [n: number]: Base; } = true ? undefined : [d1, d2];
|
||||
>x305 : { [x: number]: Base; }
|
||||
>x305 : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>true ? undefined : [d1, d2] : (Derived1 | Derived2)[]
|
||||
|
@ -3201,7 +3201,7 @@ var x316: Array<Base> = true ? [d1, d2] : undefined;
|
|||
>undefined : undefined
|
||||
|
||||
var x317: { [n: number]: Base; } = true ? [d1, d2] : undefined;
|
||||
>x317 : { [x: number]: Base; }
|
||||
>x317 : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>true ? [d1, d2] : undefined : (Derived1 | Derived2)[]
|
||||
|
@ -3337,12 +3337,12 @@ function x328(n: Array<Base>) { }; x328([d1, d2]);
|
|||
>d2 : Derived2
|
||||
|
||||
function x329(n: { [n: number]: Base; }) { }; x329([d1, d2]);
|
||||
>x329 : (n: { [x: number]: Base; }) => void
|
||||
>n : { [x: number]: Base; }
|
||||
>x329 : (n: { [n: number]: Base; }) => void
|
||||
>n : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>x329([d1, d2]) : void
|
||||
>x329 : (n: { [x: number]: Base; }) => void
|
||||
>x329 : (n: { [n: number]: Base; }) => void
|
||||
>[d1, d2] : (Derived1 | Derived2)[]
|
||||
>d1 : Derived1
|
||||
>d2 : Derived2
|
||||
|
@ -3493,14 +3493,14 @@ var x340 = (n: Array<Base>) => n; x340([d1, d2]);
|
|||
>d2 : Derived2
|
||||
|
||||
var x341 = (n: { [n: number]: Base; }) => n; x341([d1, d2]);
|
||||
>x341 : (n: { [x: number]: Base; }) => { [x: number]: Base; }
|
||||
>(n: { [n: number]: Base; }) => n : (n: { [x: number]: Base; }) => { [x: number]: Base; }
|
||||
>n : { [x: number]: Base; }
|
||||
>x341 : (n: { [n: number]: Base; }) => { [n: number]: Base; }
|
||||
>(n: { [n: number]: Base; }) => n : (n: { [n: number]: Base; }) => { [n: number]: Base; }
|
||||
>n : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>n : { [x: number]: Base; }
|
||||
>x341([d1, d2]) : { [x: number]: Base; }
|
||||
>x341 : (n: { [x: number]: Base; }) => { [x: number]: Base; }
|
||||
>n : { [n: number]: Base; }
|
||||
>x341([d1, d2]) : { [n: number]: Base; }
|
||||
>x341 : (n: { [n: number]: Base; }) => { [n: number]: Base; }
|
||||
>[d1, d2] : (Derived1 | Derived2)[]
|
||||
>d1 : Derived1
|
||||
>d2 : Derived2
|
||||
|
@ -3649,13 +3649,13 @@ var x352 = function(n: Array<Base>) { }; x352([d1, d2]);
|
|||
>d2 : Derived2
|
||||
|
||||
var x353 = function(n: { [n: number]: Base; }) { }; x353([d1, d2]);
|
||||
>x353 : (n: { [x: number]: Base; }) => void
|
||||
>function(n: { [n: number]: Base; }) { } : (n: { [x: number]: Base; }) => void
|
||||
>n : { [x: number]: Base; }
|
||||
>x353 : (n: { [n: number]: Base; }) => void
|
||||
>function(n: { [n: number]: Base; }) { } : (n: { [n: number]: Base; }) => void
|
||||
>n : { [n: number]: Base; }
|
||||
>n : number
|
||||
>Base : Base
|
||||
>x353([d1, d2]) : void
|
||||
>x353 : (n: { [x: number]: Base; }) => void
|
||||
>x353 : (n: { [n: number]: Base; }) => void
|
||||
>[d1, d2] : (Derived1 | Derived2)[]
|
||||
>d1 : Derived1
|
||||
>d2 : Derived2
|
||||
|
|
|
@ -8,16 +8,16 @@ class BaseCollection2<TItem extends CollectionItem2> {
|
|||
>CollectionItem2 : CollectionItem2
|
||||
|
||||
_itemsByKey: { [key: string]: TItem; };
|
||||
>_itemsByKey : { [x: string]: TItem; }
|
||||
>_itemsByKey : { [key: string]: TItem; }
|
||||
>key : string
|
||||
>TItem : TItem
|
||||
|
||||
constructor() {
|
||||
this._itemsByKey = {};
|
||||
>this._itemsByKey = {} : { [x: string]: undefined; }
|
||||
>this._itemsByKey : { [x: string]: TItem; }
|
||||
>this._itemsByKey : { [key: string]: TItem; }
|
||||
>this : BaseCollection2<TItem>
|
||||
>_itemsByKey : { [x: string]: TItem; }
|
||||
>_itemsByKey : { [key: string]: TItem; }
|
||||
>{} : { [x: string]: undefined; }
|
||||
}
|
||||
}
|
||||
|
@ -35,9 +35,9 @@ class DataView2 extends BaseCollection2<CollectionItem2> {
|
|||
this._itemsByKey['dummy'] = item;
|
||||
>this._itemsByKey['dummy'] = item : CollectionItem2
|
||||
>this._itemsByKey['dummy'] : CollectionItem2
|
||||
>this._itemsByKey : { [x: string]: CollectionItem2; }
|
||||
>this._itemsByKey : { [key: string]: CollectionItem2; }
|
||||
>this : DataView2
|
||||
>_itemsByKey : { [x: string]: CollectionItem2; }
|
||||
>_itemsByKey : { [key: string]: CollectionItem2; }
|
||||
>item : CollectionItem2
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,19 +4,19 @@ class LazyArray<T> {
|
|||
>T : T
|
||||
|
||||
private objects = <{ [objectId: string]: T; }>{};
|
||||
>objects : { [x: string]: T; }
|
||||
><{ [objectId: string]: T; }>{} : { [x: string]: T; }
|
||||
>objects : { [objectId: string]: T; }
|
||||
><{ [objectId: string]: T; }>{} : { [objectId: string]: T; }
|
||||
>objectId : string
|
||||
>T : T
|
||||
>{} : { [x: string]: undefined; }
|
||||
|
||||
array() {
|
||||
>array : () => { [x: string]: T; }
|
||||
>array : () => { [objectId: string]: T; }
|
||||
|
||||
return this.objects;
|
||||
>this.objects : { [x: string]: T; }
|
||||
>this.objects : { [objectId: string]: T; }
|
||||
>this : LazyArray<T>
|
||||
>objects : { [x: string]: T; }
|
||||
>objects : { [objectId: string]: T; }
|
||||
}
|
||||
}
|
||||
var lazyArray = new LazyArray<string>();
|
||||
|
@ -27,8 +27,8 @@ var lazyArray = new LazyArray<string>();
|
|||
var value: string = lazyArray.array()["test"]; // used to be an error
|
||||
>value : string
|
||||
>lazyArray.array()["test"] : string
|
||||
>lazyArray.array() : { [x: string]: string; }
|
||||
>lazyArray.array : () => { [x: string]: string; }
|
||||
>lazyArray.array() : { [objectId: string]: string; }
|
||||
>lazyArray.array : () => { [objectId: string]: string; }
|
||||
>lazyArray : LazyArray<string>
|
||||
>array : () => { [x: string]: string; }
|
||||
>array : () => { [objectId: string]: string; }
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ export class Collection<TItem extends CollectionItem> {
|
|||
>CollectionItem : CollectionItem
|
||||
|
||||
_itemsByKey: { [key: string]: TItem; };
|
||||
>_itemsByKey : { [x: string]: TItem; }
|
||||
>_itemsByKey : { [key: string]: TItem; }
|
||||
>key : string
|
||||
>TItem : TItem
|
||||
}
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
=== tests/cases/compiler/indexSignaturesInferentialTyping.ts ===
|
||||
function foo<T>(items: { [index: number]: T }): T { return undefined; }
|
||||
>foo : <T>(items: { [x: number]: T; }) => T
|
||||
>foo : <T>(items: { [index: number]: T; }) => T
|
||||
>T : T
|
||||
>items : { [x: number]: T; }
|
||||
>items : { [index: number]: T; }
|
||||
>index : number
|
||||
>T : T
|
||||
>T : T
|
||||
>undefined : undefined
|
||||
|
||||
function bar<T>(items: { [index: string]: T }): T { return undefined; }
|
||||
>bar : <T>(items: { [x: string]: T; }) => T
|
||||
>bar : <T>(items: { [index: string]: T; }) => T
|
||||
>T : T
|
||||
>items : { [x: string]: T; }
|
||||
>items : { [index: string]: T; }
|
||||
>index : string
|
||||
>T : T
|
||||
>T : T
|
||||
|
@ -20,13 +20,13 @@ function bar<T>(items: { [index: string]: T }): T { return undefined; }
|
|||
var x1 = foo({ 0: 0, 1: 1 }); // type should be number
|
||||
>x1 : number
|
||||
>foo({ 0: 0, 1: 1 }) : number
|
||||
>foo : <T>(items: { [x: number]: T; }) => T
|
||||
>foo : <T>(items: { [index: number]: T; }) => T
|
||||
>{ 0: 0, 1: 1 } : { [x: number]: number; 0: number; 1: number; }
|
||||
|
||||
var x2 = foo({ zero: 0, one: 1 });
|
||||
>x2 : any
|
||||
>foo({ zero: 0, one: 1 }) : any
|
||||
>foo : <T>(items: { [x: number]: T; }) => T
|
||||
>foo : <T>(items: { [index: number]: T; }) => T
|
||||
>{ zero: 0, one: 1 } : { [x: number]: undefined; zero: number; one: number; }
|
||||
>zero : number
|
||||
>one : number
|
||||
|
@ -34,13 +34,13 @@ var x2 = foo({ zero: 0, one: 1 });
|
|||
var x3 = bar({ 0: 0, 1: 1 });
|
||||
>x3 : number
|
||||
>bar({ 0: 0, 1: 1 }) : number
|
||||
>bar : <T>(items: { [x: string]: T; }) => T
|
||||
>bar : <T>(items: { [index: string]: T; }) => T
|
||||
>{ 0: 0, 1: 1 } : { [x: string]: number; 0: number; 1: number; }
|
||||
|
||||
var x4 = bar({ zero: 0, one: 1 }); // type should be number
|
||||
>x4 : number
|
||||
>bar({ zero: 0, one: 1 }) : number
|
||||
>bar : <T>(items: { [x: string]: T; }) => T
|
||||
>bar : <T>(items: { [index: string]: T; }) => T
|
||||
>{ zero: 0, one: 1 } : { [x: string]: number; zero: number; one: number; }
|
||||
>zero : number
|
||||
>one : number
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
tests/cases/compiler/indexerAssignability.ts(5,1): error TS2322: Type '{ [x: number]: string; }' is not assignable to type '{ [x: string]: string; }'.
|
||||
Index signature is missing in type '{ [x: number]: string; }'.
|
||||
tests/cases/compiler/indexerAssignability.ts(6,1): error TS2322: Type '{}' is not assignable to type '{ [x: string]: string; }'.
|
||||
tests/cases/compiler/indexerAssignability.ts(5,1): error TS2322: Type '{ [n: number]: string; }' is not assignable to type '{ [s: string]: string; }'.
|
||||
Index signature is missing in type '{ [n: number]: string; }'.
|
||||
tests/cases/compiler/indexerAssignability.ts(6,1): error TS2322: Type '{}' is not assignable to type '{ [s: string]: string; }'.
|
||||
Index signature is missing in type '{}'.
|
||||
tests/cases/compiler/indexerAssignability.ts(8,1): error TS2322: Type '{}' is not assignable to type '{ [x: number]: string; }'.
|
||||
tests/cases/compiler/indexerAssignability.ts(8,1): error TS2322: Type '{}' is not assignable to type '{ [n: number]: string; }'.
|
||||
Index signature is missing in type '{}'.
|
||||
|
||||
|
||||
|
@ -13,16 +13,16 @@ tests/cases/compiler/indexerAssignability.ts(8,1): error TS2322: Type '{}' is no
|
|||
|
||||
a = b;
|
||||
~
|
||||
!!! error TS2322: Type '{ [x: number]: string; }' is not assignable to type '{ [x: string]: string; }'.
|
||||
!!! error TS2322: Index signature is missing in type '{ [x: number]: string; }'.
|
||||
!!! error TS2322: Type '{ [n: number]: string; }' is not assignable to type '{ [s: string]: string; }'.
|
||||
!!! error TS2322: Index signature is missing in type '{ [n: number]: string; }'.
|
||||
a = c;
|
||||
~
|
||||
!!! error TS2322: Type '{}' is not assignable to type '{ [x: string]: string; }'.
|
||||
!!! error TS2322: Type '{}' is not assignable to type '{ [s: string]: string; }'.
|
||||
!!! error TS2322: Index signature is missing in type '{}'.
|
||||
b = a;
|
||||
b = c;
|
||||
~
|
||||
!!! error TS2322: Type '{}' is not assignable to type '{ [x: number]: string; }'.
|
||||
!!! error TS2322: Type '{}' is not assignable to type '{ [n: number]: string; }'.
|
||||
!!! error TS2322: Index signature is missing in type '{}'.
|
||||
c = a;
|
||||
c = b;
|
|
@ -3,7 +3,7 @@ interface f {
|
|||
>f : f
|
||||
|
||||
groupBy<T>(): { [key: string]: T[]; };
|
||||
>groupBy : <T>() => { [x: string]: T[]; }
|
||||
>groupBy : <T>() => { [key: string]: T[]; }
|
||||
>T : T
|
||||
>key : string
|
||||
>T : T
|
||||
|
@ -13,17 +13,17 @@ var a: f;
|
|||
>f : f
|
||||
|
||||
var r = a.groupBy();
|
||||
>r : { [x: string]: {}[]; }
|
||||
>a.groupBy() : { [x: string]: {}[]; }
|
||||
>a.groupBy : <T>() => { [x: string]: T[]; }
|
||||
>r : { [key: string]: {}[]; }
|
||||
>a.groupBy() : { [key: string]: {}[]; }
|
||||
>a.groupBy : <T>() => { [key: string]: T[]; }
|
||||
>a : f
|
||||
>groupBy : <T>() => { [x: string]: T[]; }
|
||||
>groupBy : <T>() => { [key: string]: T[]; }
|
||||
|
||||
class c {
|
||||
>c : c
|
||||
|
||||
groupBy<T>(): { [key: string]: T[]; } {
|
||||
>groupBy : <T>() => { [x: string]: T[]; }
|
||||
>groupBy : <T>() => { [key: string]: T[]; }
|
||||
>T : T
|
||||
>key : string
|
||||
>T : T
|
||||
|
@ -36,9 +36,9 @@ var a2: c;
|
|||
>c : c
|
||||
|
||||
var r2 = a2.groupBy();
|
||||
>r2 : { [x: string]: {}[]; }
|
||||
>a2.groupBy() : { [x: string]: {}[]; }
|
||||
>a2.groupBy : <T>() => { [x: string]: T[]; }
|
||||
>r2 : { [key: string]: {}[]; }
|
||||
>a2.groupBy() : { [key: string]: {}[]; }
|
||||
>a2.groupBy : <T>() => { [key: string]: T[]; }
|
||||
>a2 : c
|
||||
>groupBy : <T>() => { [x: string]: T[]; }
|
||||
>groupBy : <T>() => { [key: string]: T[]; }
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ function then(x) {
|
|||
>x : any
|
||||
|
||||
var match: { [index: number]: string; }
|
||||
>match : { [x: number]: string; }
|
||||
>match : { [index: number]: string; }
|
||||
>index : number
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/compiler/numericIndexerConstraint2.ts(4,1): error TS2322: Type '{ one: number; }' is not assignable to type '{ [x: string]: Foo; }'.
|
||||
tests/cases/compiler/numericIndexerConstraint2.ts(4,1): error TS2322: Type '{ one: number; }' is not assignable to type '{ [index: string]: Foo; }'.
|
||||
Index signature is missing in type '{ one: number; }'.
|
||||
|
||||
|
||||
|
@ -8,5 +8,5 @@ tests/cases/compiler/numericIndexerConstraint2.ts(4,1): error TS2322: Type '{ on
|
|||
var a: { one: number; };
|
||||
x = a;
|
||||
~
|
||||
!!! error TS2322: Type '{ one: number; }' is not assignable to type '{ [x: string]: Foo; }'.
|
||||
!!! error TS2322: Type '{ one: number; }' is not assignable to type '{ [index: string]: Foo; }'.
|
||||
!!! error TS2322: Index signature is missing in type '{ one: number; }'.
|
|
@ -15,7 +15,7 @@ class B extends A {
|
|||
}
|
||||
|
||||
var x: {
|
||||
>x : { [x: number]: A; }
|
||||
>x : { [idx: number]: A; }
|
||||
|
||||
[idx: number]: A;
|
||||
>idx : number
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/compiler/numericIndexerConstraint5.ts(2,5): error TS2322: Type '{ 0: Date; name: string; }' is not assignable to type '{ [x: number]: string; }'.
|
||||
tests/cases/compiler/numericIndexerConstraint5.ts(2,5): error TS2322: Type '{ 0: Date; name: string; }' is not assignable to type '{ [name: number]: string; }'.
|
||||
Index signature is missing in type '{ 0: Date; name: string; }'.
|
||||
|
||||
|
||||
|
@ -6,5 +6,5 @@ tests/cases/compiler/numericIndexerConstraint5.ts(2,5): error TS2322: Type '{ 0:
|
|||
var x = { name: "x", 0: new Date() };
|
||||
var z: { [name: number]: string } = x;
|
||||
~
|
||||
!!! error TS2322: Type '{ 0: Date; name: string; }' is not assignable to type '{ [x: number]: string; }'.
|
||||
!!! error TS2322: Type '{ 0: Date; name: string; }' is not assignable to type '{ [name: number]: string; }'.
|
||||
!!! error TS2322: Index signature is missing in type '{ 0: Date; name: string; }'.
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/compiler/objectLiteralIndexerErrors.ts(13,5): error TS2322: Type '{ [x: string]: A; [x: number]: A; 0: A; x: B; }' is not assignable to type '{ [x: string]: A; [x: number]: B; }'.
|
||||
tests/cases/compiler/objectLiteralIndexerErrors.ts(13,5): error TS2322: Type '{ [x: string]: A; [x: number]: A; 0: A; x: B; }' is not assignable to type '{ [s: string]: A; [n: number]: B; }'.
|
||||
Index signatures are incompatible.
|
||||
Type 'A' is not assignable to type 'B'.
|
||||
|
||||
|
@ -18,7 +18,7 @@ tests/cases/compiler/objectLiteralIndexerErrors.ts(13,5): error TS2322: Type '{
|
|||
|
||||
var o1: { [s: string]: A;[n: number]: B; } = { x: b, 0: a }; // both indexers are A
|
||||
~~
|
||||
!!! error TS2322: Type '{ [x: string]: A; [x: number]: A; 0: A; x: B; }' is not assignable to type '{ [x: string]: A; [x: number]: B; }'.
|
||||
!!! error TS2322: Type '{ [x: string]: A; [x: number]: A; 0: A; x: B; }' is not assignable to type '{ [s: string]: A; [n: number]: B; }'.
|
||||
!!! error TS2322: Index signatures are incompatible.
|
||||
!!! error TS2322: Type 'A' is not assignable to type 'B'.
|
||||
o1 = { x: c, 0: a }; // string indexer is any, number indexer is A
|
|
@ -26,7 +26,7 @@ var c: any;
|
|||
>c : any
|
||||
|
||||
var o1: { [s: string]: A;[n: number]: B; } = { x: a, 0: b }; // string indexer is A, number indexer is B
|
||||
>o1 : { [x: string]: A; [x: number]: B; }
|
||||
>o1 : { [s: string]: A; [n: number]: B; }
|
||||
>s : string
|
||||
>A : A
|
||||
>n : number
|
||||
|
@ -38,7 +38,7 @@ var o1: { [s: string]: A;[n: number]: B; } = { x: a, 0: b }; // string indexer i
|
|||
|
||||
o1 = { x: b, 0: c }; // both indexers are any
|
||||
>o1 = { x: b, 0: c } : { [x: string]: any; [x: number]: any; 0: any; x: B; }
|
||||
>o1 : { [x: string]: A; [x: number]: B; }
|
||||
>o1 : { [s: string]: A; [n: number]: B; }
|
||||
>{ x: b, 0: c } : { [x: string]: any; [x: number]: any; 0: any; x: B; }
|
||||
>x : B
|
||||
>b : B
|
||||
|
@ -46,7 +46,7 @@ o1 = { x: b, 0: c }; // both indexers are any
|
|||
|
||||
o1 = { x: c, 0: b }; // string indexer is any, number indexer is B
|
||||
>o1 = { x: c, 0: b } : { [x: string]: any; [x: number]: B; 0: B; x: any; }
|
||||
>o1 : { [x: string]: A; [x: number]: B; }
|
||||
>o1 : { [s: string]: A; [n: number]: B; }
|
||||
>{ x: c, 0: b } : { [x: string]: any; [x: number]: B; 0: B; x: any; }
|
||||
>x : any
|
||||
>c : any
|
||||
|
|
|
@ -3,7 +3,7 @@ interface I {
|
|||
>I : I
|
||||
|
||||
w: {
|
||||
>w : { (): boolean; [x: string]: { x: any; y: any; }; [x: number]: { x: any; y: any; }; z: I; }
|
||||
>w : { (): boolean; [s: string]: { x: any; y: any; }; [n: number]: { x: any; y: any; }; z: I; }
|
||||
|
||||
z: I;
|
||||
>z : I
|
||||
|
|
|
@ -8,7 +8,7 @@ export class FilterManager {
|
|||
>IFilterProvider : IFilterProvider
|
||||
|
||||
private _filterProviders2: { [index: number]: IFilterProvider; };
|
||||
>_filterProviders2 : { [x: number]: IFilterProvider; }
|
||||
>_filterProviders2 : { [index: number]: IFilterProvider; }
|
||||
>index : number
|
||||
>IFilterProvider : IFilterProvider
|
||||
|
||||
|
|
|
@ -135,21 +135,21 @@ var j2 = new j2(j2);
|
|||
|
||||
// Indexers
|
||||
var k: { [n: number]: typeof k;[s: string]: typeof k };
|
||||
>k : { [x: string]: any; [x: number]: any; }
|
||||
>k : { [s: string]: any; [n: number]: any; }
|
||||
>n : number
|
||||
>k : { [x: string]: any; [x: number]: any; }
|
||||
>k : { [s: string]: any; [n: number]: any; }
|
||||
>s : string
|
||||
>k : { [x: string]: any; [x: number]: any; }
|
||||
>k : { [s: string]: any; [n: number]: any; }
|
||||
|
||||
var k = k[0];
|
||||
>k : { [x: string]: any; [x: number]: any; }
|
||||
>k[0] : { [x: string]: any; [x: number]: any; }
|
||||
>k : { [x: string]: any; [x: number]: any; }
|
||||
>k : { [s: string]: any; [n: number]: any; }
|
||||
>k[0] : { [s: string]: any; [n: number]: any; }
|
||||
>k : { [s: string]: any; [n: number]: any; }
|
||||
|
||||
var k = k[''];
|
||||
>k : { [x: string]: any; [x: number]: any; }
|
||||
>k[''] : { [x: string]: any; [x: number]: any; }
|
||||
>k : { [x: string]: any; [x: number]: any; }
|
||||
>k : { [s: string]: any; [n: number]: any; }
|
||||
>k[''] : { [s: string]: any; [n: number]: any; }
|
||||
>k : { [s: string]: any; [n: number]: any; }
|
||||
|
||||
// Hybrid - contains type literals as well as type arguments
|
||||
// These two are recursive
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
tests/cases/compiler/stringIndexerAssignments1.ts(4,1): error TS2322: Type '{ one: string; }' is not assignable to type '{ [x: string]: string; one: string; }'.
|
||||
tests/cases/compiler/stringIndexerAssignments1.ts(4,1): error TS2322: Type '{ one: string; }' is not assignable to type '{ [index: string]: string; one: string; }'.
|
||||
Index signature is missing in type '{ one: string; }'.
|
||||
tests/cases/compiler/stringIndexerAssignments1.ts(5,1): error TS2322: Type '{ one: number; two: string; }' is not assignable to type '{ [x: string]: string; one: string; }'.
|
||||
tests/cases/compiler/stringIndexerAssignments1.ts(5,1): error TS2322: Type '{ one: number; two: string; }' is not assignable to type '{ [index: string]: string; one: string; }'.
|
||||
Types of property 'one' are incompatible.
|
||||
Type 'number' is not assignable to type 'string'.
|
||||
|
||||
|
@ -11,11 +11,11 @@ tests/cases/compiler/stringIndexerAssignments1.ts(5,1): error TS2322: Type '{ on
|
|||
var b: { one: number; two: string; };
|
||||
x = a;
|
||||
~
|
||||
!!! error TS2322: Type '{ one: string; }' is not assignable to type '{ [x: string]: string; one: string; }'.
|
||||
!!! error TS2322: Type '{ one: string; }' is not assignable to type '{ [index: string]: string; one: string; }'.
|
||||
!!! error TS2322: Index signature is missing in type '{ one: string; }'.
|
||||
x = b; // error
|
||||
~
|
||||
!!! error TS2322: Type '{ one: number; two: string; }' is not assignable to type '{ [x: string]: string; one: string; }'.
|
||||
!!! error TS2322: Type '{ one: number; two: string; }' is not assignable to type '{ [index: string]: string; one: string; }'.
|
||||
!!! error TS2322: Types of property 'one' are incompatible.
|
||||
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
||||
|
|
@ -10,7 +10,7 @@ tests/cases/compiler/typeName1.ts(13,5): error TS2322: Type 'number' is not assi
|
|||
tests/cases/compiler/typeName1.ts(14,5): error TS2322: Type 'number' is not assignable to type '{ z: number; f: { (n: number): string; (s: string): number; }; }'.
|
||||
Property 'z' is missing in type 'Number'.
|
||||
tests/cases/compiler/typeName1.ts(15,5): error TS2322: Type 'number' is not assignable to type '(s: string) => boolean'.
|
||||
tests/cases/compiler/typeName1.ts(16,5): error TS2322: Type 'number' is not assignable to type '{ (): boolean; [x: string]: { x: any; y: any; }; [x: number]: { x: any; y: any; }; z: I; }'.
|
||||
tests/cases/compiler/typeName1.ts(16,5): error TS2322: Type 'number' is not assignable to type '{ (): boolean; [s: string]: { x: any; y: any; }; [n: number]: { x: any; y: any; }; z: I; }'.
|
||||
Property 'z' is missing in type 'Number'.
|
||||
tests/cases/compiler/typeName1.ts(16,10): error TS2411: Property 'z' of type 'I' is not assignable to string index type '{ x: any; y: any; }'.
|
||||
tests/cases/compiler/typeName1.ts(17,5): error TS2322: Type 'number' is not assignable to type 'I'.
|
||||
|
@ -19,7 +19,7 @@ tests/cases/compiler/typeName1.ts(18,5): error TS2322: Type 'number' is not assi
|
|||
Property 'length' is missing in type 'Number'.
|
||||
tests/cases/compiler/typeName1.ts(19,5): error TS2322: Type 'number' is not assignable to type '{ z: I; x: boolean; }[][]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
tests/cases/compiler/typeName1.ts(20,5): error TS2322: Type 'number' is not assignable to type '{ z: I; x: boolean; y: (s: string) => boolean; w: { (): boolean; [x: string]: { x: any; y: any; }; [x: number]: { x: any; y: any; }; z: I; }; }[][]'.
|
||||
tests/cases/compiler/typeName1.ts(20,5): error TS2322: Type 'number' is not assignable to type '{ z: I; x: boolean; y: (s: string) => boolean; w: { (): boolean; [s: string]: { x: any; y: any; }; [n: number]: { x: any; y: any; }; z: I; }; }[][]'.
|
||||
Property 'length' is missing in type 'Number'.
|
||||
tests/cases/compiler/typeName1.ts(20,50): error TS2411: Property 'z' of type 'I' is not assignable to string index type '{ x: any; y: any; }'.
|
||||
tests/cases/compiler/typeName1.ts(21,5): error TS2322: Type 'number' is not assignable to type '{ (): {}; new (): number; new (n: number): number; x: string; w: { y: number; }; }'.
|
||||
|
@ -66,7 +66,7 @@ tests/cases/compiler/typeName1.ts(23,5): error TS2322: Type 'typeof C' is not as
|
|||
!!! error TS2322: Type 'number' is not assignable to type '(s: string) => boolean'.
|
||||
var x8:{ z:I;[s:string]:{ x; y; };[n:number]:{x; y;};():boolean; }=3;
|
||||
~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ (): boolean; [x: string]: { x: any; y: any; }; [x: number]: { x: any; y: any; }; z: I; }'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ (): boolean; [s: string]: { x: any; y: any; }; [n: number]: { x: any; y: any; }; z: I; }'.
|
||||
!!! error TS2322: Property 'z' is missing in type 'Number'.
|
||||
~~~~
|
||||
!!! error TS2411: Property 'z' of type 'I' is not assignable to string index type '{ x: any; y: any; }'.
|
||||
|
@ -84,7 +84,7 @@ tests/cases/compiler/typeName1.ts(23,5): error TS2322: Type 'typeof C' is not as
|
|||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
var x12:{z:I;x:boolean;y:(s:string)=>boolean;w:{ z:I;[s:string]:{ x; y; };[n:number]:{x; y;};():boolean; };}[][]=3;
|
||||
~~~
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ z: I; x: boolean; y: (s: string) => boolean; w: { (): boolean; [x: string]: { x: any; y: any; }; [x: number]: { x: any; y: any; }; z: I; }; }[][]'.
|
||||
!!! error TS2322: Type 'number' is not assignable to type '{ z: I; x: boolean; y: (s: string) => boolean; w: { (): boolean; [s: string]: { x: any; y: any; }; [n: number]: { x: any; y: any; }; z: I; }; }[][]'.
|
||||
!!! error TS2322: Property 'length' is missing in type 'Number'.
|
||||
~~~~
|
||||
!!! error TS2411: Property 'z' of type 'I' is not assignable to string index type '{ x: any; y: any; }'.
|
||||
|
|
|
@ -10,7 +10,7 @@ var anyVar: number;
|
|||
// U has a string index signature of a union type of the types of the string index signatures from each type in U.
|
||||
|
||||
var unionOfDifferentReturnType: { [a: string]: number; } | { [a: string]: Date; };
|
||||
>unionOfDifferentReturnType : { [x: string]: number; } | { [x: string]: Date; }
|
||||
>unionOfDifferentReturnType : { [a: string]: number; } | { [a: string]: Date; }
|
||||
>a : string
|
||||
>a : string
|
||||
>Date : Date
|
||||
|
@ -19,34 +19,34 @@ numOrDate = unionOfDifferentReturnType["hello"]; // number | Date
|
|||
>numOrDate = unionOfDifferentReturnType["hello"] : number | Date
|
||||
>numOrDate : number | Date
|
||||
>unionOfDifferentReturnType["hello"] : number | Date
|
||||
>unionOfDifferentReturnType : { [x: string]: number; } | { [x: string]: Date; }
|
||||
>unionOfDifferentReturnType : { [a: string]: number; } | { [a: string]: Date; }
|
||||
|
||||
numOrDate = unionOfDifferentReturnType[10]; // number | Date
|
||||
>numOrDate = unionOfDifferentReturnType[10] : number | Date
|
||||
>numOrDate : number | Date
|
||||
>unionOfDifferentReturnType[10] : number | Date
|
||||
>unionOfDifferentReturnType : { [x: string]: number; } | { [x: string]: Date; }
|
||||
>unionOfDifferentReturnType : { [a: string]: number; } | { [a: string]: Date; }
|
||||
|
||||
var unionOfTypesWithAndWithoutStringSignature: { [a: string]: number; } | boolean;
|
||||
>unionOfTypesWithAndWithoutStringSignature : boolean | { [x: string]: number; }
|
||||
>unionOfTypesWithAndWithoutStringSignature : boolean | { [a: string]: number; }
|
||||
>a : string
|
||||
|
||||
anyVar = unionOfTypesWithAndWithoutStringSignature["hello"]; // any
|
||||
>anyVar = unionOfTypesWithAndWithoutStringSignature["hello"] : any
|
||||
>anyVar : number
|
||||
>unionOfTypesWithAndWithoutStringSignature["hello"] : any
|
||||
>unionOfTypesWithAndWithoutStringSignature : boolean | { [x: string]: number; }
|
||||
>unionOfTypesWithAndWithoutStringSignature : boolean | { [a: string]: number; }
|
||||
|
||||
anyVar = unionOfTypesWithAndWithoutStringSignature[10]; // any
|
||||
>anyVar = unionOfTypesWithAndWithoutStringSignature[10] : any
|
||||
>anyVar : number
|
||||
>unionOfTypesWithAndWithoutStringSignature[10] : any
|
||||
>unionOfTypesWithAndWithoutStringSignature : boolean | { [x: string]: number; }
|
||||
>unionOfTypesWithAndWithoutStringSignature : boolean | { [a: string]: number; }
|
||||
|
||||
// If each type in U has a numeric index signature,
|
||||
// U has a numeric index signature of a union type of the types of the numeric index signatures from each type in U.
|
||||
var unionOfDifferentReturnType1: { [a: number]: number; } | { [a: number]: Date; };
|
||||
>unionOfDifferentReturnType1 : { [x: number]: number; } | { [x: number]: Date; }
|
||||
>unionOfDifferentReturnType1 : { [a: number]: number; } | { [a: number]: Date; }
|
||||
>a : number
|
||||
>a : number
|
||||
>Date : Date
|
||||
|
@ -55,27 +55,27 @@ numOrDate = unionOfDifferentReturnType1["hello"]; // any
|
|||
>numOrDate = unionOfDifferentReturnType1["hello"] : any
|
||||
>numOrDate : number | Date
|
||||
>unionOfDifferentReturnType1["hello"] : any
|
||||
>unionOfDifferentReturnType1 : { [x: number]: number; } | { [x: number]: Date; }
|
||||
>unionOfDifferentReturnType1 : { [a: number]: number; } | { [a: number]: Date; }
|
||||
|
||||
numOrDate = unionOfDifferentReturnType1[10]; // number | Date
|
||||
>numOrDate = unionOfDifferentReturnType1[10] : number | Date
|
||||
>numOrDate : number | Date
|
||||
>unionOfDifferentReturnType1[10] : number | Date
|
||||
>unionOfDifferentReturnType1 : { [x: number]: number; } | { [x: number]: Date; }
|
||||
>unionOfDifferentReturnType1 : { [a: number]: number; } | { [a: number]: Date; }
|
||||
|
||||
var unionOfTypesWithAndWithoutStringSignature1: { [a: number]: number; } | boolean;
|
||||
>unionOfTypesWithAndWithoutStringSignature1 : boolean | { [x: number]: number; }
|
||||
>unionOfTypesWithAndWithoutStringSignature1 : boolean | { [a: number]: number; }
|
||||
>a : number
|
||||
|
||||
anyVar = unionOfTypesWithAndWithoutStringSignature1["hello"]; // any
|
||||
>anyVar = unionOfTypesWithAndWithoutStringSignature1["hello"] : any
|
||||
>anyVar : number
|
||||
>unionOfTypesWithAndWithoutStringSignature1["hello"] : any
|
||||
>unionOfTypesWithAndWithoutStringSignature1 : boolean | { [x: number]: number; }
|
||||
>unionOfTypesWithAndWithoutStringSignature1 : boolean | { [a: number]: number; }
|
||||
|
||||
anyVar = unionOfTypesWithAndWithoutStringSignature1[10]; // any
|
||||
>anyVar = unionOfTypesWithAndWithoutStringSignature1[10] : any
|
||||
>anyVar : number
|
||||
>unionOfTypesWithAndWithoutStringSignature1[10] : any
|
||||
>unionOfTypesWithAndWithoutStringSignature1 : boolean | { [x: number]: number; }
|
||||
>unionOfTypesWithAndWithoutStringSignature1 : boolean | { [a: number]: number; }
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ complicatedArrayVar.push({ x: 30, y : 'hello world' });
|
|||
>y : string
|
||||
|
||||
var n1: { [s: string]: number; };
|
||||
>n1 : { [x: string]: number; }
|
||||
>n1 : { [s: string]: number; }
|
||||
>s : string
|
||||
|
||||
var c : {
|
||||
|
|
Loading…
Reference in a new issue