Addressed CR feedback.

This commit is contained in:
Daniel Rosenwasser 2016-02-10 15:19:27 -08:00
parent 0ccc8d0225
commit 1f31bc7b09
2 changed files with 4 additions and 6 deletions

View File

@ -7081,9 +7081,7 @@ namespace ts {
switch (expr.kind) {
case SyntaxKind.Identifier:
case SyntaxKind.PropertyAccessExpression:
case SyntaxKind.QualifiedName:
// TODO (drosen): Why a qualified name?
return getSymbolOfEntityNameOrPropertyAccessExpression(expr as Node as (EntityName | PropertyAccessExpression));
return getSymbolOfEntityNameOrPropertyAccessExpression(expr as (Identifier | PropertyAccessExpression));
}
}
@ -10469,13 +10467,13 @@ namespace ts {
return aggregatedTypes;
}
/**
/**
* TypeScript Specification 1.0 (6.3) - July 2014
* An explicitly typed function whose return type isn't the Void type,
* the Any type, or a union type containing the Void or Any type as a constituent
* must have at least one return statement somewhere in its body.
* An exception to this rule is if the function implementation consists of a single 'throw' statement.
*
*
* @param returnType - return type of the function, can be undefined if return type is not explicitly specified
*/
function checkAllCodePathsInNonVoidFunctionReturnOrThrow(func: FunctionLikeDeclaration, returnType: Type): void {

View File

@ -1940,7 +1940,7 @@ namespace ts {
return finishNode(node);
}
function parseThisTypePredicate(lhs: Identifier | ThisTypeNode): TypePredicateNode {
function parseThisTypePredicate(lhs: ThisTypeNode): TypePredicateNode {
nextToken();
const node = createNode(SyntaxKind.TypePredicate, lhs.pos) as TypePredicateNode;
node.parameterName = lhs;