mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Merge pull request #20814 from Microsoft/fixUnionSignatures
Fix union signatures
This commit is contained in:
@@ -5936,7 +5936,7 @@ namespace ts {
|
||||
if (unionSignatures.length > 1) {
|
||||
let thisParameter = signature.thisParameter;
|
||||
if (forEach(unionSignatures, sig => sig.thisParameter)) {
|
||||
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);
|
||||
thisParameter = createSymbolWithType(signature.thisParameter, thisType);
|
||||
}
|
||||
s = cloneSignature(signature);
|
||||
|
||||
Reference in New Issue
Block a user