Skip to content

Commit d069da2

Browse files
committed
Update getAugmentedPropertiesOfType
1 parent a5dece3 commit d069da2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/compiler/checker.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27758,8 +27758,11 @@ namespace ts {
2775827758
function getAugmentedPropertiesOfType(type: Type): Symbol[] {
2775927759
type = getApparentType(type);
2776027760
const propsByName = createSymbolTable(getPropertiesOfType(type));
27761-
if (typeHasCallOrConstructSignatures(type)) {
27762-
forEach(getPropertiesOfType(globalFunctionType), p => {
27761+
const functionType = getSignaturesOfType(type, SignatureKind.Call).length ? globalCallableFunctionType :
27762+
getSignaturesOfType(type, SignatureKind.Call).length ? globalNewableFunctionType :
27763+
undefined;
27764+
if (functionType) {
27765+
forEach(getPropertiesOfType(functionType), p => {
2776327766
if (!propsByName.has(p.escapedName)) {
2776427767
propsByName.set(p.escapedName, p);
2776527768
}

0 commit comments

Comments
 (0)