mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 11:35:42 -06:00
Include property in union type only if all underlying properties are public
This commit is contained in:
parent
6d36dd5296
commit
bda1f59d7b
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user