2014-07-19 00:19:23 +02:00
|
|
|
==== tests/cases/compiler/conflictingTypeAnnotatedVar.ts (4 errors) ====
|
2014-07-13 01:04:16 +02:00
|
|
|
var foo: string;
|
|
|
|
function foo(): number { }
|
|
|
|
~~~
|
|
|
|
!!! Duplicate identifier 'foo'.
|
2014-07-19 00:19:23 +02:00
|
|
|
~~~~~~
|
2014-07-21 20:36:29 +02:00
|
|
|
!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
|
2014-07-13 01:04:16 +02:00
|
|
|
function foo(): number { }
|
|
|
|
~~~
|
2014-07-19 00:19:23 +02:00
|
|
|
!!! Duplicate identifier 'foo'.
|
|
|
|
~~~~~~
|
2014-07-21 20:36:29 +02:00
|
|
|
!!! A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement.
|