We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8173733 commit c78a6a5Copy full SHA for c78a6a5
1 file changed
src/compiler/checker.ts
@@ -5936,7 +5936,7 @@ namespace ts {
5936
if (unionSignatures.length > 1) {
5937
let thisParameter = signature.thisParameter;
5938
if (forEach(unionSignatures, sig => sig.thisParameter)) {
5939
- const thisType = getUnionType(map(unionSignatures, sig => getTypeOfSymbol(sig.thisParameter) || anyType), UnionReduction.Subtype);
+ const thisType = getUnionType(map(unionSignatures, sig => sig.thisParameter ? getTypeOfSymbol(sig.thisParameter) : anyType), UnionReduction.Subtype);
5940
thisParameter = createSymbolWithType(signature.thisParameter, thisType);
5941
}
5942
s = cloneSignature(signature);
0 commit comments