File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -6820,9 +6820,9 @@ module ts {
6820
6820
return undefined ;
6821
6821
}
6822
6822
6823
- function getTypeOfNode ( node : Node ) : Type {
6823
+ function getTypeOfNode ( node : Node , apparentType : boolean ) : Type {
6824
6824
if ( isExpression ( node ) ) {
6825
- return getTypeOfExpression ( < Expression > node ) ;
6825
+ return getTypeOfExpression ( < Expression > node , apparentType ) ;
6826
6826
}
6827
6827
if ( isTypeNode ( node ) ) {
6828
6828
if ( node . kind === SyntaxKind . Identifier || node . kind === SyntaxKind . QualifiedName ) {
@@ -6863,11 +6863,12 @@ module ts {
6863
6863
Debug . fail ( "Unhandled case in getTypeOfNode" ) ;
6864
6864
}
6865
6865
6866
- function getTypeOfExpression ( expr : Expression ) : Type {
6866
+ function getTypeOfExpression ( expr : Expression , apparentType : boolean ) : Type {
6867
6867
if ( isRightSideOfQualifiedNameOrPropertyAccess ( expr ) ) {
6868
6868
expr = expr . parent ;
6869
6869
}
6870
- return < Type > getApparentType ( checkExpression ( expr ) ) ;
6870
+ var type = checkExpression ( expr ) ;
6871
+ return apparentType ? getApparentType ( type ) : type ;
6871
6872
}
6872
6873
6873
6874
function getAugmentedPropertiesOfApparentType ( type : Type ) : Symbol [ ] {
Original file line number Diff line number Diff line change @@ -604,7 +604,7 @@ module ts {
604
604
getReturnTypeOfSignature ( signature : Signature ) : Type ;
605
605
getSymbolsInScope ( location : Node , meaning : SymbolFlags ) : Symbol [ ] ;
606
606
getSymbolInfo ( node : Node ) : Symbol ;
607
- getTypeOfNode ( node : Node ) : Type ;
607
+ getTypeOfNode ( node : Node , apparentType : boolean ) : Type ;
608
608
typeToString ( type : Type , enclosingDeclaration ?: Node , flags ?: TypeFormatFlags ) : string ;
609
609
symbolToString ( symbol : Symbol , enclosingDeclaration ?: Node , meaning ?: SymbolFlags ) : string ;
610
610
getAugmentedPropertiesOfApparentType ( type : Type ) : Symbol [ ] ;
Original file line number Diff line number Diff line change @@ -1693,7 +1693,7 @@ module ts {
1693
1693
1694
1694
// Right of dot member completion list
1695
1695
if ( isRightOfDot ) {
1696
- var type : Type = typeInfoResolver . getTypeOfNode ( mappedNode ) ;
1696
+ var type : Type = typeInfoResolver . getTypeOfNode ( mappedNode , /*apparentType*/ true ) ;
1697
1697
if ( ! type ) {
1698
1698
return undefined ;
1699
1699
}
You can’t perform that action at this time.
0 commit comments