Address PR comments

This commit is contained in:
Nathan Shively-Sanders
2016-05-25 17:03:33 -07:00
parent 5138e8be8e
commit 42c17e194e
9 changed files with 151 additions and 55 deletions

View File

@@ -6036,12 +6036,10 @@ namespace ts {
const resolved = resolveStructuredTypeMembers(type);
if ((relation === assignableRelation || relation === comparableRelation) && (type === globalObjectType || isEmptyObjectType(resolved)) ||
resolved.stringIndexInfo ||
(resolved.numberIndexInfo && isNumericLiteralName(name)) ||
getPropertyOfType(type, name)) {
return true;
}
if (resolved.numberIndexInfo) {
return isNumericLiteralName(name);
}
}
else if (type.flags & TypeFlags.UnionOrIntersection) {
for (const t of (<UnionOrIntersectionType>type).types) {