Emit the property assignment comments of the object literal
This commit is contained in:
parent
871507e386
commit
d815c14943
|
@ -716,9 +716,11 @@ module ts {
|
|||
}
|
||||
|
||||
function emitPropertyAssignment(node: PropertyDeclaration) {
|
||||
emitLeadingComments(node);
|
||||
emit(node.name);
|
||||
write(": ");
|
||||
emit(node.initializer);
|
||||
emitTrailingComments(node);
|
||||
}
|
||||
|
||||
function emitPropertyAccess(node: PropertyAccess) {
|
||||
|
|
|
@ -91,6 +91,7 @@ var i3_i;
|
|||
i3_i = {
|
||||
f: function (a) { return "Hello" + a; },
|
||||
l: this.f,
|
||||
/** own x*/
|
||||
x: this.f(10),
|
||||
nc_x: this.l(this.x),
|
||||
nc_f: this.f,
|
||||
|
|
|
@ -14,6 +14,11 @@ var Person = makeClass(
|
|||
|
||||
//// [commentsOnObjectLiteral2.js]
|
||||
var Person = makeClass({
|
||||
/**
|
||||
This is just another way to define a constructor.
|
||||
@constructs
|
||||
@param {string} name The name of the person.
|
||||
*/
|
||||
initialize: function (name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
|
|
@ -7,5 +7,6 @@ var a = {
|
|||
|
||||
//// [commentsPropertySignature1.js]
|
||||
var a = {
|
||||
/** own x*/
|
||||
x: 0
|
||||
};
|
||||
|
|
|
@ -92,6 +92,7 @@ var b = {
|
|||
var a = x['foo']();
|
||||
return a + x.notHere();
|
||||
},
|
||||
// BUG 794164
|
||||
bar: b.foo(1).notHere()
|
||||
};
|
||||
var r4 = b.foo(new B());
|
||||
|
|
Loading…
Reference in a new issue