Remove target-following code when erasing signatures
Fixes return type of inherited default constructors when they are generic.
This commit is contained in:
parent
c172c06777
commit
0001b8cb37
1 changed files with 1 additions and 6 deletions
|
@ -4577,12 +4577,7 @@ namespace ts {
|
|||
function getErasedSignature(signature: Signature): Signature {
|
||||
if (!signature.typeParameters) return signature;
|
||||
if (!signature.erasedSignatureCache) {
|
||||
if (signature.target) {
|
||||
signature.erasedSignatureCache = instantiateSignature(getErasedSignature(signature.target), signature.mapper);
|
||||
}
|
||||
else {
|
||||
signature.erasedSignatureCache = instantiateSignature(signature, createTypeEraser(signature.typeParameters), /*eraseTypeParameters*/ true);
|
||||
}
|
||||
signature.erasedSignatureCache = instantiateSignature(signature, createTypeEraser(signature.typeParameters), /*eraseTypeParameters*/ true);
|
||||
}
|
||||
return signature.erasedSignatureCache;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue