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

18 lines
634 B
Plaintext

==== tests/cases/compiler/implicitAnyDeclareVariablesWithoutTypeAndInit.ts (3 errors) ====
// this should be an error
var x; // error at "x"
~
!!! Variable 'x' implicitly has an 'any' type.
declare var foo; // error at "foo"
~~~
!!! Variable 'foo' implicitly has an 'any' type.
function func(k) { }; //error at "k"
~
!!! Parameter 'k' implicitly has an 'any' type.
func(x);
// this shouldn't be an error
var bar = 3;
var bar1: any;
declare var bar2: any;
var x1: any; var y1 = new x1;