Code review feedback.

This commit is contained in:
Cyrus Najmabadi 2014-09-23 15:41:04 -07:00
parent 352cc0ef13
commit d6fc3fc2da
2 changed files with 6 additions and 4 deletions

View File

@ -6544,9 +6544,7 @@ module ts {
// If it is a constant value (not undefined), it is syntactically constrained to be a number.
// Also, we do not need to check this for ambients because there is already
// a syntax error if it is not a constant.
if (fullTypeCheck) {
checkTypeAssignableTo(checkExpression(initializer), enumType, initializer, /*chainedMessage*/ undefined, /*terminalMessage*/ undefined);
}
checkTypeAssignableTo(checkExpression(initializer), enumType, initializer, /*chainedMessage*/ undefined, /*terminalMessage*/ undefined);
}
}
else if (ambient) {

View File

@ -45,6 +45,7 @@ module ts {
getFlags(): SymbolFlags;
getName(): string;
getDeclarations(): Declaration[];
getDocumentationComment(): string;
}
export interface Type {
@ -222,6 +223,9 @@ module ts {
flags: SymbolFlags;
name: string;
declarations: Declaration[];
// Undefined is used to indicate the value has not been computed. If, after computing, the
// symbol has no doc comment, then the empty string will be returned.
documentationComment: string;
constructor(flags: SymbolFlags, name: string) {
@ -2390,7 +2394,7 @@ module ts {
return undefined;
}
var symbol = <SymbolObject>typeInfoResolver.getSymbolInfo(node);
var symbol = typeInfoResolver.getSymbolInfo(node);
if (!symbol) {
return undefined;
}