mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-10 15:25:54 -06:00
Addressed CR feedback.
This commit is contained in:
parent
0ccc8d0225
commit
1f31bc7b09
@ -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 {
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user