remove comments

This commit is contained in:
Gabriela Araujo Britto
2021-08-09 15:39:45 -07:00
parent 05c993b0c3
commit 6136c7c056
2 changed files with 2 additions and 12 deletions

View File

@@ -11802,7 +11802,7 @@ namespace ts {
return getReducedType(getApparentType(getReducedType(type)));
}
function createUnionOrIntersectionProperty(containingType: UnionOrIntersectionType, name: __String, skipObjectFunctionPropertyAugment?: boolean): Symbol | undefined { // candidate
function createUnionOrIntersectionProperty(containingType: UnionOrIntersectionType, name: __String, skipObjectFunctionPropertyAugment?: boolean): Symbol | undefined {
let singleProp: Symbol | undefined;
let propSet: ESMap<SymbolId, Symbol> | undefined;
let indexTypes: Type[] | undefined;

View File

@@ -2213,22 +2213,12 @@ namespace ts.Completions {
canGetType = isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent as Expression);
}
}
if (canGetType) { // here
if (canGetType) {
const typeForObject = typeChecker.getTypeAtLocation(objectLikeContainer);
if (!typeForObject) return GlobalsSearch.Fail;
// In a binding pattern, get only known properties (unless in the same scope).
// Everywhere else we will get all possible properties.
// const containerClass = getContainingClass(objectLikeContainer);
typeMembers = typeChecker.getPropertiesOfType(typeForObject).filter(propertySymbol => {
return typeChecker.isPropertyAccessible(objectLikeContainer, /*isSuper*/ false, /*writing*/ false, typeForObject, propertySymbol);
// return !(getDeclarationModifierFlagsFromSymbol(propertySymbol) & ModifierFlags.NonPublicAccessibilityModifier)
// || containerClass && contains(typeForObject.symbol.declarations, containerClass);
});
// // either public
// !(getDeclarationModifierFlagsFromSymbol(symbol) & ModifierFlags.NonPublicAccessibilityModifier)
// // or we're in it
// || containerClass && contains(typeForObject.symbol.declarations, containerClass));
existingMembers = objectLikeContainer.elements;
}
}