Skip to content

Commit

Permalink
Update comments in test
Browse files Browse the repository at this point in the history
  • Loading branch information
sandersn committed Oct 29, 2019
1 parent 14d7a44 commit ea80362
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions tests/baselines/reference/commonTypeIntersection.errors.txt
Expand Up @@ -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"; }'.
Expand Down
8 changes: 4 additions & 4 deletions tests/baselines/reference/commonTypeIntersection.js
@@ -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 changes: 2 additions & 2 deletions tests/baselines/reference/commonTypeIntersection.symbols
Expand Up @@ -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))
Expand All @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions tests/baselines/reference/commonTypeIntersection.types
Expand Up @@ -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
Expand All @@ -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
Expand Down
@@ -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

0 comments on commit ea80362

Please sign in to comment.