mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Update comments in test
This commit is contained in:
@@ -10,14 +10,14 @@ tests/cases/conformance/types/intersection/commonTypeIntersection.ts(4,5): error
|
||||
|
||||
==== tests/cases/conformance/types/intersection/commonTypeIntersection.ts (2 errors) ====
|
||||
declare let x1: { __typename?: 'TypeTwo' } & { a: boolean };
|
||||
let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // No error!
|
||||
let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // should error here
|
||||
~~
|
||||
!!! error TS2322: Type '{ __typename?: "TypeTwo"; } & { a: boolean; }' is not assignable to type '{ __typename?: "TypeOne"; } & { a: boolean; }'.
|
||||
!!! error TS2322: Type '{ __typename?: "TypeTwo"; } & { a: boolean; }' is not assignable to type '{ __typename?: "TypeOne"; }'.
|
||||
!!! error TS2322: Types of property '__typename' are incompatible.
|
||||
!!! error TS2322: Type '"TypeTwo"' is not assignable to type '"TypeOne"'.
|
||||
declare let x2: { __typename?: 'TypeTwo' } & string;
|
||||
let y2: { __typename?: 'TypeOne' } & string = x2; // No error!
|
||||
let y2: { __typename?: 'TypeOne' } & string = x2; // should error here
|
||||
~~
|
||||
!!! error TS2322: Type '{ __typename?: "TypeTwo"; } & string' is not assignable to type '{ __typename?: "TypeOne"; } & string'.
|
||||
!!! error TS2322: Type '{ __typename?: "TypeTwo"; } & string' is not assignable to type '{ __typename?: "TypeOne"; }'.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
//// [commonTypeIntersection.ts]
|
||||
declare let x1: { __typename?: 'TypeTwo' } & { a: boolean };
|
||||
let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // No error!
|
||||
let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // should error here
|
||||
declare let x2: { __typename?: 'TypeTwo' } & string;
|
||||
let y2: { __typename?: 'TypeOne' } & string = x2; // No error!
|
||||
let y2: { __typename?: 'TypeOne' } & string = x2; // should error here
|
||||
|
||||
|
||||
//// [commonTypeIntersection.js]
|
||||
var y1 = x1; // No error!
|
||||
var y2 = x2; // No error!
|
||||
var y1 = x1; // should error here
|
||||
var y2 = x2; // should error here
|
||||
|
||||
@@ -4,7 +4,7 @@ declare let x1: { __typename?: 'TypeTwo' } & { a: boolean };
|
||||
>__typename : Symbol(__typename, Decl(commonTypeIntersection.ts, 0, 17))
|
||||
>a : Symbol(a, Decl(commonTypeIntersection.ts, 0, 46))
|
||||
|
||||
let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // No error!
|
||||
let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // should error here
|
||||
>y1 : Symbol(y1, Decl(commonTypeIntersection.ts, 1, 3))
|
||||
>__typename : Symbol(__typename, Decl(commonTypeIntersection.ts, 1, 9))
|
||||
>a : Symbol(a, Decl(commonTypeIntersection.ts, 1, 38))
|
||||
@@ -14,7 +14,7 @@ declare let x2: { __typename?: 'TypeTwo' } & string;
|
||||
>x2 : Symbol(x2, Decl(commonTypeIntersection.ts, 2, 11))
|
||||
>__typename : Symbol(__typename, Decl(commonTypeIntersection.ts, 2, 17))
|
||||
|
||||
let y2: { __typename?: 'TypeOne' } & string = x2; // No error!
|
||||
let y2: { __typename?: 'TypeOne' } & string = x2; // should error here
|
||||
>y2 : Symbol(y2, Decl(commonTypeIntersection.ts, 3, 3))
|
||||
>__typename : Symbol(__typename, Decl(commonTypeIntersection.ts, 3, 9))
|
||||
>x2 : Symbol(x2, Decl(commonTypeIntersection.ts, 2, 11))
|
||||
|
||||
@@ -4,7 +4,7 @@ declare let x1: { __typename?: 'TypeTwo' } & { a: boolean };
|
||||
>__typename : "TypeTwo"
|
||||
>a : boolean
|
||||
|
||||
let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // No error!
|
||||
let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // should error here
|
||||
>y1 : { __typename?: "TypeOne"; } & { a: boolean; }
|
||||
>__typename : "TypeOne"
|
||||
>a : boolean
|
||||
@@ -14,7 +14,7 @@ declare let x2: { __typename?: 'TypeTwo' } & string;
|
||||
>x2 : { __typename?: "TypeTwo"; } & string
|
||||
>__typename : "TypeTwo"
|
||||
|
||||
let y2: { __typename?: 'TypeOne' } & string = x2; // No error!
|
||||
let y2: { __typename?: 'TypeOne' } & string = x2; // should error here
|
||||
>y2 : { __typename?: "TypeOne"; } & string
|
||||
>__typename : "TypeOne"
|
||||
>x2 : { __typename?: "TypeTwo"; } & string
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
declare let x1: { __typename?: 'TypeTwo' } & { a: boolean };
|
||||
let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // No error!
|
||||
let y1: { __typename?: 'TypeOne' } & { a: boolean} = x1; // should error here
|
||||
declare let x2: { __typename?: 'TypeTwo' } & string;
|
||||
let y2: { __typename?: 'TypeOne' } & string = x2; // No error!
|
||||
let y2: { __typename?: 'TypeOne' } & string = x2; // should error here
|
||||
|
||||
Reference in New Issue
Block a user