Address feedback

This commit is contained in:
Jason Freeman
2015-02-12 17:36:56 -08:00
parent 486cebd224
commit 4942c5f615
+2 -2
View File
@@ -2503,7 +2503,7 @@ module ts {
}
// For a type parameter, return the base constraint of the type parameter. For the string, number,
// boolean, and symbol primitive types, return the corresponding object types.Otherwise return the
// boolean, and symbol primitive types, return the corresponding object types. Otherwise return the
// type itself. Note that the apparent type of a union type is the union type itself.
function getApparentType(type: Type): Type {
if (type.flags & TypeFlags.TypeParameter) {
@@ -5538,7 +5538,7 @@ module ts {
if (!links.resolvedType) {
links.resolvedType = checkExpression(node.expression);
// This will allow types number, string, Symbol or any. It will also allow enums, the unknown
// This will allow types number, string, symbol or any. It will also allow enums, the unknown
// type, and any union of these types (like string | number).
if (!isTypeOfKind(links.resolvedType, TypeFlags.Any | TypeFlags.NumberLike | TypeFlags.StringLike | TypeFlags.ESSymbol)) {
error(node, Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any);