TypeScript/tests/baselines/reference/unionTypeWithRecursiveSubtypeReduction3.errors.txt
2015-05-13 15:27:40 -07:00

14 lines
No EOL
674 B
Text

tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction3.ts(5,5): error TS2322: Type '{ prop: number; } | { prop: { prop: number; } | any; }' is not assignable to type 'string'.
Type '{ prop: number; }' is not assignable to type 'string'.
==== tests/cases/compiler/unionTypeWithRecursiveSubtypeReduction3.ts (1 errors) ====
var a27: { prop: number } | { prop: T27 };
type T27 = typeof a27;
var b: T27;
var s: string = b;
~
!!! error TS2322: Type '{ prop: number; } | { prop: { prop: number; } | any; }' is not assignable to type 'string'.
!!! error TS2322: Type '{ prop: number; }' is not assignable to type 'string'.