File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5583,10 +5583,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
55835583 let result: Symbol[] | undefined;
55845584 members.forEach((symbol, id) => {
55855585 if (isNamedMember(symbol, id)) {
5586- (result || (result = []) ).push(symbol);
5586+ (result ?? = []).push(symbol);
55875587 }
55885588 });
5589- return result || emptyArray;
5589+ return result ?? emptyArray;
55905590 }
55915591
55925592 if (members.size === 0) {
@@ -5614,12 +5614,16 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
56145614
56155615 contained?.sort(compareSymbols);
56165616 nonContained?.sort(compareSymbols);
5617- return concatenate(contained, nonContained) || emptyArray;
5617+ return concatenate(contained, nonContained) ?? emptyArray;
56185618
56195619 function isDeclarationContainedBy(symbol: Symbol, container: Symbol): boolean {
56205620 const declaration = symbol.valueDeclaration;
5621- if (declaration) {
5622- return some(container.declarations, d => containedBy(declaration, d));
5621+ if (declaration && container.declarations) {
5622+ for (const d of container.declarations) {
5623+ if (containedBy(declaration, d)) {
5624+ return true;
5625+ }
5626+ }
56235627 }
56245628 return false;
56255629
You can’t perform that action at this time.
0 commit comments