Account for typeof expressions, added test.

This commit is contained in:
Daniel Rosenwasser 2015-03-17 08:07:40 -07:00
parent f2a7367e9b
commit ad084ded72
3 changed files with 13 additions and 2 deletions

View File

@ -160,8 +160,10 @@ module ts {
}
return isCompletedNode((<DoStatement>n).statement, sourceFile);
case SyntaxKind.TypeOfExpression:
return isCompletedNode((<TypeOfExpression>n).expression, sourceFile);
case SyntaxKind.PrefixUnaryExpression:
return isCompletedNode(<PrefixUnaryExpression>n, sourceFile);
return isCompletedNode((<PrefixUnaryExpression>n).operand, sourceFile);
case SyntaxKind.BinaryExpression:
return isCompletedNode((<BinaryExpression>n).right, sourceFile);
case SyntaxKind.ConditionalExpression:

View File

@ -5,7 +5,6 @@
//// [foo: string]: typeof /*1*/
////}
goTo.marker("1");
verify.completionListContains("foo");
verify.completionListContains("C");

View File

@ -0,0 +1,10 @@
/// <reference path='fourslash.ts' />
////class C {
//// [foo: string]: { x: typeof /*1*/
////}
goTo.marker("1");
verify.completionListContains("foo");
verify.completionListContains("C");