mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
address CR feedback
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
tests/cases/conformance/types/nonPrimitive/nonPrimitiveAssignError.ts(5,1): error TS2322: Type 'object' is not assignable to type '{ foo: string; }'.
|
||||
Property 'foo' is missing in type 'object'.
|
||||
tests/cases/conformance/types/nonPrimitive/nonPrimitiveAssignError.ts(11,1): error TS2322: Type 'number' is not assignable to type 'object'.
|
||||
tests/cases/conformance/types/nonPrimitive/nonPrimitiveAssignError.ts(12,1): error TS2322: Type 'true' is not assignable to type 'object'.
|
||||
tests/cases/conformance/types/nonPrimitive/nonPrimitiveAssignError.ts(13,1): error TS2322: Type 'string' is not assignable to type 'object'.
|
||||
tests/cases/conformance/types/nonPrimitive/nonPrimitiveAssignError.ts(15,1): error TS2322: Type 'object' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/nonPrimitive/nonPrimitiveAssignError.ts(16,1): error TS2322: Type 'object' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/types/nonPrimitive/nonPrimitiveAssignError.ts(17,1): error TS2322: Type 'object' is not assignable to type 'string'.
|
||||
tests/cases/conformance/types/nonPrimitive/nonPrimitiveAssignError.ts(13,1): error TS2322: Type 'number' is not assignable to type 'object'.
|
||||
tests/cases/conformance/types/nonPrimitive/nonPrimitiveAssignError.ts(14,1): error TS2322: Type 'true' is not assignable to type 'object'.
|
||||
tests/cases/conformance/types/nonPrimitive/nonPrimitiveAssignError.ts(15,1): error TS2322: Type 'string' is not assignable to type 'object'.
|
||||
tests/cases/conformance/types/nonPrimitive/nonPrimitiveAssignError.ts(17,1): error TS2322: Type 'object' is not assignable to type 'number'.
|
||||
tests/cases/conformance/types/nonPrimitive/nonPrimitiveAssignError.ts(18,1): error TS2322: Type 'object' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/types/nonPrimitive/nonPrimitiveAssignError.ts(19,1): error TS2322: Type 'object' is not assignable to type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/nonPrimitive/nonPrimitiveAssignError.ts (7 errors) ====
|
||||
@@ -17,6 +17,8 @@ tests/cases/conformance/types/nonPrimitive/nonPrimitiveAssignError.ts(17,1): err
|
||||
~
|
||||
!!! error TS2322: Type 'object' is not assignable to type '{ foo: string; }'.
|
||||
!!! error TS2322: Property 'foo' is missing in type 'object'.
|
||||
a = x;
|
||||
a = y;
|
||||
|
||||
var n = 123;
|
||||
var b = true;
|
||||
|
||||
@@ -4,6 +4,8 @@ var y = {foo: "bar"};
|
||||
var a: object;
|
||||
x = a;
|
||||
y = a; // expect error
|
||||
a = x;
|
||||
a = y;
|
||||
|
||||
var n = 123;
|
||||
var b = true;
|
||||
@@ -32,6 +34,8 @@ var y = { foo: "bar" };
|
||||
var a;
|
||||
x = a;
|
||||
y = a; // expect error
|
||||
a = x;
|
||||
a = y;
|
||||
var n = 123;
|
||||
var b = true;
|
||||
var s = "fooo";
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/conformance/types/nonPrimitive/nonPriimitiveInFunction.ts(12,12): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'object'.
|
||||
tests/cases/conformance/types/nonPrimitive/nonPriimitiveInFunction.ts(13,1): error TS2322: Type 'object' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/types/nonPrimitive/nonPriimitiveInFunction.ts(17,12): error TS2322: Type 'number' is not assignable to type 'object'.
|
||||
tests/cases/conformance/types/nonPrimitive/nonPrimitiveInFunction.ts(12,12): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'object'.
|
||||
tests/cases/conformance/types/nonPrimitive/nonPrimitiveInFunction.ts(13,1): error TS2322: Type 'object' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/types/nonPrimitive/nonPrimitiveInFunction.ts(17,12): error TS2322: Type 'number' is not assignable to type 'object'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/nonPrimitive/nonPriimitiveInFunction.ts (3 errors) ====
|
||||
==== tests/cases/conformance/types/nonPrimitive/nonPrimitiveInFunction.ts (3 errors) ====
|
||||
function takeObject(o: object) {}
|
||||
function returnObject(): object {
|
||||
return {};
|
||||
@@ -1,4 +1,4 @@
|
||||
//// [nonPriimitiveInFunction.ts]
|
||||
//// [nonPrimitiveInFunction.ts]
|
||||
function takeObject(o: object) {}
|
||||
function returnObject(): object {
|
||||
return {};
|
||||
@@ -19,7 +19,7 @@ function returnError(): object {
|
||||
}
|
||||
|
||||
|
||||
//// [nonPriimitiveInFunction.js]
|
||||
//// [nonPrimitiveInFunction.js]
|
||||
function takeObject(o) { }
|
||||
function returnObject() {
|
||||
return {};
|
||||
@@ -3,6 +3,8 @@ var y = {foo: "bar"};
|
||||
var a: object;
|
||||
x = a;
|
||||
y = a; // expect error
|
||||
a = x;
|
||||
a = y;
|
||||
|
||||
var n = 123;
|
||||
var b = true;
|
||||
|
||||
Reference in New Issue
Block a user