handel private properties correctelly

This commit is contained in:
Mohamed Hegazy
2016-06-30 10:38:59 -07:00
parent b40512d8a2
commit 1fa69caf13
6 changed files with 408 additions and 2 deletions

View File

@@ -10241,8 +10241,13 @@ namespace ts {
return unknownType;
}
if (noUnusedIdentifiers && !isInAmbientContext(node)) {
prop.isReferenced = true;
if (noUnusedIdentifiers && (prop.flags & SymbolFlags.ClassMember)) {
if (prop.flags & SymbolFlags.Instantiated) {
getSymbolLinks(prop).target.isReferenced = true;
}
else {
prop.isReferenced = true;
}
}
getNodeLinks(node).resolvedSymbol = prop;

View File

@@ -2107,6 +2107,8 @@ namespace ts {
PropertyOrAccessor = Property | Accessor,
Export = ExportNamespace | ExportType | ExportValue,
ClassMember = Method | Accessor | Property,
/* @internal */
// The set of things we consider semantically classifiable. Used to speed up the LS during
// classification.