TypeScript/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType2.js

41 lines
773 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [implicitAnyDeclareFunctionWithoutFormalType2.ts]
// generates function fn1(): number;
function fn1() {
var x: number;
return x;
}
// generates function fn2(): any;
function fn2(): any {
var x: any;
return x;
}
// generates function fn3();
function fn3() {
var x: any;
return x;
}
//// [implicitAnyDeclareFunctionWithoutFormalType2.js]
// generates function fn1(): number;
2014-07-13 01:04:16 +02:00
function fn1() {
var x;
return x;
}
// generates function fn2(): any;
2014-07-13 01:04:16 +02:00
function fn2() {
var x;
return x;
}
// generates function fn3();
2014-07-13 01:04:16 +02:00
function fn3() {
var x;
return x;
}
//// [implicitAnyDeclareFunctionWithoutFormalType2.d.ts]
2014-07-12 01:36:06 +02:00
declare function fn1(): number;
declare function fn2(): any;
declare function fn3(): any;