-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JS EmitThe issue relates to the emission of JavaScriptThe issue relates to the emission of JavaScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issueRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone
Milestone
Description
function Decorator() {
return (target: new (...args: any[]) => any) => {};
}
try {
@Decorator()
class MyClass {
public static func(): MyClass {
return new MyClass();
}
}
}
catch (e)
{
}
Current Emit
try {
var MyClass_1 = /** @class */ (function () {
function MyClass() {
}
MyClass_2 = MyClass_1;
MyClass.func = function () {
return new MyClass_2();
};
var MyClass_2;
MyClass_1 = MyClass_2 = __decorate([
Decorator()
], MyClass_1);
return MyClass;
}());
}
catch (e) {
}
Expected Emit
try {
var MyClass = /** @class */ (function () {
function MyClass() {
}
MyClass_1 = MyClass;
MyClass.func = function () {
return new MyClass_1();
};
var MyClass_1;
MyClass = MyClass_1 = __decorate([
Decorator()
], MyClass);
return MyClass;
}());
}
catch(e) {
}
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JS EmitThe issue relates to the emission of JavaScriptThe issue relates to the emission of JavaScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issueRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone