From 5f7bc51a1064b6dd901ba12c749121d9da69082b Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Tue, 21 Jul 2015 11:20:29 -0700 Subject: [PATCH] Accepting new baselines --- tests/baselines/reference/arrayCast.errors.txt | 4 ++-- .../reference/arrayLiteralTypeInference.errors.txt | 8 ++++---- tests/baselines/reference/arrayLiterals.errors.txt | 4 ++-- .../reference/assignmentCompatBug2.errors.txt | 12 ++++++------ .../reference/assignmentCompatBug5.errors.txt | 4 ++-- .../reference/contextualTyping12.errors.txt | 4 ++-- .../reference/contextualTyping17.errors.txt | 4 ++-- .../baselines/reference/contextualTyping2.errors.txt | 4 ++-- .../reference/contextualTyping20.errors.txt | 4 ++-- .../baselines/reference/contextualTyping4.errors.txt | 4 ++-- .../baselines/reference/contextualTyping9.errors.txt | 4 ++-- ...esHiddenBaseCallViaSuperPropertyAccess.errors.txt | 4 ++-- .../destructuringParameterProperties5.errors.txt | 4 ++-- .../baselines/reference/incompatibleTypes.errors.txt | 8 ++++---- ...logicalOrExpressionIsContextuallyTyped.errors.txt | 4 ++-- .../objectLitStructuralTypeMismatch.errors.txt | 4 ++-- ...jectLiteralFunctionArgContextualTyping.errors.txt | 8 ++++---- ...ectLiteralFunctionArgContextualTyping2.errors.txt | 8 ++++---- ...eralShorthandPropertiesAssignmentError.errors.txt | 4 ++-- ...esAssignmentErrorFromMissingIdentifier.errors.txt | 4 ++-- .../orderMattersForSignatureGroupIdentity.errors.txt | 8 ++++---- .../baselines/reference/switchStatements.errors.txt | 4 ++-- .../baselines/reference/symbolProperty21.errors.txt | 4 ++-- ...edTemplateStringsTypeArgumentInference.errors.txt | 4 ++-- ...emplateStringsTypeArgumentInferenceES6.errors.txt | 4 ++-- .../baselines/reference/typeArgInference2.errors.txt | 4 ++-- .../reference/typeArgumentInference.errors.txt | 8 ++++---- ...peArgumentInferenceConstructSignatures.errors.txt | 8 ++++---- .../typeArgumentInferenceWithConstraints.errors.txt | 8 ++++---- tests/baselines/reference/typeInfer1.errors.txt | 4 ++-- tests/baselines/reference/typeMatch2.errors.txt | 12 ++++++------ 31 files changed, 86 insertions(+), 86 deletions(-) diff --git a/tests/baselines/reference/arrayCast.errors.txt b/tests/baselines/reference/arrayCast.errors.txt index 84ba7fd8b3f..82b4b856a97 100644 --- a/tests/baselines/reference/arrayCast.errors.txt +++ b/tests/baselines/reference/arrayCast.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/arrayCast.ts(3,1): error TS2352: Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other. Type '{ foo: string; }' is not assignable to type '{ id: number; }'. - Object literal may only specify known properties and 'foo' does not exist in type '{ id: number; }'. + Object literal may only specify known properties, and 'foo' does not exist in type '{ id: number; }'. ==== tests/cases/compiler/arrayCast.ts (1 errors) ==== @@ -10,7 +10,7 @@ tests/cases/compiler/arrayCast.ts(3,1): error TS2352: Neither type '{ foo: strin ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2352: Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other. !!! error TS2352: Type '{ foo: string; }' is not assignable to type '{ id: number; }'. -!!! error TS2352: Object literal may only specify known properties and 'foo' does not exist in type '{ id: number; }'. +!!! error TS2352: Object literal may only specify known properties, and 'foo' does not exist in type '{ id: number; }'. // Should succeed, as the {} element causes the type of the array to be {}[] <{ id: number; }[]>[{ foo: "s" }, {}]; \ No newline at end of file diff --git a/tests/baselines/reference/arrayLiteralTypeInference.errors.txt b/tests/baselines/reference/arrayLiteralTypeInference.errors.txt index 65334ee9b95..105375f2e74 100644 --- a/tests/baselines/reference/arrayLiteralTypeInference.errors.txt +++ b/tests/baselines/reference/arrayLiteralTypeInference.errors.txt @@ -1,11 +1,11 @@ tests/cases/compiler/arrayLiteralTypeInference.ts(13,5): error TS2322: Type '({ id: number; trueness: boolean; } | { id: number; name: string; })[]' is not assignable to type 'Action[]'. Type '{ id: number; trueness: boolean; } | { id: number; name: string; }' is not assignable to type 'Action'. Type '{ id: number; trueness: boolean; }' is not assignable to type 'Action'. - Object literal may only specify known properties and 'trueness' does not exist in type 'Action'. + Object literal may only specify known properties, and 'trueness' does not exist in type 'Action'. tests/cases/compiler/arrayLiteralTypeInference.ts(29,5): error TS2322: Type '({ id: number; trueness: boolean; } | { id: number; name: string; })[]' is not assignable to type '{ id: number; }[]'. Type '{ id: number; trueness: boolean; } | { id: number; name: string; }' is not assignable to type '{ id: number; }'. Type '{ id: number; trueness: boolean; }' is not assignable to type '{ id: number; }'. - Object literal may only specify known properties and 'trueness' does not exist in type '{ id: number; }'. + Object literal may only specify known properties, and 'trueness' does not exist in type '{ id: number; }'. ==== tests/cases/compiler/arrayLiteralTypeInference.ts (2 errors) ==== @@ -26,7 +26,7 @@ tests/cases/compiler/arrayLiteralTypeInference.ts(29,5): error TS2322: Type '({ !!! error TS2322: Type '({ id: number; trueness: boolean; } | { id: number; name: string; })[]' is not assignable to type 'Action[]'. !!! error TS2322: Type '{ id: number; trueness: boolean; } | { id: number; name: string; }' is not assignable to type 'Action'. !!! error TS2322: Type '{ id: number; trueness: boolean; }' is not assignable to type 'Action'. -!!! error TS2322: Object literal may only specify known properties and 'trueness' does not exist in type 'Action'. +!!! error TS2322: Object literal may only specify known properties, and 'trueness' does not exist in type 'Action'. { id: 2, trueness: false }, { id: 3, name: "three" } ] @@ -47,7 +47,7 @@ tests/cases/compiler/arrayLiteralTypeInference.ts(29,5): error TS2322: Type '({ !!! error TS2322: Type '({ id: number; trueness: boolean; } | { id: number; name: string; })[]' is not assignable to type '{ id: number; }[]'. !!! error TS2322: Type '{ id: number; trueness: boolean; } | { id: number; name: string; }' is not assignable to type '{ id: number; }'. !!! error TS2322: Type '{ id: number; trueness: boolean; }' is not assignable to type '{ id: number; }'. -!!! error TS2322: Object literal may only specify known properties and 'trueness' does not exist in type '{ id: number; }'. +!!! error TS2322: Object literal may only specify known properties, and 'trueness' does not exist in type '{ id: number; }'. [ { id: 2, trueness: false }, { id: 3, name: "three" } diff --git a/tests/baselines/reference/arrayLiterals.errors.txt b/tests/baselines/reference/arrayLiterals.errors.txt index fb0009e6a57..fd882804b8a 100644 --- a/tests/baselines/reference/arrayLiterals.errors.txt +++ b/tests/baselines/reference/arrayLiterals.errors.txt @@ -2,7 +2,7 @@ tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts(24,5): error Index signatures are incompatible. Type '{ a: string; b: number; c: string; } | { a: string; b: number; c: number; }' is not assignable to type '{ a: string; b: number; }'. Type '{ a: string; b: number; c: string; }' is not assignable to type '{ a: string; b: number; }'. - Object literal may only specify known properties and 'c' does not exist in type '{ a: string; b: number; }'. + Object literal may only specify known properties, and 'c' does not exist in type '{ a: string; b: number; }'. ==== tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts (1 errors) ==== @@ -35,7 +35,7 @@ tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts(24,5): error !!! error TS2322: Index signatures are incompatible. !!! error TS2322: Type '{ a: string; b: number; c: string; } | { a: string; b: number; c: number; }' is not assignable to type '{ a: string; b: number; }'. !!! error TS2322: Type '{ a: string; b: number; c: string; }' is not assignable to type '{ a: string; b: number; }'. -!!! error TS2322: Object literal may only specify known properties and 'c' does not exist in type '{ a: string; b: number; }'. +!!! error TS2322: Object literal may only specify known properties, and 'c' does not exist in type '{ a: string; b: number; }'. var context2 = [{ a: '', b: 0, c: '' }, { a: "", b: 3, c: 0 }]; // Contextual type C with numeric index signature of type Base makes array literal of Derived have type Base[] diff --git a/tests/baselines/reference/assignmentCompatBug2.errors.txt b/tests/baselines/reference/assignmentCompatBug2.errors.txt index d12aad8a4bc..53e12635888 100644 --- a/tests/baselines/reference/assignmentCompatBug2.errors.txt +++ b/tests/baselines/reference/assignmentCompatBug2.errors.txt @@ -1,9 +1,9 @@ tests/cases/compiler/assignmentCompatBug2.ts(1,5): error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'. - Object literal may only specify known properties and 'a' does not exist in type '{ b: number; }'. + Object literal may only specify known properties, and 'a' does not exist in type '{ b: number; }'. tests/cases/compiler/assignmentCompatBug2.ts(3,1): error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'. - Object literal may only specify known properties and 'a' does not exist in type '{ b: number; }'. + Object literal may only specify known properties, and 'a' does not exist in type '{ b: number; }'. tests/cases/compiler/assignmentCompatBug2.ts(5,1): error TS2322: Type '{ b: number; a: number; }' is not assignable to type '{ b: number; }'. - Object literal may only specify known properties and 'a' does not exist in type '{ b: number; }'. + Object literal may only specify known properties, and 'a' does not exist in type '{ b: number; }'. tests/cases/compiler/assignmentCompatBug2.ts(15,1): error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'. Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }'. tests/cases/compiler/assignmentCompatBug2.ts(20,1): error TS2322: Type '{ f: (n: number) => number; m: number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'. @@ -16,17 +16,17 @@ tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2322: Type '{ f: (n: var b2: { b: number;} = { a: 0 }; // error ~~ !!! error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'. -!!! error TS2322: Object literal may only specify known properties and 'a' does not exist in type '{ b: number; }'. +!!! error TS2322: Object literal may only specify known properties, and 'a' does not exist in type '{ b: number; }'. b2 = { a: 0 }; // error ~~ !!! error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'. -!!! error TS2322: Object literal may only specify known properties and 'a' does not exist in type '{ b: number; }'. +!!! error TS2322: Object literal may only specify known properties, and 'a' does not exist in type '{ b: number; }'. b2 = {b: 0, a: 0 }; ~~ !!! error TS2322: Type '{ b: number; a: number; }' is not assignable to type '{ b: number; }'. -!!! error TS2322: Object literal may only specify known properties and 'a' does not exist in type '{ b: number; }'. +!!! error TS2322: Object literal may only specify known properties, and 'a' does not exist in type '{ b: number; }'. var b3: { f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }; diff --git a/tests/baselines/reference/assignmentCompatBug5.errors.txt b/tests/baselines/reference/assignmentCompatBug5.errors.txt index 152f74d3c00..790848babf4 100644 --- a/tests/baselines/reference/assignmentCompatBug5.errors.txt +++ b/tests/baselines/reference/assignmentCompatBug5.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/assignmentCompatBug5.ts(2,6): error TS2345: Argument of type '{ b: number; }' is not assignable to parameter of type '{ a: number; }'. - Object literal may only specify known properties and 'b' does not exist in type '{ a: number; }'. + Object literal may only specify known properties, and 'b' does not exist in type '{ a: number; }'. tests/cases/compiler/assignmentCompatBug5.ts(5,6): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'number[]'. Type 'string' is not assignable to type 'number'. tests/cases/compiler/assignmentCompatBug5.ts(8,6): error TS2345: Argument of type '(s: string) => void' is not assignable to parameter of type '(n: number) => number'. @@ -14,7 +14,7 @@ tests/cases/compiler/assignmentCompatBug5.ts(9,6): error TS2345: Argument of typ foo1({ b: 5 }); ~~~~~~~~ !!! error TS2345: Argument of type '{ b: number; }' is not assignable to parameter of type '{ a: number; }'. -!!! error TS2345: Object literal may only specify known properties and 'b' does not exist in type '{ a: number; }'. +!!! error TS2345: Object literal may only specify known properties, and 'b' does not exist in type '{ a: number; }'. function foo2(x: number[]) { } foo2(["s", "t"]); diff --git a/tests/baselines/reference/contextualTyping12.errors.txt b/tests/baselines/reference/contextualTyping12.errors.txt index 3126ddbec50..8b079ecc5e0 100644 --- a/tests/baselines/reference/contextualTyping12.errors.txt +++ b/tests/baselines/reference/contextualTyping12.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/contextualTyping12.ts(1,13): error TS2322: Type '({ id: number; } | { id: number; name: string; })[]' is not assignable to type '{ id: number; }[]'. Type '{ id: number; } | { id: number; name: string; }' is not assignable to type '{ id: number; }'. Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. - Object literal may only specify known properties and 'name' does not exist in type '{ id: number; }'. + Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. ==== tests/cases/compiler/contextualTyping12.ts (1 errors) ==== @@ -10,4 +10,4 @@ tests/cases/compiler/contextualTyping12.ts(1,13): error TS2322: Type '({ id: num !!! error TS2322: Type '({ id: number; } | { id: number; name: string; })[]' is not assignable to type '{ id: number; }[]'. !!! error TS2322: Type '{ id: number; } | { id: number; name: string; }' is not assignable to type '{ id: number; }'. !!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. -!!! error TS2322: Object literal may only specify known properties and 'name' does not exist in type '{ id: number; }'. \ No newline at end of file +!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping17.errors.txt b/tests/baselines/reference/contextualTyping17.errors.txt index 35cb4e03605..24c428db58b 100644 --- a/tests/baselines/reference/contextualTyping17.errors.txt +++ b/tests/baselines/reference/contextualTyping17.errors.txt @@ -1,9 +1,9 @@ tests/cases/compiler/contextualTyping17.ts(1,33): error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. - Object literal may only specify known properties and 'name' does not exist in type '{ id: number; }'. + Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. ==== tests/cases/compiler/contextualTyping17.ts (1 errors) ==== var foo: {id:number;} = {id:4}; foo = {id: 5, name:"foo"}; ~~~ !!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. -!!! error TS2322: Object literal may only specify known properties and 'name' does not exist in type '{ id: number; }'. \ No newline at end of file +!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping2.errors.txt b/tests/baselines/reference/contextualTyping2.errors.txt index 9204e06a8b2..2665204b167 100644 --- a/tests/baselines/reference/contextualTyping2.errors.txt +++ b/tests/baselines/reference/contextualTyping2.errors.txt @@ -1,9 +1,9 @@ tests/cases/compiler/contextualTyping2.ts(1,5): error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. - Object literal may only specify known properties and 'name' does not exist in type '{ id: number; }'. + Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. ==== tests/cases/compiler/contextualTyping2.ts (1 errors) ==== var foo: {id:number;} = {id:4, name:"foo"}; ~~~ !!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. -!!! error TS2322: Object literal may only specify known properties and 'name' does not exist in type '{ id: number; }'. \ No newline at end of file +!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping20.errors.txt b/tests/baselines/reference/contextualTyping20.errors.txt index 6a843031ebc..d723dcd1d1b 100644 --- a/tests/baselines/reference/contextualTyping20.errors.txt +++ b/tests/baselines/reference/contextualTyping20.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/contextualTyping20.ts(1,36): error TS2322: Type '({ id: number; } | { id: number; name: string; })[]' is not assignable to type '{ id: number; }[]'. Type '{ id: number; } | { id: number; name: string; }' is not assignable to type '{ id: number; }'. Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. - Object literal may only specify known properties and 'name' does not exist in type '{ id: number; }'. + Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. ==== tests/cases/compiler/contextualTyping20.ts (1 errors) ==== @@ -10,4 +10,4 @@ tests/cases/compiler/contextualTyping20.ts(1,36): error TS2322: Type '({ id: num !!! error TS2322: Type '({ id: number; } | { id: number; name: string; })[]' is not assignable to type '{ id: number; }[]'. !!! error TS2322: Type '{ id: number; } | { id: number; name: string; }' is not assignable to type '{ id: number; }'. !!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. -!!! error TS2322: Object literal may only specify known properties and 'name' does not exist in type '{ id: number; }'. \ No newline at end of file +!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping4.errors.txt b/tests/baselines/reference/contextualTyping4.errors.txt index 3749865e353..48eb2c406f0 100644 --- a/tests/baselines/reference/contextualTyping4.errors.txt +++ b/tests/baselines/reference/contextualTyping4.errors.txt @@ -1,9 +1,9 @@ tests/cases/compiler/contextualTyping4.ts(1,13): error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. - Object literal may only specify known properties and 'name' does not exist in type '{ id: number; }'. + Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. ==== tests/cases/compiler/contextualTyping4.ts (1 errors) ==== class foo { public bar:{id:number;} = {id:5, name:"foo"}; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. -!!! error TS2322: Object literal may only specify known properties and 'name' does not exist in type '{ id: number; }'. \ No newline at end of file +!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping9.errors.txt b/tests/baselines/reference/contextualTyping9.errors.txt index 64c521d3f00..f959d1e2e69 100644 --- a/tests/baselines/reference/contextualTyping9.errors.txt +++ b/tests/baselines/reference/contextualTyping9.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/contextualTyping9.ts(1,5): error TS2322: Type '({ id: number; } | { id: number; name: string; })[]' is not assignable to type '{ id: number; }[]'. Type '{ id: number; } | { id: number; name: string; }' is not assignable to type '{ id: number; }'. Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. - Object literal may only specify known properties and 'name' does not exist in type '{ id: number; }'. + Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. ==== tests/cases/compiler/contextualTyping9.ts (1 errors) ==== @@ -10,4 +10,4 @@ tests/cases/compiler/contextualTyping9.ts(1,5): error TS2322: Type '({ id: numbe !!! error TS2322: Type '({ id: number; } | { id: number; name: string; })[]' is not assignable to type '{ id: number; }[]'. !!! error TS2322: Type '{ id: number; } | { id: number; name: string; }' is not assignable to type '{ id: number; }'. !!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. -!!! error TS2322: Object literal may only specify known properties and 'name' does not exist in type '{ id: number; }'. \ No newline at end of file +!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.errors.txt b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.errors.txt index 97674ec7046..dc2db292eb5 100644 --- a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.errors.txt +++ b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts(14,28): error TS2345: Argument of type '{ a: number; b: number; }' is not assignable to parameter of type '{ a: number; }'. - Object literal may only specify known properties and 'b' does not exist in type '{ a: number; }'. + Object literal may only specify known properties, and 'b' does not exist in type '{ a: number; }'. ==== tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts (1 errors) ==== @@ -19,7 +19,7 @@ tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclara var r2 = super.foo({ a: 1, b: 2 }); // { a: number } ~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ a: number; b: number; }' is not assignable to parameter of type '{ a: number; }'. -!!! error TS2345: Object literal may only specify known properties and 'b' does not exist in type '{ a: number; }'. +!!! error TS2345: Object literal may only specify known properties, and 'b' does not exist in type '{ a: number; }'. var r3 = this.foo({ a: 1, b: 2 }); // { a: number; b: number; } } } \ No newline at end of file diff --git a/tests/baselines/reference/destructuringParameterProperties5.errors.txt b/tests/baselines/reference/destructuringParameterProperties5.errors.txt index 29ae037bfa7..47e50b1df83 100644 --- a/tests/baselines/reference/destructuringParameterProperties5.errors.txt +++ b/tests/baselines/reference/destructuringParameterProperties5.errors.txt @@ -10,7 +10,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(7 tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(11,16): error TS2345: Argument of type '[{ x1: number; x2: string; x3: boolean; }, string, boolean]' is not assignable to parameter of type '[{ x: number; y: string; z: boolean; }, number, string]'. Types of property '0' are incompatible. Type '{ x1: number; x2: string; x3: boolean; }' is not assignable to type '{ x: number; y: string; z: boolean; }'. - Object literal may only specify known properties and 'x1' does not exist in type '{ x: number; y: string; z: boolean; }'. + Object literal may only specify known properties, and 'x1' does not exist in type '{ x: number; y: string; z: boolean; }'. ==== tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts (10 errors) ==== @@ -47,5 +47,5 @@ tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(1 !!! error TS2345: Argument of type '[{ x1: number; x2: string; x3: boolean; }, string, boolean]' is not assignable to parameter of type '[{ x: number; y: string; z: boolean; }, number, string]'. !!! error TS2345: Types of property '0' are incompatible. !!! error TS2345: Type '{ x1: number; x2: string; x3: boolean; }' is not assignable to type '{ x: number; y: string; z: boolean; }'. -!!! error TS2345: Object literal may only specify known properties and 'x1' does not exist in type '{ x: number; y: string; z: boolean; }'. +!!! error TS2345: Object literal may only specify known properties, and 'x1' does not exist in type '{ x: number; y: string; z: boolean; }'. var [a_x1, a_x2, a_x3, a_y, a_z] = [a.x1, a.x2, a.x3, a.y, a.z]; \ No newline at end of file diff --git a/tests/baselines/reference/incompatibleTypes.errors.txt b/tests/baselines/reference/incompatibleTypes.errors.txt index 4f2c3f44011..e8763b0d54c 100644 --- a/tests/baselines/reference/incompatibleTypes.errors.txt +++ b/tests/baselines/reference/incompatibleTypes.errors.txt @@ -19,9 +19,9 @@ tests/cases/compiler/incompatibleTypes.ts(42,5): error TS2345: Argument of type Type '() => string' is not assignable to type '(s: string) => number'. Type 'string' is not assignable to type 'number'. tests/cases/compiler/incompatibleTypes.ts(49,5): error TS2345: Argument of type '{ e: number; f: number; }' is not assignable to parameter of type '{ c: { b: string; }; d: string; }'. - Object literal may only specify known properties and 'e' does not exist in type '{ c: { b: string; }; d: string; }'. + Object literal may only specify known properties, and 'e' does not exist in type '{ c: { b: string; }; d: string; }'. tests/cases/compiler/incompatibleTypes.ts(66,5): error TS2322: Type '{ e: number; f: number; }' is not assignable to type '{ a: { a: string; }; b: string; }'. - Object literal may only specify known properties and 'e' does not exist in type '{ a: { a: string; }; b: string; }'. + Object literal may only specify known properties, and 'e' does not exist in type '{ a: { a: string; }; b: string; }'. tests/cases/compiler/incompatibleTypes.ts(72,5): error TS2322: Type 'number' is not assignable to type '() => string'. tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2322: Type '(a: any) => number' is not assignable to type '() => any'. @@ -103,7 +103,7 @@ tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2322: Type '(a: any) => of1({ e: 0, f: 0 }); ~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ e: number; f: number; }' is not assignable to parameter of type '{ c: { b: string; }; d: string; }'. -!!! error TS2345: Object literal may only specify known properties and 'e' does not exist in type '{ c: { b: string; }; d: string; }'. +!!! error TS2345: Object literal may only specify known properties, and 'e' does not exist in type '{ c: { b: string; }; d: string; }'. interface IMap { [key:string]:string; @@ -123,7 +123,7 @@ tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2322: Type '(a: any) => var o1: { a: { a: string; }; b: string; } = { e: 0, f: 0 }; ~~ !!! error TS2322: Type '{ e: number; f: number; }' is not assignable to type '{ a: { a: string; }; b: string; }'. -!!! error TS2322: Object literal may only specify known properties and 'e' does not exist in type '{ a: { a: string; }; b: string; }'. +!!! error TS2322: Object literal may only specify known properties, and 'e' does not exist in type '{ a: { a: string; }; b: string; }'. var a1 = [{ e: 0, f: 0 }, { e: 0, f: 0 }, { e: 0, g: 0 }]; diff --git a/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.errors.txt b/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.errors.txt index 645428fc627..bd210c55570 100644 --- a/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.errors.txt +++ b/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrExpressionIsContextuallyTyped.ts(6,5): error TS2322: Type '{ a: string; b: number; } | { a: string; b: boolean; }' is not assignable to type '{ a: string; }'. Type '{ a: string; b: number; }' is not assignable to type '{ a: string; }'. - Object literal may only specify known properties and 'b' does not exist in type '{ a: string; }'. + Object literal may only specify known properties, and 'b' does not exist in type '{ a: string; }'. ==== tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrExpressionIsContextuallyTyped.ts (1 errors) ==== @@ -13,4 +13,4 @@ tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrE ~ !!! error TS2322: Type '{ a: string; b: number; } | { a: string; b: boolean; }' is not assignable to type '{ a: string; }'. !!! error TS2322: Type '{ a: string; b: number; }' is not assignable to type '{ a: string; }'. -!!! error TS2322: Object literal may only specify known properties and 'b' does not exist in type '{ a: string; }'. \ No newline at end of file +!!! error TS2322: Object literal may only specify known properties, and 'b' does not exist in type '{ a: string; }'. \ No newline at end of file diff --git a/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt b/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt index 487d78a0b17..465c4d6d9f6 100644 --- a/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt +++ b/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/objectLitStructuralTypeMismatch.ts(2,5): error TS2322: Type '{ b: number; }' is not assignable to type '{ a: number; }'. - Object literal may only specify known properties and 'b' does not exist in type '{ a: number; }'. + Object literal may only specify known properties, and 'b' does not exist in type '{ a: number; }'. ==== tests/cases/compiler/objectLitStructuralTypeMismatch.ts (1 errors) ==== @@ -7,4 +7,4 @@ tests/cases/compiler/objectLitStructuralTypeMismatch.ts(2,5): error TS2322: Type var x: { a: number; } = { b: 5 }; ~ !!! error TS2322: Type '{ b: number; }' is not assignable to type '{ a: number; }'. -!!! error TS2322: Object literal may only specify known properties and 'b' does not exist in type '{ a: number; }'. \ No newline at end of file +!!! error TS2322: Object literal may only specify known properties, and 'b' does not exist in type '{ a: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.errors.txt b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.errors.txt index 89786f1dbfc..149aca43a42 100644 --- a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.errors.txt +++ b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts(8,4): error TS2345: Argument of type '{ hello: number; }' is not assignable to parameter of type 'I'. - Object literal may only specify known properties and 'hello' does not exist in type 'I'. + Object literal may only specify known properties, and 'hello' does not exist in type 'I'. tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts(10,4): error TS2345: Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I'. - Object literal may only specify known properties and 'what' does not exist in type 'I'. + Object literal may only specify known properties, and 'what' does not exist in type 'I'. tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts(11,4): error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'. Property 'value' is missing in type '{ toString: (s: string) => string; }'. tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts(12,4): error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'. @@ -20,12 +20,12 @@ tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts(13,36): error T f2({ hello: 1 }) // error ~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ hello: number; }' is not assignable to parameter of type 'I'. -!!! error TS2345: Object literal may only specify known properties and 'hello' does not exist in type 'I'. +!!! error TS2345: Object literal may only specify known properties, and 'hello' does not exist in type 'I'. f2({ value: '' }) // missing toString satisfied by Object's member f2({ value: '', what: 1 }) // missing toString satisfied by Object's member ~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I'. -!!! error TS2345: Object literal may only specify known properties and 'what' does not exist in type 'I'. +!!! error TS2345: Object literal may only specify known properties, and 'what' does not exist in type 'I'. f2({ toString: (s) => s }) // error, missing property value from ArgsString ~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'. diff --git a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt index 4e3a706509e..367a676abc6 100644 --- a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt +++ b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt @@ -1,9 +1,9 @@ tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(8,4): error TS2345: Argument of type '{ hello: number; }' is not assignable to parameter of type 'I2'. - Object literal may only specify known properties and 'hello' does not exist in type 'I2'. + Object literal may only specify known properties, and 'hello' does not exist in type 'I2'. tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(9,4): error TS2345: Argument of type '{ value: string; }' is not assignable to parameter of type 'I2'. Property 'doStuff' is missing in type '{ value: string; }'. tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(10,4): error TS2345: Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I2'. - Object literal may only specify known properties and 'what' does not exist in type 'I2'. + Object literal may only specify known properties, and 'what' does not exist in type 'I2'. tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(11,4): error TS2345: Argument of type '{ toString: (s: any) => any; }' is not assignable to parameter of type 'I2'. Property 'value' is missing in type '{ toString: (s: any) => any; }'. tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(12,4): error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I2'. @@ -23,7 +23,7 @@ tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(13,4): error T f2({ hello: 1 }) ~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ hello: number; }' is not assignable to parameter of type 'I2'. -!!! error TS2345: Object literal may only specify known properties and 'hello' does not exist in type 'I2'. +!!! error TS2345: Object literal may only specify known properties, and 'hello' does not exist in type 'I2'. f2({ value: '' }) ~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ value: string; }' is not assignable to parameter of type 'I2'. @@ -31,7 +31,7 @@ tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(13,4): error T f2({ value: '', what: 1 }) ~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I2'. -!!! error TS2345: Object literal may only specify known properties and 'what' does not exist in type 'I2'. +!!! error TS2345: Object literal may only specify known properties, and 'what' does not exist in type 'I2'. f2({ toString: (s) => s }) ~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ toString: (s: any) => any; }' is not assignable to parameter of type 'I2'. diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.errors.txt b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.errors.txt index 61e3289134a..d00a8ddf074 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.errors.txt +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts(4,5): error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ b: string; id: number; }'. - Object literal may only specify known properties and 'name' does not exist in type '{ b: string; id: number; }'. + Object literal may only specify known properties, and 'name' does not exist in type '{ b: string; id: number; }'. tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts(5,16): error TS1131: Property or signature expected. tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts(5,22): error TS2403: Subsequent variable declarations must have the same type. Variable 'id' must be of type 'number', but here has type 'any'. tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts(5,25): error TS1128: Declaration or statement expected. @@ -18,7 +18,7 @@ tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPr var person: { b: string; id: number } = { name, id }; // error ~~~~~~ !!! error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ b: string; id: number; }'. -!!! error TS2322: Object literal may only specify known properties and 'name' does not exist in type '{ b: string; id: number; }'. +!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ b: string; id: number; }'. var person1: { name, id }; // error: can't use short-hand property assignment in type position ~~~~ !!! error TS1131: Property or signature expected. diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.errors.txt b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.errors.txt index 5352c28d27c..f6f4f625c45 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.errors.txt +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts(4,5): error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ b: string; id: number; }'. - Object literal may only specify known properties and 'name' does not exist in type '{ b: string; id: number; }'. + Object literal may only specify known properties, and 'name' does not exist in type '{ b: string; id: number; }'. tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts(5,79): error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ name: number; id: string; }'. Types of property 'name' are incompatible. Type 'string' is not assignable to type 'number'. @@ -18,7 +18,7 @@ tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPr var person: { b: string; id: number } = { name, id }; // error ~~~~~~ !!! error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ b: string; id: number; }'. -!!! error TS2322: Object literal may only specify known properties and 'name' does not exist in type '{ b: string; id: number; }'. +!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type '{ b: string; id: number; }'. function bar(name: string, id: number): { name: number, id: string } { return { name, id }; } // error ~~~~~~~~~~~~ !!! error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ name: number; id: string; }'. diff --git a/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt b/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt index 85b63ff2ec1..47401a7ae8b 100644 --- a/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt +++ b/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt @@ -1,8 +1,8 @@ tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(19,3): error TS2345: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'. - Object literal may only specify known properties and 's' does not exist in type '{ n: number; }'. + Object literal may only specify known properties, and 's' does not exist in type '{ n: number; }'. tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(22,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'w' must be of type 'A', but here has type 'C'. tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(24,3): error TS2345: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'. - Object literal may only specify known properties and 's' does not exist in type '{ n: number; }'. + Object literal may only specify known properties, and 's' does not exist in type '{ n: number; }'. ==== tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts (3 errors) ==== @@ -27,7 +27,7 @@ tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(24,3): error TS234 v({ s: "", n: 0 }).toLowerCase(); ~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'. -!!! error TS2345: Object literal may only specify known properties and 's' does not exist in type '{ n: number; }'. +!!! error TS2345: Object literal may only specify known properties, and 's' does not exist in type '{ n: number; }'. var w: A; var w: C; @@ -37,4 +37,4 @@ tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(24,3): error TS234 w({ s: "", n: 0 }).toLowerCase(); ~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'. -!!! error TS2345: Object literal may only specify known properties and 's' does not exist in type '{ n: number; }'. \ No newline at end of file +!!! error TS2345: Object literal may only specify known properties, and 's' does not exist in type '{ n: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/switchStatements.errors.txt b/tests/baselines/reference/switchStatements.errors.txt index b20a0b604f9..aa5b796e252 100644 --- a/tests/baselines/reference/switchStatements.errors.txt +++ b/tests/baselines/reference/switchStatements.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/statements/switchStatements/switchStatements.ts(35,10): error TS2322: Type '{ id: number; name: string; }' is not assignable to type 'C'. - Object literal may only specify known properties and 'name' does not exist in type 'C'. + Object literal may only specify known properties, and 'name' does not exist in type 'C'. ==== tests/cases/conformance/statements/switchStatements/switchStatements.ts (1 errors) ==== @@ -40,7 +40,7 @@ tests/cases/conformance/statements/switchStatements/switchStatements.ts(35,10): case { id: 12, name: '' }: ~~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type 'C'. -!!! error TS2322: Object literal may only specify known properties and 'name' does not exist in type 'C'. +!!! error TS2322: Object literal may only specify known properties, and 'name' does not exist in type 'C'. case new C(): } diff --git a/tests/baselines/reference/symbolProperty21.errors.txt b/tests/baselines/reference/symbolProperty21.errors.txt index 1d20e356b43..b9162acc84f 100644 --- a/tests/baselines/reference/symbolProperty21.errors.txt +++ b/tests/baselines/reference/symbolProperty21.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/es6/Symbols/symbolProperty21.ts(8,5): error TS2345: Argument of type '{ [Symbol.isConcatSpreadable]: string; [Symbol.toPrimitive]: number; [Symbol.unscopables]: boolean; }' is not assignable to parameter of type 'I'. - Object literal may only specify known properties and '[Symbol.toPrimitive]' does not exist in type 'I'. + Object literal may only specify known properties, and '[Symbol.toPrimitive]' does not exist in type 'I'. ==== tests/cases/conformance/es6/Symbols/symbolProperty21.ts (1 errors) ==== @@ -21,4 +21,4 @@ tests/cases/conformance/es6/Symbols/symbolProperty21.ts(8,5): error TS2345: Argu }); ~ !!! error TS2345: Argument of type '{ [Symbol.isConcatSpreadable]: string; [Symbol.toPrimitive]: number; [Symbol.unscopables]: boolean; }' is not assignable to parameter of type 'I'. -!!! error TS2345: Object literal may only specify known properties and '[Symbol.toPrimitive]' does not exist in type 'I'. \ No newline at end of file +!!! error TS2345: Object literal may only specify known properties, and '[Symbol.toPrimitive]' does not exist in type 'I'. \ No newline at end of file diff --git a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.errors.txt b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.errors.txt index 0bfeeb35ec9..6464366d33d 100644 --- a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.errors.txt @@ -2,7 +2,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference.ts(77,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate '{ x: number; z: Date; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. - Object literal may only specify known properties and 'y' does not exist in type '{ x: number; z: Date; }'. + Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: Date; }'. ==== tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference.ts (2 errors) ==== @@ -89,7 +89,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference ~~~~~~~~~~~~~ !!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate '{ x: number; z: Date; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. -!!! error TS2453: Object literal may only specify known properties and 'y' does not exist in type '{ x: number; z: Date; }'. +!!! error TS2453: Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: Date; }'. var a9e: {}; // Generic tag with multiple parameters of generic type passed arguments with a single best common type diff --git a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.errors.txt b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.errors.txt index 98e7141322d..be8c517d39c 100644 --- a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.errors.txt @@ -2,7 +2,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts(76,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate '{ x: number; z: Date; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. - Object literal may only specify known properties and 'y' does not exist in type '{ x: number; z: Date; }'. + Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: Date; }'. ==== tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts (2 errors) ==== @@ -88,7 +88,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference ~~~~~~~~~~~~~ !!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate '{ x: number; z: Date; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. -!!! error TS2453: Object literal may only specify known properties and 'y' does not exist in type '{ x: number; z: Date; }'. +!!! error TS2453: Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: Date; }'. var a9e: {}; // Generic tag with multiple parameters of generic type passed arguments with a single best common type diff --git a/tests/baselines/reference/typeArgInference2.errors.txt b/tests/baselines/reference/typeArgInference2.errors.txt index 453fb57afb3..71d2a13f4a1 100644 --- a/tests/baselines/reference/typeArgInference2.errors.txt +++ b/tests/baselines/reference/typeArgInference2.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/typeArgInference2.ts(12,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate '{ name: string; a: number; }' is not a valid type argument because it is not a supertype of candidate '{ name: string; b: number; }'. - Object literal may only specify known properties and 'b' does not exist in type '{ name: string; a: number; }'. + Object literal may only specify known properties, and 'b' does not exist in type '{ name: string; a: number; }'. ==== tests/cases/compiler/typeArgInference2.ts (1 errors) ==== @@ -19,4 +19,4 @@ tests/cases/compiler/typeArgInference2.ts(12,10): error TS2453: The type argumen ~~~ !!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate '{ name: string; a: number; }' is not a valid type argument because it is not a supertype of candidate '{ name: string; b: number; }'. -!!! error TS2453: Object literal may only specify known properties and 'b' does not exist in type '{ name: string; a: number; }'. \ No newline at end of file +!!! error TS2453: Object literal may only specify known properties, and 'b' does not exist in type '{ name: string; a: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/typeArgumentInference.errors.txt b/tests/baselines/reference/typeArgumentInference.errors.txt index 9bda4629b3a..669ebadd28a 100644 --- a/tests/baselines/reference/typeArgumentInference.errors.txt +++ b/tests/baselines/reference/typeArgumentInference.errors.txt @@ -2,9 +2,9 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(68,11 Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(82,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate '{ x: number; z: Date; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. - Object literal may only specify known properties and 'y' does not exist in type '{ x: number; z: Date; }'. + Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: Date; }'. tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(84,66): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'. - Object literal may only specify known properties and 'y' does not exist in type 'A92'. + Object literal may only specify known properties, and 'y' does not exist in type 'A92'. ==== tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts (3 errors) ==== @@ -96,12 +96,12 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(84,66 ~~~~~~~~~~~~~ !!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate '{ x: number; z: Date; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. -!!! error TS2453: Object literal may only specify known properties and 'y' does not exist in type '{ x: number; z: Date; }'. +!!! error TS2453: Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: Date; }'. var a9e: {}; var a9f = someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' }); ~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'. -!!! error TS2345: Object literal may only specify known properties and 'y' does not exist in type 'A92'. +!!! error TS2345: Object literal may only specify known properties, and 'y' does not exist in type 'A92'. var a9f: A92; // Generic call with multiple parameters of generic type passed arguments with a single best common type diff --git a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt index 6b964f64ee9..305eee1c941 100644 --- a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt @@ -14,11 +14,11 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstruct tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(118,9): error TS2304: Cannot find name 'Window'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(120,15): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate '{ x: number; z: any; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. - Object literal may only specify known properties and 'y' does not exist in type '{ x: number; z: any; }'. + Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: any; }'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(120,51): error TS2304: Cannot find name 'window'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(122,56): error TS2304: Cannot find name 'window'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(122,66): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'. - Object literal may only specify known properties and 'y' does not exist in type 'A92'. + Object literal may only specify known properties, and 'y' does not exist in type 'A92'. ==== tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts (11 errors) ==== @@ -166,7 +166,7 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstruct ~~~~~~~~~~~~~ !!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate '{ x: number; z: any; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. -!!! error TS2453: Object literal may only specify known properties and 'y' does not exist in type '{ x: number; z: any; }'. +!!! error TS2453: Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: any; }'. ~~~~~~ !!! error TS2304: Cannot find name 'window'. var a9e: {}; @@ -175,7 +175,7 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstruct !!! error TS2304: Cannot find name 'window'. ~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'. -!!! error TS2345: Object literal may only specify known properties and 'y' does not exist in type 'A92'. +!!! error TS2345: Object literal may only specify known properties, and 'y' does not exist in type 'A92'. var a9f: A92; // Generic call with multiple parameters of generic type passed arguments with a single best common type diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt b/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt index e8b728cab14..6b81cd6f232 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt @@ -19,11 +19,11 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(85,9): error TS2304: Cannot find name 'Window'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(87,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate '{ x: number; z: any; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. - Object literal may only specify known properties and 'y' does not exist in type '{ x: number; z: any; }'. + Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: any; }'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(87,47): error TS2304: Cannot find name 'window'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(89,52): error TS2304: Cannot find name 'window'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(89,62): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'. - Object literal may only specify known properties and 'y' does not exist in type 'A92'. + Object literal may only specify known properties, and 'y' does not exist in type 'A92'. ==== tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts (16 errors) ==== @@ -148,7 +148,7 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst ~~~~~~~~~~~~~ !!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate '{ x: number; z: any; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. -!!! error TS2453: Object literal may only specify known properties and 'y' does not exist in type '{ x: number; z: any; }'. +!!! error TS2453: Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; z: any; }'. ~~~~~~ !!! error TS2304: Cannot find name 'window'. var a9e: {}; @@ -157,7 +157,7 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst !!! error TS2304: Cannot find name 'window'. ~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'. -!!! error TS2345: Object literal may only specify known properties and 'y' does not exist in type 'A92'. +!!! error TS2345: Object literal may only specify known properties, and 'y' does not exist in type 'A92'. var a9f: A92; // Generic call with multiple parameters of generic type passed arguments with a single best common type diff --git a/tests/baselines/reference/typeInfer1.errors.txt b/tests/baselines/reference/typeInfer1.errors.txt index c90345c7f45..2550bb1fe8d 100644 --- a/tests/baselines/reference/typeInfer1.errors.txt +++ b/tests/baselines/reference/typeInfer1.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/typeInfer1.ts(11,5): error TS2322: Type '{ Moo: () => string; }' is not assignable to type 'ITextWriter2'. - Object literal may only specify known properties and 'Moo' does not exist in type 'ITextWriter2'. + Object literal may only specify known properties, and 'Moo' does not exist in type 'ITextWriter2'. ==== tests/cases/compiler/typeInfer1.ts (1 errors) ==== @@ -16,6 +16,6 @@ tests/cases/compiler/typeInfer1.ts(11,5): error TS2322: Type '{ Moo: () => strin var yyyyyyyy: ITextWriter2 = { ~~~~~~~~ !!! error TS2322: Type '{ Moo: () => string; }' is not assignable to type 'ITextWriter2'. -!!! error TS2322: Object literal may only specify known properties and 'Moo' does not exist in type 'ITextWriter2'. +!!! error TS2322: Object literal may only specify known properties, and 'Moo' does not exist in type 'ITextWriter2'. Moo: function() { return "cow"; } } \ No newline at end of file diff --git a/tests/baselines/reference/typeMatch2.errors.txt b/tests/baselines/reference/typeMatch2.errors.txt index 9925ca71fee..a497551c953 100644 --- a/tests/baselines/reference/typeMatch2.errors.txt +++ b/tests/baselines/reference/typeMatch2.errors.txt @@ -3,9 +3,9 @@ tests/cases/compiler/typeMatch2.ts(3,2): error TS2322: Type '{}' is not assignab tests/cases/compiler/typeMatch2.ts(4,5): error TS2322: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }'. Property 'y' is missing in type '{ x: number; }'. tests/cases/compiler/typeMatch2.ts(5,2): error TS2322: Type '{ x: number; y: number; z: number; }' is not assignable to type '{ x: number; y: number; }'. - Object literal may only specify known properties and 'z' does not exist in type '{ x: number; y: number; }'. + Object literal may only specify known properties, and 'z' does not exist in type '{ x: number; y: number; }'. tests/cases/compiler/typeMatch2.ts(6,5): error TS2322: Type '{ x: number; z: number; }' is not assignable to type '{ x: number; y: number; }'. - Object literal may only specify known properties and 'z' does not exist in type '{ x: number; y: number; }'. + Object literal may only specify known properties, and 'z' does not exist in type '{ x: number; y: number; }'. tests/cases/compiler/typeMatch2.ts(18,5): error TS2322: Type 'Animal[]' is not assignable to type 'Giraffe[]'. Type 'Animal' is not assignable to type 'Giraffe'. Property 'g' is missing in type 'Animal'. @@ -14,7 +14,7 @@ tests/cases/compiler/typeMatch2.ts(22,5): error TS2322: Type '{ f1: number; f2: Type 'Animal[]' is not assignable to type 'Giraffe[]'. Type 'Animal' is not assignable to type 'Giraffe'. tests/cases/compiler/typeMatch2.ts(34,5): error TS2322: Type '{ x: number; y: any; z: number; }' is not assignable to type '{ x: number; y: number; }'. - Object literal may only specify known properties and 'z' does not exist in type '{ x: number; y: number; }'. + Object literal may only specify known properties, and 'z' does not exist in type '{ x: number; y: number; }'. tests/cases/compiler/typeMatch2.ts(35,5): error TS2322: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }'. Property 'y' is missing in type '{ x: number; }'. @@ -33,11 +33,11 @@ tests/cases/compiler/typeMatch2.ts(35,5): error TS2322: Type '{ x: number; }' is a = { x: 1, y: 2, z: 3 }; ~ !!! error TS2322: Type '{ x: number; y: number; z: number; }' is not assignable to type '{ x: number; y: number; }'. -!!! error TS2322: Object literal may only specify known properties and 'z' does not exist in type '{ x: number; y: number; }'. +!!! error TS2322: Object literal may only specify known properties, and 'z' does not exist in type '{ x: number; y: number; }'. a = { x: 1, z: 3 }; // error ~ !!! error TS2322: Type '{ x: number; z: number; }' is not assignable to type '{ x: number; y: number; }'. -!!! error TS2322: Object literal may only specify known properties and 'z' does not exist in type '{ x: number; y: number; }'. +!!! error TS2322: Object literal may only specify known properties, and 'z' does not exist in type '{ x: number; y: number; }'. } class Animal { private a; } @@ -77,7 +77,7 @@ tests/cases/compiler/typeMatch2.ts(35,5): error TS2322: Type '{ x: number; }' is a = { x: 1, y: _any, z:1 }; ~ !!! error TS2322: Type '{ x: number; y: any; z: number; }' is not assignable to type '{ x: number; y: number; }'. -!!! error TS2322: Object literal may only specify known properties and 'z' does not exist in type '{ x: number; y: number; }'. +!!! error TS2322: Object literal may only specify known properties, and 'z' does not exist in type '{ x: number; y: number; }'. a = { x: 1 }; // error ~ !!! error TS2322: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }'.