Fix minor issues

This commit is contained in:
Anders Hejlsberg 2020-11-18 14:57:13 -08:00
parent a9c2c70671
commit c96b3280d7
3 changed files with 6 additions and 1 deletions

View File

@ -633,6 +633,7 @@ namespace ts {
|| isTypeAliasDeclaration(node)
|| isModuleDeclaration(node)
|| isClassDeclaration(node)
|| isClassExpression(node)
|| isInterfaceDeclaration(node)
|| isFunctionLike(node)
|| isIndexSignatureDeclaration(node)

View File

@ -1176,6 +1176,10 @@ namespace ts {
|| kind === SyntaxKind.Identifier;
}
export function isEntityNameOrClassExpression(node: Node): node is EntityName {
return isEntityName(node) || node.kind === SyntaxKind.ClassExpression;
}
export function isPropertyName(node: Node): node is PropertyName {
const kind = node.kind;
return kind === SyntaxKind.Identifier

View File

@ -491,7 +491,7 @@ namespace ts {
case SyntaxKind.TypeQuery:
return factory.updateTypeQueryNode((<TypeQueryNode>node),
nodeVisitor((<TypeQueryNode>node).exprName, visitor, isEntityName));
nodeVisitor((<TypeQueryNode>node).exprName, visitor, isEntityNameOrClassExpression));
case SyntaxKind.TypeLiteral:
return factory.updateTypeLiteralNode((<TypeLiteralNode>node),