TypeScript/tests/baselines/reference/duplicateVariablesWithAny.js
Sheetal Nandi 6ab3adfd43 Modified the emitComment logic to handle emitting leading or trailing spaces depending on flags
Leading comments have trailing separator while trailing comments have leading space
This removes the extra trailing space in the trailing comments
2014-08-15 14:32:08 -07:00

35 lines
591 B
TypeScript

//// [duplicateVariablesWithAny.ts]
// They should have to be the same even when one of the types is 'any'
var x: any;
var x = 2; //error
var y = "";
var y; //error
module N {
var x: any;
var x = 2; //error
var y = "";
var y; //error
}
var z: any;
var z; // ok
//// [duplicateVariablesWithAny.js]
// They should have to be the same even when one of the types is 'any'
var x;
var x = 2; //error
var y = "";
var y; //error
var N;
(function (N) {
var x;
var x = 2; //error
var y = "";
var y; //error
})(N || (N = {}));
var z;
var z; // ok