Skip to content

Commit bcfb377

Browse files
committed
use nullish coalescing
1 parent b658ec5 commit bcfb377

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/checker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9595,9 +9595,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
95959595
jsdocType = getAnnotatedTypeForAssignmentDeclaration(jsdocType, expression, symbol, declaration);
95969596
}
95979597
if (!jsdocType) {
9598-
(types || (types = [])).push((isBinaryExpression(expression) || isCallExpression(expression)) ? getInitializerTypeFromAssignmentDeclaration(symbol, resolvedSymbol, expression, kind) : neverType);
9598+
(types ??= []).push((isBinaryExpression(expression) || isCallExpression(expression)) ? getInitializerTypeFromAssignmentDeclaration(symbol, resolvedSymbol, expression, kind) : neverType);
95999599
}
9600-
(declarations || (declarations = [])).push(declaration);
9600+
(declarations ??= []).push(declaration);
96019601
}
96029602
type = jsdocType;
96039603
}

0 commit comments

Comments
 (0)