mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
remove comments
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user