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

26 lines
627 B
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== 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 '{}'.