Skip to content

Commit d6fc3fc

Browse files
Code review feedback.
1 parent 352cc0e commit d6fc3fc

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6544,9 +6544,7 @@ module ts {
65446544
// If it is a constant value (not undefined), it is syntactically constrained to be a number.
65456545
// Also, we do not need to check this for ambients because there is already
65466546
// a syntax error if it is not a constant.
6547-
if (fullTypeCheck) {
6548-
checkTypeAssignableTo(checkExpression(initializer), enumType, initializer, /*chainedMessage*/ undefined, /*terminalMessage*/ undefined);
6549-
}
6547+
checkTypeAssignableTo(checkExpression(initializer), enumType, initializer, /*chainedMessage*/ undefined, /*terminalMessage*/ undefined);
65506548
}
65516549
}
65526550
else if (ambient) {

src/services/services.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ module ts {
4545
getFlags(): SymbolFlags;
4646
getName(): string;
4747
getDeclarations(): Declaration[];
48+
getDocumentationComment(): string;
4849
}
4950

5051
export interface Type {
@@ -222,6 +223,9 @@ module ts {
222223
flags: SymbolFlags;
223224
name: string;
224225
declarations: Declaration[];
226+
227+
// Undefined is used to indicate the value has not been computed. If, after computing, the
228+
// symbol has no doc comment, then the empty string will be returned.
225229
documentationComment: string;
226230

227231
constructor(flags: SymbolFlags, name: string) {
@@ -2390,7 +2394,7 @@ module ts {
23902394
return undefined;
23912395
}
23922396

2393-
var symbol = <SymbolObject>typeInfoResolver.getSymbolInfo(node);
2397+
var symbol = typeInfoResolver.getSymbolInfo(node);
23942398
if (!symbol) {
23952399
return undefined;
23962400
}

0 commit comments

Comments
 (0)