Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions pkg/printer/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4272,9 +4272,10 @@ func (p *Printer) emitPropertyAssignment(node *ast.PropertyAssignment) {
// "comment1" is not considered to be leading comment for node.initializer
// but rather a trailing comment on the previous node.
initializer := node.Initializer

// !!! emit trailing comments of initializer

if p.emitContext.EmitFlags(initializer)&EFNoLeadingComments == 0 {
commentRange := getCommentRange(initializer)
p.emitTrailingComments(commentRange.Pos(), commentSeparatorAfter)
}
p.emitExpression(initializer, ast.OperatorPrecedenceDisallowComma)
p.exitNode(node.AsNode(), state)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ var v = {

//// [commentsBeforeFunctionExpression1.js]
var v = {
f: (a) => 0
f: /**own f*/ (a) => 0
};

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ var i2_i_nc_fnfoo = i2_i.nc_fnfoo;
var i2_i_nc_fnfoo_r = i2_i.nc_fnfoo(10);
var i3_i;
i3_i = {
f: (/**i3_i a*/ a) => "Hello" + a,
f: /**own f*/ (/**i3_i a*/ a) => "Hello" + a,
l: this.f,
/** own x*/
x: this.f(10),
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ var resolve = {

//// [commentsOnPropertyOfObjectLiteral1.js]
var resolve = {
id: (details) => details.id,
id1: "hello",
id: /*! @ngInject */ (details) => details.id,
id1: /* c1 */ "hello",
id2:
/*! @ngInject */ (details) => details.id,
id3:
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.getVar = getVar;
const index_1 = require("../sub-project/index");
const variable = {
key: 'value',
key: /** @type {MyNominal} */ 'value',
};
/**
* @return {keyof typeof variable}
Expand Down