More CR feedback.

This commit is contained in:
Cyrus Najmabadi committed 2014-12-03 15:36:39 -08:00
1 parent 22d7aed980
commit 158cf62206
4 files changed
+3 -8

No files matched your search

-3
View File
@@ -4909,9 +4909,6 @@ module ts {
// We cannot answer semantic questions within a with block, do not proceed any further
return undefined;
}
if (node.contextualType) {
return node.contextualType;
}
return getContextualTypeForObjectLiteralElement(node);
}
+2 -2
View File
@@ -471,11 +471,11 @@ module ts {
}
export function isFunctionBlock(node: Node) {
return node && node.kind === SyntaxKind.Block && isAnyFunction(node.parent);
return node !== undefined && node.kind === SyntaxKind.Block && isAnyFunction(node.parent);
}
export function isObjectLiteralMethod(node: Node) {
return node && node.kind === SyntaxKind.Method && node.parent.kind === SyntaxKind.ObjectLiteralExpression;
return node !== undefined && node.kind === SyntaxKind.Method && node.parent.kind === SyntaxKind.ObjectLiteralExpression;
}
export function getContainingFunction(node: Node): FunctionLikeDeclaration {
-2
View File
@@ -430,8 +430,6 @@ module ts {
// at later stages of the compiler pipeline. In that case, you can either check the parent kind
// of the method, or use helpers like isObjectLiteralMethodDeclaration
export interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement {
contextualType?: Type; // Used to temporarily assign a contextual type during overload resolution
body?: Block;
}