mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
respond to code review comments
This commit is contained in:
@@ -1844,7 +1844,11 @@ module ts {
|
||||
|
||||
function isVisibleWithinClassDeclaration(symbol: Symbol, containingClass: Declaration): boolean {
|
||||
var declaration = symbol.declarations && symbol.declarations[0];
|
||||
return !(declaration && (declaration.flags & NodeFlags.Private) && containingClass !== declaration.parent);
|
||||
if (declaration && (declaration.flags & NodeFlags.Private)) {
|
||||
var declarationClass = getAncestor(declaration, SyntaxKind.ClassDeclaration);
|
||||
return containingClass === declarationClass;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function filterContextualMembersList(contextualMemberSymbols: Symbol[], existingMembers: Declaration[]): Symbol[] {
|
||||
@@ -1966,7 +1970,7 @@ module ts {
|
||||
}
|
||||
|
||||
var type = typeInfoResolver.getTypeOfNode(mappedNode);
|
||||
var apparentType: ApparentType = type && typeInfoResolver.getApparentType(type);
|
||||
var apparentType = type && typeInfoResolver.getApparentType(type);
|
||||
if (apparentType) {
|
||||
// Filter private properties
|
||||
forEach(apparentType.getApparentProperties(), symbol => {
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
/// <reference path="fourslash.ts"/>
|
||||
|
||||
////class Foo {
|
||||
//// private y;
|
||||
//// constructor(private x) {}
|
||||
//// method() { this./*1*/; }
|
||||
////}
|
||||
////var f:Foo;
|
||||
////f./*2*/
|
||||
|
||||
goTo.marker("1");
|
||||
verify.memberListContains("y");
|
||||
verify.memberListContains("x");
|
||||
|
||||
goTo.marker("2");
|
||||
verify.not.memberListContains("x");
|
||||
verify.not.memberListContains("y");
|
||||
Reference in New Issue
Block a user