Include property in union type only if all underlying properties are public

This commit is contained in:
unknown 2015-04-16 14:39:02 -07:00
parent 6d36dd5296
commit bda1f59d7b

View File

@ -2945,7 +2945,7 @@ module ts {
let type = getApparentType(current);
if (type !== unknownType) {
let prop = getPropertyOfType(type, name);
if (!prop) {
if (!prop || getDeclarationFlagsFromSymbol(prop) & (NodeFlags.Private | NodeFlags.Protected)) {
return undefined;
}
if (!props) {