TypeScript/tests/baselines/reference/assignmentCompat1.errors.txt

12 lines
452 B
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/assignmentCompat1.ts (2 errors) ====
var x = {one: 1};
var y: {[index:string]: any};
x = y;
~
!!! Type '{ [x: string]: any; }' is not assignable to type '{ one: number; }':
!!! Property 'one' is missing in type '{ [x: string]: any; }'.
y = x;
~
!!! Type '{ one: number; }' is not assignable to type '{ [x: string]: any; }':
!!! Index signature is missing in type '{ one: number; }'.