You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (constructSignatures && constructSignatures.length !== 0) {
13027
+
var instanceType = getUnionType(ts.map(constructSignatures, function (signature) { return getReturnTypeOfSignature(getErasedSignature(signature)); }));
13028
+
if (type.flags & 16384) {
13029
+
return getUnionType(ts.filter(type.types, function (t) { return isTypeSubtypeOf(t, instanceType); }));
13030
+
}
13031
+
return instanceType;
13017
13032
}
13018
13033
return type;
13019
13034
}
@@ -23260,15 +23275,6 @@ var ts;
23260
23275
scopeEmitEnd();
23261
23276
if (thisNodeIsDecorated) {
23262
23277
write(";");
23263
-
if (node.name) {
23264
-
writeLine();
23265
-
write("Object.defineProperty(");
23266
-
emitDeclarationName(node);
23267
-
write(", \"name\", { value: \"");
23268
-
emitDeclarationName(node);
23269
-
write("\", configurable: true });");
23270
-
writeLine();
23271
-
}
23272
23278
}
23273
23279
if (isClassExpressionWithStaticProperties) {
23274
23280
for (var _a = 0; _a < staticProperties.length; _a++) {
if (constructSignatures && constructSignatures.length !== 0) {
13411
+
var instanceType = getUnionType(ts.map(constructSignatures, function (signature) { return getReturnTypeOfSignature(getErasedSignature(signature)); }));
13412
+
if (type.flags & 16384) {
13413
+
return getUnionType(ts.filter(type.types, function (t) { return isTypeSubtypeOf(t, instanceType); }));
13414
+
}
13415
+
return instanceType;
13401
13416
}
13402
13417
return type;
13403
13418
}
@@ -23644,15 +23659,6 @@ var ts;
23644
23659
scopeEmitEnd();
23645
23660
if (thisNodeIsDecorated) {
23646
23661
write(";");
23647
-
if (node.name) {
23648
-
writeLine();
23649
-
write("Object.defineProperty(");
23650
-
emitDeclarationName(node);
23651
-
write(", \"name\", { value: \"");
23652
-
emitDeclarationName(node);
23653
-
write("\", configurable: true });");
23654
-
writeLine();
23655
-
}
23656
23662
}
23657
23663
if (isClassExpressionWithStaticProperties) {
23658
23664
for (var _a = 0; _a < staticProperties.length; _a++) {
if (constructSignatures && constructSignatures.length !== 0) {
15757
+
var instanceType = getUnionType(ts.map(constructSignatures, function (signature) { return getReturnTypeOfSignature(getErasedSignature(signature)); }));
15758
+
// Pickup type from union types
15759
+
if (type.flags & 16384 /* Union */) {
15760
+
return getUnionType(ts.filter(type.types, function (t) { return isTypeSubtypeOf(t, instanceType); }));
if (constructSignatures && constructSignatures.length !== 0) {
15757
+
var instanceType = getUnionType(ts.map(constructSignatures, function (signature) { return getReturnTypeOfSignature(getErasedSignature(signature)); }));
15758
+
// Pickup type from union types
15759
+
if (type.flags & 16384 /* Union */) {
15760
+
return getUnionType(ts.filter(type.types, function (t) { return isTypeSubtypeOf(t, instanceType); }));
0 commit comments