diff --git a/tests/baselines/reference/commentsClassMembers.js b/tests/baselines/reference/commentsClassMembers.js index 0491e611814..e82d0198f63 100644 --- a/tests/baselines/reference/commentsClassMembers.js +++ b/tests/baselines/reference/commentsClassMembers.js @@ -7,7 +7,7 @@ class c1 { /** sum with property*/ public p2(/** number to add*/b: number) { return this.p1 + b; - } + } /* trailing comment of method*/ /** getter property*/ public get p3() { return this.p2(this.p1); @@ -21,7 +21,7 @@ class c1 { /** sum with property*/ private pp2(/** number to add*/b: number) { return this.p1 + b; - } + } // trailing comment of method /** getter property*/ private get pp3() { return this.pp2(this.pp1); @@ -224,7 +224,7 @@ var c1 = (function () { /** sum with property*/ c1.prototype.p2 = function (b) { return this.p1 + b; - }; + }; /* trailing comment of method*/ Object.defineProperty(c1.prototype, "p3", { /** getter property*/ get: function () { @@ -242,7 +242,7 @@ var c1 = (function () { /** sum with property*/ c1.prototype.pp2 = function (b) { return this.p1 + b; - }; + }; // trailing comment of method Object.defineProperty(c1.prototype, "pp3", { /** getter property*/ get: function () { diff --git a/tests/baselines/reference/commentsFunction.js b/tests/baselines/reference/commentsFunction.js index 1137bf4b325..b54bc4b9217 100644 --- a/tests/baselines/reference/commentsFunction.js +++ b/tests/baselines/reference/commentsFunction.js @@ -2,14 +2,14 @@ /** This comment should appear for foo*/ function foo() { -} +} /* trailing comment of function */ foo(); /** This is comment for function signature*/ function fooWithParameters(/** this is comment about a*/a: string, /** this is comment for b*/ b: number) { var d = a; -} +} // trailing comment of function fooWithParameters("a", 10); /** fooFunc * comment @@ -33,19 +33,21 @@ function blah2(a: string /* single line multiple trailing comments */ /* second function blah3(a: string // trailing commen single line ) { -} +} + +lambdaFoo = (a, b) => a * b; // This is trailing comment that will not get emitted since we are not emitting statement comments yet //// [commentsFunction.js] /** This comment should appear for foo*/ function foo() { -} +} /* trailing comment of function */ foo(); /** This is comment for function signature*/ function fooWithParameters(a, /** this is comment for b*/ b) { var d = a; -} +} // trailing comment of function fooWithParameters("a", 10); /** fooFunc * comment @@ -66,6 +68,7 @@ function blah2(a /* single line multiple trailing comments */ /* second */ ) { function blah3(a // trailing commen single line ) { } +lambdaFoo = function (a, b) { return a * b; }; //// [commentsFunction.d.ts] diff --git a/tests/cases/compiler/commentsClassMembers.ts b/tests/cases/compiler/commentsClassMembers.ts index 6ff1abb6429..5ddb6488b96 100644 --- a/tests/cases/compiler/commentsClassMembers.ts +++ b/tests/cases/compiler/commentsClassMembers.ts @@ -9,7 +9,7 @@ class c1 { /** sum with property*/ public p2(/** number to add*/b: number) { return this.p1 + b; - } + } /* trailing comment of method*/ /** getter property*/ public get p3() { return this.p2(this.p1); @@ -23,7 +23,7 @@ class c1 { /** sum with property*/ private pp2(/** number to add*/b: number) { return this.p1 + b; - } + } // trailing comment of method /** getter property*/ private get pp3() { return this.pp2(this.pp1); diff --git a/tests/cases/compiler/commentsFunction.ts b/tests/cases/compiler/commentsFunction.ts index f26816054ee..aa16a505c68 100644 --- a/tests/cases/compiler/commentsFunction.ts +++ b/tests/cases/compiler/commentsFunction.ts @@ -4,14 +4,14 @@ /** This comment should appear for foo*/ function foo() { -} +} /* trailing comment of function */ foo(); /** This is comment for function signature*/ function fooWithParameters(/** this is comment about a*/a: string, /** this is comment for b*/ b: number) { var d = a; -} +} // trailing comment of function fooWithParameters("a", 10); /** fooFunc * comment @@ -35,4 +35,6 @@ function blah2(a: string /* single line multiple trailing comments */ /* second function blah3(a: string // trailing commen single line ) { -} \ No newline at end of file +} + +lambdaFoo = (a, b) => a * b; // This is trailing comment that will not get emitted since we are not emitting statement comments yet \ No newline at end of file