TypeScript/tests/baselines/reference/commentsVarDecl.js
2014-07-15 13:08:10 -07:00

76 lines
1.6 KiB
JavaScript

//// [commentsVarDecl.ts]
/** Variable comments*/
var myVariable = 10;
/** This is another variable comment*/
var anotherVariable = 30;
// shouldn't appear
var aVar = "";
/** this is multiline comment
* All these variables are of number type */
var anotherAnotherVariable = 70;
/** Triple slash multiline comment*/
/** another line in the comment*/
/** comment line 2*/
var x = 70;
/** Triple slash comment on the assignement shouldnt be in .d.ts file*/
x = myVariable;
/** triple slash comment1*/
/** jsdocstyle comment - only this comment should be in .d.ts file*/
var n = 30;
/** var deckaration with comment on type as well*/
var y = /** value comment */ 20;
/// var deckaration with comment on type as well
var yy =
/// value comment
20;
/** comment2 */
var z = /** lambda comment */ (x: number, y: number) => x + y;
var z2: /** type comment*/ (x: number) => string;
var x2 = z2;
var n4: (x: number) => string;
n4 = z2;
//// [commentsVarDecl.js]
var myVariable = 10;
var anotherVariable = 30;
var aVar = "";
var anotherAnotherVariable = 70;
var x = 70;
x = myVariable;
var n = 30;
var y = 20;
var yy = 20;
var z = function (x, y) { return x + y; };
var z2;
var x2 = z2;
var n4;
n4 = z2;
//// [commentsVarDecl.d.ts]
declare var myVariable: number;
declare var anotherVariable: number;
declare var aVar: string;
declare var anotherAnotherVariable: number;
declare var x: number;
declare var n: number;
declare var y: number;
declare var yy: number;
declare var z: (x: number, y: number) => number;
declare var z2: (x: number) => string;
declare var x2: (x: number) => string;
declare var n4: (x: number) => string;