File tree 1 file changed +20
-1
lines changed
1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -49656,7 +49656,26 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
49656
49656
forEach(heritage, (clause) => {
49657
49657
forEach(clause.types, (node) => {
49658
49658
const type = getTypeOfNode(node);
49659
- if (isCallExpression(node.expression)) {
49659
+ if (isIdentifier(node.expression)) {
49660
+ const links = getNodeLinks(node.expression);
49661
+ const declaration = links.resolvedSymbol?.valueDeclaration
49662
+ const vType = declaration && checker.getTypeAtLocation(declaration)
49663
+ if (vType) {
49664
+ if (vType.symbol) {
49665
+ heritageExtensions.add(vType.symbol);
49666
+ }
49667
+ if (vType.flags & TypeFlags.Intersection) {
49668
+ forEach((vType as IntersectionType).types, (type2) => {
49669
+ if (type2.symbol) {
49670
+ heritageExtensions.add(type2.symbol);
49671
+ }
49672
+ if (type2.aliasSymbol) {
49673
+ heritageExtensions.add(type2.aliasSymbol);
49674
+ }
49675
+ });
49676
+ }
49677
+ }
49678
+ } else if (isCallExpression(node.expression)) {
49660
49679
const resolvedSignature = getResolvedSignature(node.expression);
49661
49680
const returnType = resolvedSignature.resolvedReturnType
49662
49681
if (returnType) {
You can’t perform that action at this time.
0 commit comments