=== tests/cases/compiler/commentsVarDecl.ts === /** Variable comments*/ var myVariable = 10; // This trailing Comment1 >myVariable : Symbol(myVariable, Decl(commentsVarDecl.ts, 2, 3)) /** This is another variable comment*/ var anotherVariable = 30; >anotherVariable : Symbol(anotherVariable, Decl(commentsVarDecl.ts, 5, 3)) // shouldn't appear var aVar = ""; >aVar : Symbol(aVar, Decl(commentsVarDecl.ts, 8, 3)) /** this is multiline comment * All these variables are of number type */ var anotherAnotherVariable = 70; /* these are multiple trailing comments */ /* multiple trailing comments */ >anotherAnotherVariable : Symbol(anotherAnotherVariable, Decl(commentsVarDecl.ts, 12, 3)) /** Triple slash multiline comment*/ /** another line in the comment*/ /** comment line 2*/ var x = 70; /* multiline trailing comment >x : Symbol(x, Decl(commentsVarDecl.ts, 17, 3)) this is multiline trailing comment */ /** Triple slash comment on the assignement shouldnt be in .d.ts file*/ x = myVariable; >x : Symbol(x, Decl(commentsVarDecl.ts, 17, 3)) >myVariable : Symbol(myVariable, Decl(commentsVarDecl.ts, 2, 3)) /** triple slash comment1*/ /** jsdocstyle comment - only this comment should be in .d.ts file*/ var n = 30; >n : Symbol(n, Decl(commentsVarDecl.ts, 24, 3)) /** var deckaration with comment on type as well*/ var y = /** value comment */ 20; >y : Symbol(y, Decl(commentsVarDecl.ts, 27, 3)) /// var deckaration with comment on type as well var yy = >yy : Symbol(yy, Decl(commentsVarDecl.ts, 30, 3)) /// value comment 20; /** comment2 */ var z = /** lambda comment */ (x: number, y: number) => x + y; >z : Symbol(z, Decl(commentsVarDecl.ts, 35, 3)) >x : Symbol(x, Decl(commentsVarDecl.ts, 35, 31)) >y : Symbol(y, Decl(commentsVarDecl.ts, 35, 41)) >x : Symbol(x, Decl(commentsVarDecl.ts, 35, 31)) >y : Symbol(y, Decl(commentsVarDecl.ts, 35, 41)) var z2: /** type comment*/ (x: number) => string; >z2 : Symbol(z2, Decl(commentsVarDecl.ts, 37, 3)) >x : Symbol(x, Decl(commentsVarDecl.ts, 37, 28)) var x2 = z2; >x2 : Symbol(x2, Decl(commentsVarDecl.ts, 39, 3)) >z2 : Symbol(z2, Decl(commentsVarDecl.ts, 37, 3)) var n4: (x: number) => string; >n4 : Symbol(n4, Decl(commentsVarDecl.ts, 41, 3)) >x : Symbol(x, Decl(commentsVarDecl.ts, 41, 9)) n4 = z2; >n4 : Symbol(n4, Decl(commentsVarDecl.ts, 41, 3)) >z2 : Symbol(z2, Decl(commentsVarDecl.ts, 37, 3))