mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Accepting new baselines
This commit is contained in:
@@ -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; }'.
|
||||
Property 'foo' does not exist on 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: Property 'foo' does not exist on 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" }, {}];
|
||||
@@ -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'.
|
||||
Property 'trueness' does not exist on 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; }'.
|
||||
Property 'trueness' does not exist on 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: Property 'trueness' does not exist on 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: Property 'trueness' does not exist on 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" }
|
||||
|
||||
@@ -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; }'.
|
||||
Property 'c' does not exist on 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: Property 'c' does not exist on 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[]
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(1,5): error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
|
||||
Property 'a' does not exist on 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; }'.
|
||||
Property 'a' does not exist on 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; }'.
|
||||
Property 'a' does not exist on 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: Property 'a' does not exist on 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: Property 'a' does not exist on 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: Property 'a' does not exist on 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; };
|
||||
|
||||
|
||||
@@ -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; }'.
|
||||
Property 'b' does not exist on 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: Property 'b' does not exist on 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"]);
|
||||
|
||||
@@ -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; }'.
|
||||
Property 'name' does not exist on 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: Property 'name' does not exist on type '{ id: number; }'.
|
||||
!!! error TS2322: Object literal may only specify known properties and 'name' does not exist in type '{ id: number; }'.
|
||||
@@ -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; }'.
|
||||
Property 'name' does not exist on 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: Property 'name' does not exist on type '{ id: number; }'.
|
||||
!!! error TS2322: Object literal may only specify known properties and 'name' does not exist in type '{ id: number; }'.
|
||||
@@ -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; }'.
|
||||
Property 'name' does not exist on 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: Property 'name' does not exist on type '{ id: number; }'.
|
||||
!!! error TS2322: Object literal may only specify known properties and 'name' does not exist in type '{ id: number; }'.
|
||||
@@ -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; }'.
|
||||
Property 'name' does not exist on 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: Property 'name' does not exist on type '{ id: number; }'.
|
||||
!!! error TS2322: Object literal may only specify known properties and 'name' does not exist in type '{ id: number; }'.
|
||||
@@ -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; }'.
|
||||
Property 'name' does not exist on 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: Property 'name' does not exist on type '{ id: number; }'.
|
||||
!!! error TS2322: Object literal may only specify known properties and 'name' does not exist in type '{ id: number; }'.
|
||||
@@ -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; }'.
|
||||
Property 'name' does not exist on 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: Property 'name' does not exist on type '{ id: number; }'.
|
||||
!!! error TS2322: Object literal may only specify known properties and 'name' does not exist in type '{ id: number; }'.
|
||||
+2
-2
@@ -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; }'.
|
||||
Property 'b' does not exist on 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: Property 'b' does not exist on 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; }
|
||||
}
|
||||
}
|
||||
@@ -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; }'.
|
||||
Property 'x1' does not exist on 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: Property 'x1' does not exist on 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];
|
||||
@@ -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; }'.
|
||||
Property 'e' does not exist on 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; }'.
|
||||
Property 'e' does not exist on 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: Property 'e' does not exist on 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: Property 'e' does not exist on 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 }];
|
||||
|
||||
|
||||
@@ -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; }'.
|
||||
Property 'b' does not exist on 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: Property 'b' does not exist on type '{ a: string; }'.
|
||||
!!! error TS2322: Object literal may only specify known properties and 'b' does not exist in type '{ a: string; }'.
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/objectLitStructuralTypeMismatch.ts(2,5): error TS2322: Type '{ b: number; }' is not assignable to type '{ a: number; }'.
|
||||
Property 'b' does not exist on 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: Property 'b' does not exist on type '{ a: number; }'.
|
||||
!!! error TS2322: Object literal may only specify known properties and 'b' does not exist in type '{ a: number; }'.
|
||||
@@ -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'.
|
||||
Property 'hello' does not exist on 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'.
|
||||
Property 'what' does not exist on 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: Property 'hello' does not exist on 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: Property 'what' does not exist on 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'.
|
||||
|
||||
@@ -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'.
|
||||
Property 'hello' does not exist on 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'.
|
||||
Property 'what' does not exist on 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: Property 'hello' does not exist on 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: Property 'what' does not exist on 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'.
|
||||
|
||||
+2
-2
@@ -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; }'.
|
||||
Property 'name' does not exist on 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: Property 'name' does not exist on 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.
|
||||
|
||||
+2
-2
@@ -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; }'.
|
||||
Property 'name' does not exist on 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: Property 'name' does not exist on 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; }'.
|
||||
|
||||
@@ -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; }'.
|
||||
Property 's' does not exist on 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; }'.
|
||||
Property 's' does not exist on 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: Property 's' does not exist on 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: Property 's' does not exist on type '{ n: number; }'.
|
||||
!!! error TS2345: Object literal may only specify known properties and 's' does not exist in type '{ n: number; }'.
|
||||
@@ -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'.
|
||||
Property 'name' does not exist on 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: Property 'name' does not exist on type 'C'.
|
||||
!!! error TS2322: Object literal may only specify known properties and 'name' does not exist in type 'C'.
|
||||
case new C():
|
||||
}
|
||||
|
||||
|
||||
@@ -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<boolean, string>'.
|
||||
Property '[Symbol.toPrimitive]' does not exist on type 'I<boolean, string>'.
|
||||
Object literal may only specify known properties and '[Symbol.toPrimitive]' does not exist in type 'I<boolean, string>'.
|
||||
|
||||
|
||||
==== 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<boolean, string>'.
|
||||
!!! error TS2345: Property '[Symbol.toPrimitive]' does not exist on type 'I<boolean, string>'.
|
||||
!!! error TS2345: Object literal may only specify known properties and '[Symbol.toPrimitive]' does not exist in type 'I<boolean, string>'.
|
||||
@@ -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; }'.
|
||||
Property 'y' does not exist on 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: Property 'y' does not exist on 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
|
||||
|
||||
@@ -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; }'.
|
||||
Property 'y' does not exist on 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: Property 'y' does not exist on 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
|
||||
|
||||
@@ -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; }'.
|
||||
Property 'b' does not exist on 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: Property 'b' does not exist on type '{ name: string; a: number; }'.
|
||||
!!! error TS2453: Object literal may only specify known properties and 'b' does not exist in type '{ name: string; a: number; }'.
|
||||
@@ -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; }'.
|
||||
Property 'y' does not exist on 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'.
|
||||
Property 'y' does not exist on 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: Property 'y' does not exist on 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<A92>(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: Property 'y' does not exist on 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
|
||||
|
||||
@@ -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; }'.
|
||||
Property 'y' does not exist on 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'.
|
||||
Property 'y' does not exist on 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: Property 'y' does not exist on 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: Property 'y' does not exist on 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
|
||||
|
||||
@@ -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; }'.
|
||||
Property 'y' does not exist on 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'.
|
||||
Property 'y' does not exist on 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: Property 'y' does not exist on 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: Property 'y' does not exist on 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/compiler/typeInfer1.ts(11,5): error TS2322: Type '{ Moo: () => string; }' is not assignable to type 'ITextWriter2'.
|
||||
Property 'Moo' does not exist on 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: Property 'Moo' does not exist on type 'ITextWriter2'.
|
||||
!!! error TS2322: Object literal may only specify known properties and 'Moo' does not exist in type 'ITextWriter2'.
|
||||
Moo: function() { return "cow"; }
|
||||
}
|
||||
@@ -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; }'.
|
||||
Property 'z' does not exist on 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; }'.
|
||||
Property 'z' does not exist on 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; }'.
|
||||
Property 'z' does not exist on 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: Property 'z' does not exist on 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: Property 'z' does not exist on 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: Property 'z' does not exist on 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; }'.
|
||||
|
||||
Reference in New Issue
Block a user