Skip to content

Commit 56f8256

Browse files
committed
Check SymbolFlags instead
1 parent 178f792 commit 56f8256

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17739,12 +17739,6 @@ namespace ts {
1773917739
}
1774017740
}
1774117741

17742-
// If a symbol is a synthesized symbol with no value declaration, we assume it is a property. Example of this are the synthesized
17743-
// '.prototype' property as well as synthesized tuple index properties.
17744-
function getDeclarationKindFromSymbol(s: Symbol) {
17745-
return s.valueDeclaration ? s.valueDeclaration.kind : SyntaxKind.PropertyDeclaration;
17746-
}
17747-
1774817742
function getDeclarationNodeFlagsFromSymbol(s: Symbol): NodeFlags {
1774917743
return s.valueDeclaration ? getCombinedNodeFlags(s.valueDeclaration) : 0;
1775017744
}
@@ -17881,10 +17875,7 @@ namespace ts {
1788117875
}
1788217876

1788317877
function symbolHasNonMethodDeclaration(symbol: Symbol) {
17884-
return forEachProperty(symbol, prop => {
17885-
const propKind = getDeclarationKindFromSymbol(prop);
17886-
return propKind !== SyntaxKind.MethodDeclaration && propKind !== SyntaxKind.MethodSignature;
17887-
});
17878+
return !!forEachProperty(symbol, prop => !(prop.flags & SymbolFlags.Method));
1788817879
}
1788917880

1789017881
function checkNonNullExpression(

0 commit comments

Comments
 (0)