Encorporting feedback

This commit is contained in:
Sheetal Nandi
2017-06-06 11:27:31 -07:00
parent b62f5b0dae
commit 65a48ca15d
3 changed files with 6 additions and 8 deletions

View File

@@ -749,13 +749,9 @@ namespace ts.Completions {
}
function isContextTokenValueLocation(contextToken: Node) {
if (contextToken) {
const parentKind = contextToken.parent.kind;
switch (contextToken.kind) {
case SyntaxKind.TypeOfKeyword:
return parentKind === SyntaxKind.TypeQuery;
}
}
return contextToken &&
contextToken.kind === SyntaxKind.TypeOfKeyword &&
contextToken.parent.kind === SyntaxKind.TypeQuery;
}
function isContextTokenTypeLocation(contextToken: Node) {