mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-08 18:11:45 -06:00
Switch to sameMap
This commit is contained in:
parent
696643998a
commit
73d63ec98c
@ -4821,20 +4821,8 @@ namespace ts {
|
||||
|
||||
function getInstantiatedConstructorsForTypeArguments(type: Type, typeArgumentNodes: TypeNode[], location: Node): Signature[] {
|
||||
const signatures = getConstructorsForTypeArguments(type, typeArgumentNodes, location);
|
||||
if (some(signatures)) {
|
||||
const result: Signature[] = [];
|
||||
const typeArguments = map(typeArgumentNodes, getTypeFromTypeNode);
|
||||
for (const sig of signatures) {
|
||||
if (some(sig.typeParameters)) {
|
||||
result.push(getSignatureInstantiation(sig, typeArguments));
|
||||
}
|
||||
else {
|
||||
result.push(sig);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return emptyArray;
|
||||
const typeArguments = map(typeArgumentNodes, getTypeFromTypeNode);
|
||||
return sameMap(signatures, sig => some(sig.typeParameters) ? getSignatureInstantiation(sig, typeArguments) : sig);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user