mirror of
https://gitee.com/openharmony/third_party_typescript
synced 2024-12-02 20:30:02 +00:00
parent
45e76e2bd2
commit
53d79a25d3
@ -1652,8 +1652,11 @@ module ts {
|
||||
if (superCall) statements = statements.slice(1);
|
||||
emitLines(statements);
|
||||
}
|
||||
decreaseIndent();
|
||||
writeLine();
|
||||
if (ctor) {
|
||||
emitLeadingCommentsOfPosition((<Block>ctor.body).statements.end);
|
||||
}
|
||||
decreaseIndent();
|
||||
emitToken(SyntaxKind.CloseBraceToken, ctor ? (<Block>ctor.body).statements.end : node.members.end);
|
||||
scopeEmitEnd();
|
||||
emitEnd(<Node>ctor || node);
|
||||
|
@ -20,6 +20,7 @@ Foo();
|
||||
//// [callOverloads1.js]
|
||||
var Foo = (function () {
|
||||
function Foo(x) {
|
||||
// WScript.Echo("Constructor function has executed");
|
||||
}
|
||||
Foo.prototype.bar1 = function () {
|
||||
};
|
||||
|
@ -28,6 +28,7 @@ Foo();
|
||||
//// [callOverloads2.js]
|
||||
var Foo = (function () {
|
||||
function Foo(x) {
|
||||
// WScript.Echo("Constructor function has executed");
|
||||
}
|
||||
Foo.prototype.bar1 = function () {
|
||||
};
|
||||
|
@ -21,6 +21,7 @@ Foo("s");
|
||||
//// [callOverloads3.js]
|
||||
var Foo = (function () {
|
||||
function Foo(x) {
|
||||
// WScript.Echo("Constructor function has executed");
|
||||
}
|
||||
Foo.prototype.bar1 = function () {
|
||||
};
|
||||
|
@ -21,6 +21,7 @@ Foo("s");
|
||||
//// [callOverloads4.js]
|
||||
var Foo = (function () {
|
||||
function Foo(x) {
|
||||
// WScript.Echo("Constructor function has executed");
|
||||
}
|
||||
Foo.prototype.bar1 = function () {
|
||||
};
|
||||
|
@ -22,6 +22,7 @@ Foo("s");
|
||||
//// [callOverloads5.js]
|
||||
var Foo = (function () {
|
||||
function Foo(x) {
|
||||
// WScript.Echo("Constructor function has executed");
|
||||
}
|
||||
Foo.prototype.bar1 = function (a) {
|
||||
};
|
||||
|
@ -63,6 +63,14 @@ class c8 {
|
||||
}
|
||||
var i8 = new c8();
|
||||
var i8_c = c8;
|
||||
|
||||
class c9 {
|
||||
constructor() {
|
||||
/// This is some detached comment
|
||||
|
||||
// should emit this leading comment of } too
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//// [commentsClass.js]
|
||||
@ -123,11 +131,20 @@ var c8 = (function () {
|
||||
/** constructor comment
|
||||
*/
|
||||
function c8() {
|
||||
/** constructor comment2
|
||||
*/
|
||||
}
|
||||
return c8;
|
||||
})();
|
||||
var i8 = new c8();
|
||||
var i8_c = c8;
|
||||
var c9 = (function () {
|
||||
function c9() {
|
||||
/// This is some detached comment
|
||||
// should emit this leading comment of } too
|
||||
}
|
||||
return c9;
|
||||
})();
|
||||
|
||||
|
||||
//// [commentsClass.d.ts]
|
||||
@ -178,3 +195,6 @@ declare class c8 {
|
||||
}
|
||||
declare var i8: c8;
|
||||
declare var i8_c: typeof c8;
|
||||
declare class c9 {
|
||||
constructor();
|
||||
}
|
||||
|
@ -130,3 +130,13 @@ var i8_c = c8;
|
||||
>i8_c : typeof c8
|
||||
>c8 : typeof c8
|
||||
|
||||
class c9 {
|
||||
>c9 : c9
|
||||
|
||||
constructor() {
|
||||
/// This is some detached comment
|
||||
|
||||
// should emit this leading comment of } too
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,3 +65,11 @@ class c8 {
|
||||
}
|
||||
var i8 = new c8();
|
||||
var i8_c = c8;
|
||||
|
||||
class c9 {
|
||||
constructor() {
|
||||
/// This is some detached comment
|
||||
|
||||
// should emit this leading comment of } too
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user