mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-10 10:58:20 -05:00
Include property in union type only if all underlying properties are public
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user