Skip to content

Commit c78a6a5

Browse files
committed
Fix 'this' parameter handling in getUnionSignatures
1 parent 8173733 commit c78a6a5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5936,7 +5936,7 @@ namespace ts {
59365936
if (unionSignatures.length > 1) {
59375937
let thisParameter = signature.thisParameter;
59385938
if (forEach(unionSignatures, sig => sig.thisParameter)) {
5939-
const thisType = getUnionType(map(unionSignatures, sig => getTypeOfSymbol(sig.thisParameter) || anyType), UnionReduction.Subtype);
5939+
const thisType = getUnionType(map(unionSignatures, sig => sig.thisParameter ? getTypeOfSymbol(sig.thisParameter) : anyType), UnionReduction.Subtype);
59405940
thisParameter = createSymbolWithType(signature.thisParameter, thisType);
59415941
}
59425942
s = cloneSignature(signature);

0 commit comments

Comments
 (0)