TypeScript/tests/baselines/reference/defaultBestCommonTypesHaveDecls.errors.txt
2014-07-12 17:30:19 -07:00

26 lines
627 B
Plaintext

==== tests/cases/compiler/defaultBestCommonTypesHaveDecls.ts (3 errors) ====
var obj1: {};
obj1.length;
~~~~~~
!!! Property 'length' does not exist on type '{}'.
var obj2: Object;
obj2.length;
~~~~~~
!!! Property 'length' does not exist on type 'Object'.
function concat<T>(x: T, y: T): T { return null; }
var result = concat(1, "");
var elementCount = result.length; // would like to get an error by now
~~~~~~
!!! Property 'length' does not exist on type '{}'.